forked from public/pysim
utils: fix dec_msisdn(): properly detect international numbers
We should match the whole value of ToN, not just one LSB bit. Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1
This commit is contained in:
@@ -295,7 +295,7 @@ def dec_msisdn(ef_msisdn):
|
|||||||
|
|
||||||
msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f')
|
msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f')
|
||||||
# International number 10.5.118/3GPP TS 24.008
|
# International number 10.5.118/3GPP TS 24.008
|
||||||
if (ton & 0x01) == 0x01:
|
if ton == 0x01:
|
||||||
msisdn = '+' + msisdn
|
msisdn = '+' + msisdn
|
||||||
|
|
||||||
return (npi, ton, msisdn)
|
return (npi, ton, msisdn)
|
||||||
|
|||||||
Reference in New Issue
Block a user