mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
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')
|
||||
# International number 10.5.118/3GPP TS 24.008
|
||||
if (ton & 0x01) == 0x01:
|
||||
if ton == 0x01:
|
||||
msisdn = '+' + msisdn
|
||||
|
||||
return (npi, ton, msisdn)
|
||||
|
||||
Reference in New Issue
Block a user