HTTP_GET's and HTTP_POST's use different mechanisms activate the DLR notification system. You are mixing both.
If you are issuing an HTTP_GET request, then you need to submit
the information in the cgi parameters like this:
GET /cgi-bin/sendsms? username=foo&password=bar&to=<phonenumber>&test=test&dlr-url=http:// host:port/notificatio-url%3Foa=%p&da=%P&smsc=%i&dlr- type=%d&dlr-mask=31
The value of the dlr-url passed via an HTTP_GET must be URL-Encoded.
If you are issuing an HTTP_POST request, then you need to submit the information as part of the HTTP optional headers:
POST /cgi-bin/sendsms HTTP/1.0
X-Kannel-Username: foo
X-Kannel-Password: bar
X-Kannel-To: <phonenumber>
X-Kannel-DLR-URL: http://host:port/notification?oa=%p&da=%P&smsc=%i&dlr-type=%d
X-Kannel-DLR-Mask: 31
Content-Type: text/plain
Content-Length: 4
test
For and HTTP_POST request, the dlr-url does not need to be URL-Encoded.
Don't mixup the HTTP optional headers and cgi parameters. Their usage
are not interchangeable. This point is not very clear in the userguide.
I'll add that to my TODO list of updates to the docs.
Woohoo! Doing a POST worked.
Now I have a couple more questions. I am interested in receiving the messageid(s) that were created when an SMS was sent. I have the need to send both text messages and ringtones as SMSes. Ringtones oftentimes get split into more than one segment and I would like to receive the messageids of all of the segments for a particular ringtone. Is it possible to receive this information from Kannel? Where can I find documentation on those parameters in the X-Kannel-DLR-URL above (the %d, %P...)? Also, where can I find the different status codes? The notification that was sent to me had a status=12.
Thanks for all your help,
-M@
