Re: smpp dlr problem
Nisan Bloch <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
we have changed the smpp behaviour here. Given that the following are the
options
* 0x00 deliver_sm dec, submit_sm_resp dec
* 0x01 deliver_sm dec, submit_sm_resp hex
* 0x02 deliver_sm hex, submit_sm_resp dec
* 0x03 deliver_sm hex, submit_sm_resp hex
The only cases we have to worry about are when the number bases are
different. All others can be treated as the default octet string.
So for
* 0x01 deliver_sm dec, submit_sm_resp hex
* 0x02 deliver_sm hex, submit_sm_resp dec
We convert the dec component to to hex..
And then some providers have trailing 0s in the deliver_sm or
submit_sm_resp, but not necessarily in both PDUs..
Sigh... SMPP 3.4 Spec... what spec? ;-)
so what we do is
in deliver_sm
if (smpp->smpp_msg_id_type == 1) {
char buf[64];
sprintf(buf,"%Lx", atoll(octstr_get_cstr(msgid)));
tmp = octstr_format("%s", buf);
} else
tmp = octstr_duplicate(msgid);
/* strip leading zeros */
octstr_strip_char(tmp,'0');
And then in submit_sm_resp.
if (smpp->smpp_msg_id_type == 2) {
char buf[64];
sprintf(buf,"%Lx",
atoll(octstr_get_cstr(pdu->u.submit_sm_resp.message_id)));
tmp = octstr_format("%s", buf);
} else
tmp = octstr_duplicate(pdu->u.submit_sm_resp.message_id);
/* strip leading zeros */
octstr_strip_char(tmp,'0');
Anywant want a patch?
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>