On Fri, 15 Apr 2005, Anand Gupta wrote:

Thx for the nice explanation. I was trying to out ways to get to the ts
field ;) If you recall my earlier message in which i mentioned about the
script which is called in using dlr-url to check for the unique id in
kannel table to get to the ts field ? There is one problem to it, if the
message is delivered before my script gets to it then the script has no
way to get the ts field hence i was trying to get something on that.
Getting another insert was basically to get those values in another table
for the same work and then remove them at leisure, says once a day or
something.

If you are having the problem of entries in your store being deleted, then you are probably recieving the message_id from the smsc in DLR reports.

 Look through your bearerbox.log (whatever has the most data) and look for
 a message that starts with " id:" -- these are delivery receipt messages,
 specialized SMS messages with delivery info.

 Here's what I do:

    Step 1.  Put the contents of the message into a table.  ie. phone
    number, message.  This table has an auto-incrementing id.  It also has
    a field for "dlr" which is a small int, defaults to 0.

    Step 2.  I get the unique ID that the DB has given me for that row.
    THAT is my internal message ID.  For example, this is ID 42.

    Step 3.  I select the info from the DB for that row/ID, generate a DLR
    URL with one line that has this info in it:
        http://host/dlr.cgi?foo=%t&mysmsid=42&bar=%i

    Step 4.  When my dlr.cgi is called, I see that the message referenced
    is #42.  I go back to my DB, update that row with the type of message,
    as well as any other information.

    Step 5.  Add ALL the %x escape codes you can and have your script email
    you the output when a DLR report is called so you can see what
    information is available to you when the DLR report is done.

 Try that out.

Beckman
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[EMAIL PROTECTED]                             http://www.purplecow.com/
---------------------------------------------------------------------------



Reply via email to