Re: returning actual SMPP SMSC accept/deny status when using HTTP interface
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07.06.2008, at 01:48, Yang Zhao wrote: > Greetings, > > On Thu, 2008-06-05 at 07:58 +0200, Andreas Fink wrote: >> this feature exists, even though not in the way you might think. >> You can ask for a delivery report... > > This is not quite what I had queried about. I am aware of Kannel's DLR > capabilities and it is already being used. > > In case my original question was not clear, I am curious about what > changes would be required to enable content of the first DLR being > sent > back as the reply to a HTTP sendsms request. (See the first comment > block of delayed_http_reply() in smsbox.c) Think of: - SMPP connection is down, Kannel puts it into store file temporarely. - You dont ask for submission or buffered report but delivery or failure - Kannel has 100'000 other SMS'es to be sent out before its your turn. In those scenarios, the "first" delivery report might come very late. This is very tricky because it might take hours until you get the first delivery report. You don't want to have the HTTP session wait for so long as it will time out. For example only asking for delivery or failure could get you a reply as late as 7 days until the message expires! Phones can be off and switched on only a few hours /days later. The only thing which could be "instant" is the submission to the SMSC but even then this can take time if you have large bulks in the queue. > Again, I am more interested in why the internal workings of Kannel > currently prevent this from being easily added, and what can be done > to > actually add it. It's not a matter of how to achieve the > functionality I > want, but how to make Kannel do it in a more elegant way. Well basically you would have to have smsbox not reply the HTTP session and on incoming DLR reports from the SMSC, intercept and find the pending HTTP session to include the reply. But then again, do you still call the DLR? what do you do if the HTTP session is already timed out? You also need to add some "ask for the DLR" code on the incoming request. > (Incidentally, in 1.4.1, the message_id of a submit_sm_resp PDU cannot > actually be included in the DLR, and I had to patch Kannel myself to > work around this. Unless I'm mistaken, there's no data included in the > DLR that can be used to lookup the SMPP message_id returned as this > information is not passed on bearerbox.) That would be a useful patch to add I believe. For diagnostic use, this is often useful to have in the logs. Andreas Fink Fink Consulting GmbH Global Networks Schweiz AG BebbiCell AG IceCell ehf --------------------------------------------------------------- Tel: +41-61-6666330 Fax: +41-61-6666331 Mobile: +41-79-2457333 Address: Clarastrasse 3, 4058 Basel, Switzerland E-Mail: [email protected] www.finkconsulting.com www.global-networks.ch www.bebbicell.ch --------------------------------------------------------------- ICQ: 8239353 MSN: [email protected] AIM: smsrelay Skype: andreasfink Yahoo: finkconsulting SMS: +41792457333 http://a-fink.blogspot.com/ A developers view about iPhone SDK