Hi,
It is better to send the WAP PUSH over SMS with UDH (%06%05%04%0B%84%23%F0), below is a simple and tested PHP function of the WAP PUSH construction:
 
function WAPpsh($URL, $vendor)
{
 $text  = "%01"; // transid
 $text .= "%06"; // PDU Type (push)
 $text .= "%04%03"; // length of content-type
 $text .= "%AE%81%EA"; // content-type: application/vnd.wap.sic
 $text .= "%02"; // wbxml_version
 $text .= "%05"; // si_public_id
 $text .= "%6A"; // charset= (sibxml->charset)
 $text .= "%00"; // string table length
 $text .= "%45"; // <si>
 $text .= "%C6"; // <indication..
 $text .= "%0C%03".rawurlencode($URL)."%00"; // href=""> $text .= "%01"; // end indication>
 $text .= "%03".rawurlencode(trim($vendor))."%00";
 $text .= "%01"; // </indication>
 $text .= "%01"; // </si>
 
 return $text;
}
 
$text = WAPpsh("MTRAX","1.2.3.4/path/to/script.php");
 
Please modify and fit your need. And send it with no URLENCODE with kannel's sendsms script.
 
Regards
 
 
Willy
----- Original Message -----
Sent: Tuesday, March 28, 2006 9:15 PM
Subject: WAP Push


 
Hiiii,

My problem is

Whenever i m sending the WAP Push to a phone which does not have WAP facility in it, the phone receives an error Content cant be displayed i feel thats OK but when i send to a WAP-enabled phone i m not getting the message but the money is deducted and the bearerbox shows that it had sent the message. I have tried many things but nothing works right at this moment. The configuration file and related content documents are as follows:

group = core
admin-port = 13000
smsbox-port = 13001
wapbox-port = 13002
admin-password = bar
# status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
wdp-interface-name = "*"
log-file = "/tmp/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
unified-prefix = "+358,00358,0;+,00,+91"
#access-log = "/tmp/access.log"
#store-file = "/tmp/kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

# WAPBOX SETUP, for pushing and for pulling (fetching) the wap data

group = wapbox
bearerbox-host = localhost
log-file = "/tmp/wapbox.log"
log-level = 0
syslog-level = none

# PPG CORE SETUP, for defining the push request interface

group = ppg
ppg-url = "">ppg-port = 15000
#ppg-ssl-port = 8081
concurrent-pushes = 100
trusted-pi = true
users = 1024
# global-sender = "+919820205446"
global-sender = "+919820756920"
#ppg-deny-ip = "*.*.*.*"
ppg-allow-ip = "*.*.*.*"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"

# PPG USER SETUP, for authorizing a specific push user

group = wap-push-user
wap-push-user = foo
ppg-username = foo
ppg-password = bar
country-prefix = +358,+91
#allowed-prefix = "40;60;70"
#denied-prefix = 50
#white-list = http://localhost:8082/whitelist
#black-list =  http://localhost:8082/blacklist
#deny-ip = "*.*.*.*"
allow-ip = "127.0.0.1"

# SMSC CONNECTIONS, for pushing SI, SL, MMS notifications or whatever over SMS

# group = smsc
# smsc = fake
# smsc-id = FAKE
# port = 10000
# connect-allow-ip = 127.0.0.1

# SMSBOX SETUP (a kludge!)

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/tmp/smsbox.log"
log-level = 0
access-log = "/tmp/access.log"

# TEST PAP PROTOCOL

group = test-ppg
retries = 2
pi-ssl = yes
#ssl-client-certkey-file = /etc/kannel/certkey.pem
ssl-client-certkey-file = /home/sachin/nirav/gatway-1.4.0/gw/cert.pem

# CONFIGURATION GROUP

group = configuration
push-url = "">#pap-file = /etc/kannel/ipnoqos.txt
pap-file = /home/sachin/nirav/gateway-1.4.0/test/iptestppg.xml
#content-file = /etc/kannel/si.txt
content-file = /home/sachin/nirav/gateway-1.4.0/test/si.xml
username = foo
password = bar


# MODEM GROUP

group = modems
id = "my-id"
name = "my-name"
detect-string = "MODEM"
group = modems
id = "my-id"
name = "my-name"
detect-string = "MODEM"
detect-string2 = ""
init-string = "AT"
init-string = "AT&F<cr>"
init-string = "AT V1E0S0=0&D2&C1<cr>"
init-string = "AT +CMEE=1<cr>"
speed = 9600
enable-hwhs = "+IFC=2,2"
need-sleep = false
no-pin = false
no-smsc = false
sendline-sleep = 100
keepalive-cmd = "AT"
broken = false
message-storage = "SM"
enable-mms = false
#group = modems
id = ericsson_t68
name = "Ericsson T68"
detect-string = "Ericsson"
detect-string2 = "T68"
init-string = "AT +CMEE=1"
keepalive-cmd = "AT+CBC;+CSQ"

#AT

group = smsc
smsc = at
modemtype = ericsson_t68
device = /dev/ttyS0
speed = 9600
pin = 2345
validityperiod = 167

# SEND-SMS USERS

group = sendsms-user
username = tester
password = foobar
user-deny-ip = ""
user-allow-ip = "10.125.17.141"

group = sendsms-user
username = kannel
password = rL4y
user-deny-ip = "*.*.*.*"
user-allow-ip = "127.0.0.1"





I m using the url to send message:

http://localhost:13013/cgi-bin/sendsms?username=kannel&password=rL4y
&to=9820756920&udh=%06%05%04%0B%84%23%F0
&text=%07%06%17%B0%96%6C%6F%63%61%6C%68%6F%73%74%3A%39%30%38%30%00
%AF%80%8D%95%B4%02%06%6A%00%85%09%03wap.nokia.de%00%01

I got this url from the net. I have also tried using WAP box. Now i have tried using it smsbox to push the message but samething occurs in both the situation.
Please suggest a way out or instruct me how to go further.

Thanks in advance.



Reply via email to