Hi Ravi

I am also trying to do the same thing but I am a bit confused in the
process...

Basically, I need to track the messages from the very beginning like this

(a) My application sends a request to Kannel to send a SMS
(b) Together with the request, my application generate a SMS ID (so I know
this application is the one requesting it)
(c) Kannel accepts the request, remembers this SMS ID and proceed to try to
send the SMS.
(d) Kannel reports back DLR together with this SMS ID to the application.

The issue here is that the ID reported back is internally generated by
Kannel, not the original one that the application created so it is
meaningless to the application.

How did you get around it?

Also, I heard that using SQLBOX is more efficient and flexible but I can't
find a proper documentation for it.
Anyone knows where it might be?

Thank you very much!! 

-----Original Message-----
From: Ravi Bhalotia [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 27, 2007 11:30 PM
To: Ben Suffolk
Cc: users@kannel.org
Subject: Re: getting message_id from submit_sm_resp

Thanks a lot Ben, Seik and Fajar. All your pointers and advice are very
helpful and I am able to get it to work now. I am getting the message_id
from kannel now and storing in our database for lookup purpose with our SMSC
later.

Thanks again for the help, I recompiled kannel and installed it again. 
This time when I pass "%i" to the dlr-url, the kannel is being reported back
to my application. The logs idea from Ben is also excellent and I am writing
a process to do that to add another layer of checks for the messages.

- Ravi

Ben Suffolk wrote:
> Ravi,
>
> I don't recall what a rejected messages contains, but on a delivery 
> the DLR messages contents contain the id you want :
>
> [msg:122:id:0499484085 sub:001 dlvrd:001 submit date:0707270748 done
> date:0707270748 stat:DELIVRD err:000 text:.]
>
> Maybe you could parse it out of the messages.
>
> Regards
>
> Ben
>
> On 26 Jul 2007, at 23:00, Ravi Bhalotia wrote:
>
>> Thanks Seik. However, in my case the kannel ID is important, it is 
>> getting assigned a value of message_id that is being passed by the 
>> smsc we are using. So, in case of issues or messages getting rejected 
>> we need to store that ID in our database to look up in our SMSC's 
>> system. What I want to do is keep a lookup table of our application's 
>> unique IDS to the kannel ID that holds the value of message id 
>> returned from the smsc after submit_sm_resp is received.
>>
>> Any ideas on how to achieve that?
>>
>> Thanks for your response,
>> Ravi
>>
>> seik wrote:
>>> Hi Ravi,
>>>
>>> i use dlr-urls like this one:
>>>
>>>
"http://127.0.0.1/dlr.pgsql.php?smscID=%i&dlr=%d&answer=%A&to=%p&from=%P&ts=
%T&smsID=8e08a94122e147571029f30caf046cef&charset=%C&kannel_id=%I" 
>>>
>>>
>>> in general kannel_id is useless for me, it is for internal kannel 
>>> queues only i belive.
>>> but i have no problems getting it from the kannel dlr GET request
>>>
>>> use your unique smsid value, its just enough :)
>>>
>>> cheers
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Ravi Bhalotia [EMAIL PROTECTED]
>>> Sent: 26 ??? 2007 ?.
>>> To: seik
>>> Subject:getting message_id from submit_sm_resp
>>>
>>>> hi All - I am trying to get message_id from submit_sm_resp message 
>>>> and pass it to the application we are running through a dlr url. 
>>>> Passing a dlr-mask of 31 and a dlr-url but the message_id parameter 
>>>> seems to be omitted from the dlr-url. The dlr url is getting called 
>>>> but without the value filled in. Here are some logs:
>>>>
>>>
>>>
>>>> Adding DLR smsc=test, ts=8d161acc-0043-4220-8489-7b958fb5e716,
>>>> src=XXXXX, dst=1XXXXXXXXXX, mask=31, boxc=default
>>>> 2007-07-26 15:23:13 [7284] [7] DEBUG: SMSC[test]: creating DLR 
>>>> message
>>>> 2007-07-26 15:23:13 [7284] [7] DEBUG: SMSC[test]: DLR = 
>>>> http://localhost/dlr.php?smsid=5492&message_id=%I&type=%d
>>>>
>>>
>>>
>>>> I am passing smsid as part of the dlr url, so that is fine, but the 
>>>> other two parameters are not being populated at all.
>>>>
>>>
>>>
>>>> Am I doing something wrong? I am not setting msg-id-type value in 
>>>> the kannel.conf, as I want to use the default value of -1 for 
>>>> C-Strings. I have been going over the user guide multiple times to 
>>>> figure out what I am doing wrong, but cannot figure out. Can one of 
>>>> you guys help me to resolve this?
>>>>
>>>
>>>
>>>> Cheers,
>>>> -Ravi Bhalotia
>>>>
>>>
>>>
>>>
>>
>




Reply via email to