Re: SMPP's network_error_code TLV

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Victor,

seems you misunderstand SMPP spec. 

network_error_code is Octetstring with a size of 3.
The first Octet is network type and the rest is error code.

So for you example (GSM and error code 0xff)m it would be: 3ff

Thanks,
Alexander Malysh

Am 02.08.2010 um 09:37 schrieb Victor Luchitz:

> Hello.
> 
> SMPP smsc handles the network_error_code TLV as 3-octets C-string,
> which seems to be in accordance with the spec, at least at the first
> glance. However, the spec also further refines this tag is a set of
> two independent integer values: single-octet network code and
> two-octets error code.
> For example, a value of 0x0300ff (in hex) is a perfectly valid value
> for this tag, representing an error with code 0xff in a GSM network.
> I'm not 100% sure bearerbox wouldn't choke on reading such a value
> (since the supposed string is prematurely terminated), but what I am
> sure is that one can't write a value such as 0x0300ff into this tag if
> it's represented as a C-string. So, to able to fully use this TLV in
> say, smppbox, this TLV has to be represented as a 3-octets integer
> value. That renders this tag unusable for the err: field in SMPP
> delivery receipts but it was never intended to be used as such despite
> bearing a similar name.
> 
> So I'm attaching a patch that changes representation of the
> network_error_code TLV to a 3-octets integer and removes its usage for
> in handle_dlr.
> 
> -- 
> Best regards,
>  Victor Luchitz
> <network_error_code.patch>
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.