Dear Andi, On Mon, 2005-11-07 at 22:37 -0800, Andi Taslim wrote: > Dear all, > > My name is Andi and this is my first post here. I hope I'm doing this > correctly. > > I have a question about Kannel that I hope one of you can help me with. > Basically, I'm not quite sure yet on the common practices on handling the > delivery report (DLR) on Kannel. > > I believe I've configured the mysql DLR external storage correctly by > inserting the appropriate entries on the config file. When I push an SMS by > using the http command > (http://xxx.xxx.xxx.xxx:yyyyy/cgi-bin/sendsms?username=xxx&password=xxx&from=xxx&to=xxx&text=xxx&dlr-mask=31&dlr-url=xxx), > > I could see that a DLR entry is inserted into the database along with the > timestamp, status, etc. > > Based on what I've read on the documentation and discussion on the internet, > I assume that when the SMSC has delivered the SMS successfully, Kannel will > do an http request to the dlr-url that I supplied (for example: > http://xx.xx.xx.xx/cgi/dlrHandling.php?smsc-id=%i&status=%d&answer=%A&to=%P&from=%p&ts=%t). > > Then on the script, I would have to write my own code to manually process > the DLR individually and do other required tasks such as deleting the DLR > entry and others. > > My questions: > 1. Is this the common practice on handling the DLR and confirming that the > recipients have received the SMS? Am I doing this correctly by processing > the DLR entry manually? Is there any other way (more efficient way) of doing > this?
AFAIK, you are on the right track. Your code on dlr-url is responsible to process information about the incomming dlr. MySQL DLR will be used internally by kannel. So, if you want to record dlr information, you have to create separate database or table for your goal. > 2. Why does the timestamp only consist of 2 digit number? Is my database > definition wrong? (I used VARCHAR(40) as stated on the example) Why don't you define it as timestamp field in mysql? > 3. Is using the timestamp and the "to" number is enough to uniquely identify > which DLR that I want to process? Because what happens when there is a same > phone number having the same timestamp? Is there a unique ID for each DLR > that I should use instead of relying on the ts and the phone number? Yes, that's the common practice. But if you need your own unique ID, you may add your unique ID, by appsing the unique ID in your dlr-url. So, every time you send a message your unique ID is passed in that dlr-url. > > I would appreciate any help or hints that any of you can give me. > > Many thanks and best regards, > > -Andi > > Hope this helps you.. --tjatur >
