Thank you for the replies.... From my Kannel's smsbox output log (shown
below), it seems that the problems were:
1. My application in my content server did not receive correctly the
message I passed or that the message I passed to it is not correct
(because the content server issued Kannel a warning that says the
message passed to it is not in the correct format)
2. The dlr-url CGI parameter in the sendsms is not urlencoded when the
content server replied to Kannel (I assume this is an error because I
got a response of HTTP 400 Bad Request (was that from the smsbox?) and a
response of DLR-URL field misformed, rejected from Kannel).
Therefore, from the above problems,
1. my application in the content server should urlencode the
dlr-url field before making a sendsms to my Kannel? So, if my dlr-url
is: http://202.147.31.2/test/smsresponse.asp?type=%d
<http://202.147.31.2/test/smsresponse.asp?type=%25d> , I should make it
as
http%3a%2f%2f202%2e147%2e31%2e2%2ftest%2fsmsresponse%2easp%3ftype%3d%25d
, right?
2. I should check if my application processes correctly my
get-url and check also if my get-url is correct. My configuration for
sms-service is
group = sms-service
keyword = test
accepted-smsc = the id for my smsc
get-url = "http://my-content-server/test/receivemsg.asp?from=%p
<http://my-content-server/test/receivemsg.asp?from=%25p&to=%25P&text=%25
k%25s%25r> &to=%P&text=%k%s%r"
max-messages = 3
concatenation = true
One word about the escape codes:
The format of all messages to be sent to my application should be TEST
CODE MESSAGE, where MESSAGE could be up to 400 characters including
spaces...
May I know if I set text in my get-url to be text=%k%s%r, would Kannel
put spaces between the words trapped by %k and %s or merge them as one
word? For example, if the mobile sends to Kannel the following message:
test garbage there are so many litter in our community, would text be
testgarbagethere+there+are+so+many+litter+in+our+community? I assume
this is so because from the HTTP log below, that is what Kannel sent to
my content server. How do I put spaces between the "test" word and the
next words?
Is it also safe to assume that since I could send and receive text
messages to Kannel (via the SMSC), our connection with SMSC has no
problem?
Thank you in advance!
2004-08-27 16:55:56 [4440] [0] DEBUG: Kannel smsbox version 1.3.2
starting
<other lines, snipped>
2004-08-27 16:57:15 [4440] [5] DEBUG: message length 31, sending 1
messages
2004-08-27 16:58:51 [4440] [4] INFO: Starting to service <test garbage
dami po bsura d2. anu po gawin ko?> from <09228051616>
to <136>
Parsing URL `http:// XXX.XXX.XX.X
/test/receivemsg.asp?from=09228051616&to=136&text=
testgarbagedami+po+bsura+d2.+anu+po+gawin+ko%3F':
Scheme: http://
Host: XXX.XXX.XX.X 2004-08-27 16:58:51 [4440] [9] DEBUG: Port: 80
<snipped>
Path: /test/receivemsg.asp
Query:
from=09228051616&to=136&text=testgarbagedami+po+bsura+d2.+anu+po+gawin+k
o%3F
Fragment: (null)
HTTP: Reusing connection to ` XXX.XXX.XX.X:80' (fd=28).
Socket connected at once
HTTP: Sending request:
<other lines snipped>
GET / test/receiv
emsg.asp?from=09
228051616&to=136
&text= testgarbag
edami+po+bsura+d
2.+anu+po+gawin+
ko%3F HTTP/1.1..
Host: 202.147.31
.2..User-Agent:
Kannel/1.3.2....
<other lines snipped>
Octet string dump ends.
HTTP: Status line: <HTTP/1.1 302 Object moved>
HTTP: Received response:
<other lines were snipped>
Octet string dump ends.
Parsing URL `http://XXX.XXX.XX.X:13013/
cgibin/sendsms?username=janelang&password=janelang&from=136&to=092280516
16&Text=The+correct+format+is%3A+TEST%3Cspace%3ECODE%3Cspace%3EMESSAGE&d
lr-mask=31&dlr-url=htp:// XXX.XXX.XX.X
/test/smsresponse.asp?type=%d&msclass=1':
Scheme: http://
Host: XXX.XXX.XX.X
Port: 13013
Username: (null)
Password: (null)
Path: /cgi-bin/sendsms
Query:
username=janelang&password=janelang&from=136&to=09228051616&Text=The+cor
rect+format+is%3A+MMDA%3Cspace%3ECODE%3Cspace%3EMESSAGE&dlr-mask=31&dlr-
url=htp:// XXX.XXX.XX.X
/test/smsresponse.asp?type=%d&msclass=12004-08-27 16:58:51 [4440] [9]
DEBUG: Fragment: (null)
HTTP: Opening connection to ` XXX.XXX.XX.X:13013' (fd=29).
Socket connecting
HTTP: Creating HTTPClient for ` XXX.XXX.XX.X '.
Get info about connecting socket
HTTP: Sending request:
<other lines snipped>>>
GET /cgi-bin/sen
dsms?username=ja
nelang&password=
janelang&from=13
6&to=09228051616
&Text=The+correc
t+format+is%3A+T
EST%3Cspace%3ECO
DE%3Cspace%3EMES
SAGE&dlr-mask=31
&dlr-url=htp://2
02.147.31.2/test
/smsresponse.asp
?type=%d&msclass
=1 HTTP/1.1..Hos
t: XXX.XXX.XX.X:
13013..User-Agen
t: Kannel/1.3.2.
...
Octet string dump ends.
octstr_url_decode: corrupted end-of-string <%d>
smsbox: Got HTTP request </cgi-bin/sendsms> from < XXX.XXX.XX.X >
sendsms used by <janelang>
sendsms sender:<janelang:136> (XXX.XXX.XX.X) to:<09228051616> msg:<>
Status: 400 Answer: <DLR-URL field misformed, rejected>
HTTP: Resetting HTTPClient for ` XXX.XXX.XX.X '.
HTTP: Status line: <HTTP/1.1 400 Bad Request>
HTTP: Received response:
Octet string at 0x813ce58:
len: 145
size: 1024
immutable: 0
Server: Kannel/1
.3.2..Content-Length: 33..Content-type: text/html..Pragma:
no-cache..Cache-Control: no-cache....
DLR-URL field misformed, rejected