dlr-storage = internal
dlr-storage = mysql
2) If you use mysql add following two groups to kannel.conf (or to separate file and include that file). Put your database username and password to the place of
group = mysql-connection
id = mydlr
host = localhost
username = [db user]
password = [db passwd]
database = kannel
max-connections = 1
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc
Thats all for kannel.conf...
3) Now you have to introduce following extra parameters to your kannel send sms url
dlr-mask=
dlr-url=
dlr-mask specifies the types of reports which kannel should generate. dlr-url specifies the url which will be called when the delivery report is received. For dlr-mask you can use one of the following mask numbers or any combination of them.
1: delivery success
2: delivery failure
4: message buffered
8: smsc submit
16: smsc reject
If you want multiple report types, you simply add the values together. For dlr-url you have to provide a url-encoded url for example
url:
http://localhost/sms/inc/deliveryReport.php?user=john&passwd=1234&type=%d&receiver=%p&reply=%A&time=%t&usr=%n&message=%b
urlencoded url:
http%3A%2F%2Flocalhost%2Fsms%2Finc%2FdeliveryReport.php%3Fuser%3Djohn%26passwd%3D1234%26type%3D%25d%26receiver%3D%25p%26reply%3D%25A%26time%3D%25t%26usr%3D%25n%26message%3D%25b
If you use php to interact with kannel you can easily generate urlencoded url using urlencode(
finally the resulting url is like this
http://localhost:13013/cgi-bin/sendsms?username=[kannel user]
here I have used dlr-mask=7 so it will report following three types;
1: delivery success
2: delivery failure
4: message buffered
Hi,
ReplyDeleteThanks for this article, found it very useful...
So i need to create the MYSQL database to use this?>
Bashir
my pleasure
ReplyDeleteHi Laxaman,
ReplyDeleteAs you mentioned in your blog I followed every step and I am able to submit to the SMSC and even getting the delivery response to the URL specified in the dlr-url. I have notice that delivery response not getting stored in the dlr table as specified in the kannel configuration under group = dlr-db. Can you please let me know whether the delivery response will get stored in the dlr table automatically by kannel or else we need to store it manually using PHP or JAVA.
The dlr table is a temporary table used by Kannel to store dlr data for the message for which it hasn't received delivery status. If you want to check the statuses, you should use dlr-url and dlr-mask in that purpose
ReplyDeletehey ur post is good,
ReplyDeleteplease tell me how do i create dlr.php script? where shuld i stored it ? how to launch it? And if possible could u send me dlr.php script?
here is my mail-id sagar2489@gmail.com
Sorry for silly qusetions?
please help me?
Hi,
ReplyDeleteThanks for the pointers :)
Your article helped me lot.
Great Sharing. What will come in this PHP file?
ReplyDeletedeliveryReport.php
Hello laxaman.. i got this article very much useful for me.Thanks ..
ReplyDeleteAnd please help me to understand the proper working of kannel .. and if i use "dlr-storage = mysql" then it show unable to start kannel services :( ..
Please help me to get resolve this issue.