Well, the way Kannel manages the DLRs is transparent for us. Don't define any DLR URL in the config file of Kannel, but define it as an HTTP GET parameter of the sendsms function. In this DLR URL you define your own parameters, which contains the key you wanna retrieve later. When a DLR arrives from the SMSC to Kannel, it calls the famous DLR URL, which can be a CGI script, a php, asp or jsp page where you'll get these parameters for you own use, and to retrieve the SMS which is associated with the DLR you got.
To really answer to your question: The insert you are speaking happens just before you use the HTTP sendsms functionality of Kannel. Here is the Use Case: 1) We have a message to transmitt. 2) We give it to a programm (executable, java, etc.) or a script (pearl, php, jsp, etc.). 3) The programm insert it into a database. 4) The programm get the unique key of this insert (for example a primary key auto incremented). 5) The programm makes an HTTP GET request to sendsms of Kannel with some parameters (to, from, dlr-mask, text, etc...) and the famous DLR URL (dlr-url) urlencoded including itself the key. This an URL into another URL as parameter. This DLR URL will be called when a DLR arrives for this message. By this way, you'll be able to make the link between the SMS you sent before, and the DLR your got later or DLRs if there was multiple recipients in your message... Thanks for the help of the others... Yanik >> What most people do in this situation is use a database to store >> information about a message with a unique ID (primary key, auto >> incremented). This way when they send the message to kannel with a >> DLR >> URL, they can include this in the DLR URL, ie: >> >> insert into log values (NULL, 2125551212, now(), "this is a test >> message"); >> get the insert_id >> >> dlr url: >> >> http://host/dlr.cgi?id=1234&t=%t&u=%u&i=%i >> >> This way your URL already has your internal tracking ID associated >> with >> it, so when it is called you can do whatever you need. > > I understand inside kannel.conf when mysql is defined as the storage area > for dlr, they are all stored there. But how does one issue the insert like > you mention above ? Is it inside the dlr.cgi we do this ? > > -- > Thx and regards, > > Anand > >> On Fri, 15 Apr 2005, Julien Buratto wrote: >> >>>> Or is there a ready-to-use solution in Kannel that would permit to >>>> make >>>> a >>>> link between a sent SMS and the reception of a delivery report? And >>>> how >>>> should I proceed? Is there anyone who still resolved this problem? >>> >>> Did u set the DLR-URL ? >>> In the URL you can include any id you want. >> > >> >> Beckman >> --------------------------------------------------------------------------- >> Peter Beckman Internet >> Guy >> [EMAIL PROTECTED] >> http://www.purplecow.com/ >> --------------------------------------------------------------------------- >> >> > > >
