source-addr-ton can't be set on its own?
Giulio Harding <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all - we're trying to force the source address TON to 1 for some
binds where our carrier requires it. However, when I configured the
particular binds to force TON 1, like so:
source-addr-autodetect = false
source-addr-ton = 1
...subsequent MTs still had a TON of 2 - either the autodetect was
still working or my forced TON was being ignored.
Looking at the code, I see the following in gw/smpp/smpp_smsc.c
> /* Check for manual override of source ton and npi values */
> if(smpp->source_addr_ton > -1 && smpp->source_addr_npi > -1) {
> pdu->u.submit_sm.source_addr_ton = smpp->source_addr_ton;
> pdu->u.submit_sm.source_addr_npi = smpp->source_addr_npi;
> debug("bb.sms.smpp", 0, "SMPP[%s]: Manually forced source
> addr ton = %d, source add npi = %d",
> octstr_get_cstr(smpp->conn->id), smpp->source_addr_ton,
> smpp->source_addr_npi);
> } else {
> /* setup default values */
> pdu->u.submit_sm.source_addr_ton = GSM_ADDR_TON_NATIONAL; /
> * national */
> pdu->u.submit_sm.source_addr_npi = GSM_ADDR_NPI_E164; /*
> ISDN number plan */
> }
So, it turns out the source addr autodetect is being switched off ok,
but the source-addr-ton setting is being ignored. This is because I
haven't explicitly specified a source-addr-npi, so it defaults to -1
(i.e. unset). The source-addr-ton override only works if the source-
addr-npi has *also* been overridden.
Why is this? Is there some sort of explicit relationship between the
TON and NPI that means one can't be set without the other being set
as well? The carrier has no documentation about required NPI settings
- only TON, and the SMPP 3.4 spec doesn't seem to link the two in any
way (unless there's some higher level telecoms thing going on?)
Shouldn't Kannel treat the TON and NPI settings separately?
This also means that without source-addr-autodetect, the TON defaults
to 2, not 0 as the docs suggest. Is this correct?
Cheers,
--
Giulio Harding
Systems Administrator
m.Net Corporation
Level 2, 8 Leigh Street
Adelaide SA 5000, Australia
Tel: +61 8 8210 2041
Fax: +61 8 8211 9620
Mobile: 0432 876 733
Yahoo: giulio.harding
MSN: [email protected]
http://www.mnetcorporation.com
smime.p7s
(application/pkcs7-signature, 2.4 KB) - not displayed