Re: Cannot retrieve receipted_message_id in deliver_sm using meta-datapatch

"Alejandro Guerrieri" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Stipe,

Did it a time ago, but forgot to put [PATCH] on the subject, so it probably
went through unnoticed :P

Here's the original patch with comments: http://www.blogalex.com/archives/10

Copied here for reference:

This patch adds support for the "%w" key on DLR's, to get the message_id
from the SMSC on SMPP connections.

Explanation: When Kannel sends an MT over an SMPP connection, a submit_sm
PDU is sent. The carrier responds with a submit_sm_response, carrying a
"message_id" attribute. If we have  proper dlr-mask set, this event (the
carrier accepting the message) causes Kannel to hit the dlr-url (even if the
carrier's not sending DLR's).

After applying the patch, a new parameter %w could be added to the dlr-url,
which will be loaded with the message_id from the SMSC. This can be useful
to correlate sent messages with the carriers response.
This new minor addition adds support for data_sm and deliver_sm as well, so
%w have meaning on get/post-url as well.

Regards,

Alejandro

On Wed, Oct 29, 2008 at 3:55 PM, Stipe Tolj <[email protected]> wrote:

> Alejandro Guerrieri schrieb:
>
>> Sorry for the delay, but didn't have a chance to test this against a real
>> link before.
>>
>> You're right, since Kannel captures the TLV before, it doesn't make it
>> into
>> the TLV handler.
>>
>> The receipted_message_id TLV is somewhat "special" since it's used
>> internally by kannel as well.
>>
>> Please use this small patch that extends my "%w" patch and allows the
>> parameter also on deliver_sm and data_sm PDU's. You'll then be able to
>> access the parameter on the %w variable as well.
>>
>> =CUT HERE=======================================================
>> Index: gw/smsc/smsc_smpp.c
>> ===================================================================
>> RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
>> retrieving revision 1.101.2.5
>> diff -u -r1.101.2.5 smsc_smpp.c
>> --- gw/smsc/smsc_smpp.c 21 Oct 2008 12:50:46 -0000      1.101.2.5
>> +++ gw/smsc/smsc_smpp.c 27 Oct 2008 20:47:15 -0000
>> @@ -463,6 +464,9 @@
>>     msg->sms.binfo = pdu->u.deliver_sm.service_type;
>>     pdu->u.deliver_sm.service_type = NULL;
>>
>> +    msg->sms.smsc_msg_id = pdu->u.deliver_sm.receipted_message_id;
>> +    pdu->u.deliver_sm.receipted_message_id = NULL;
>>
>
> msg->sms.smsc_msg_id ??? never heard of this msg field ;)
>
> Alejandro, can you let us know what your patch does and if it intended to
> be proposed to the mailing list for CVS inclusion?
>
> Stipe
>
> --
> -------------------------------------------------------------------
> Kölner Landstrasse 419
> 40589 Düsseldorf, NRW, Germany
>
> tolj.org system architecture      Kannel Software Foundation (KSF)
> http://www.tolj.org/              http://www.kannel.org/
>
> mailto:st_{at}_tolj.org <st_%7Bat%7D_tolj.org>           mailto:
> stolj_{at}_kannel.org <stolj_%7Bat%7D_kannel.org>
> -------------------------------------------------------------------
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.