Re[2]: smpp dlr problem
Jury Cherepanov <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | HighTech |
| Message-ID | <[email protected]> |
Hello Nisan,
Tuesday, May 06, 2003, 8:36:37 PM, you wrote:
NB> At 06:56 PM 5/6/03 +0200, you wrote:
>>On Dienstag, Mai 6, 2003, at 06:07 Uhr, Andrea Viscovich wrote:
>>
>>
>>>the ts is the same or 0002976249<>2976249?
>>
>>this is NOT the same. Its alphanumeric in some cases.
NB> we have changed the smpp behaviour here. Given that the following are the
NB> options
NB> * 0x00 deliver_sm dec, submit_sm_resp dec
NB> * 0x01 deliver_sm dec, submit_sm_resp hex
NB> * 0x02 deliver_sm hex, submit_sm_resp dec
NB> * 0x03 deliver_sm hex, submit_sm_resp hex
NB> The only cases we have to worry about are when the number bases are
NB> different. All others can be treated as the default octet string.
NB> So for
NB> * 0x01 deliver_sm dec, submit_sm_resp hex
NB> * 0x02 deliver_sm hex, submit_sm_resp dec
NB> We convert the dec component to to hex..
NB> And then some providers have trailing 0s in the deliver_sm or
NB> submit_sm_resp, but not necessarily in both PDUs..
NB> Sigh... SMPP 3.4 Spec... what spec? ;-)
NB> so what we do is
NB> in deliver_sm
if (smpp->>smpp_msg_id_type == 1) {
NB> char buf[64];
NB> sprintf(buf,"%Lx", atoll(octstr_get_cstr(msgid)));
NB> tmp = octstr_format("%s", buf);
NB> } else
NB> tmp = octstr_duplicate(msgid);
NB> /* strip leading zeros */
NB> octstr_strip_char(tmp,'0');
NB> And then in submit_sm_resp.
if (smpp->>smpp_msg_id_type == 2) {
NB> char buf[64];
NB> sprintf(buf,"%Lx",
NB> atoll(octstr_get_cstr(pdu->u.submit_sm_resp.message_id)));
NB> tmp = octstr_format("%s", buf);
NB> } else
NB> tmp = octstr_duplicate(pdu->u.submit_sm_resp.message_id);
NB> /* strip leading zeros */
NB> octstr_strip_char(tmp,'0');
NB> Anywant want a patch?
NB> Nisan
>>Andreas Fink
>>Global Networks Switzerland AG
>>
>>------------------------------------------------------------------
>>Tel: +41-61-6666333 Fax: +41-61-6666334 Mobile: +41-79-2457333
>>Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland
>>Web:
>><http://www.global-networks.ch/ >http://www.global-networks.ch/
>>[email protected]
>>------------------------------------------------------------------
>>
>>
>></blockquote></x-html>
Yep. I think that it's will be great to implement this into
Kannel/SmsBox.
---------------------------------------------------------
Jury Cherepanov
System Developer (Technical Director) , HIGH TECHNOLOGIES
Turaidas 2a, Riga, Latvia
Phone +371-9633398
mailto:[email protected]