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:
Vadim Yanitskiy
2020-02-27 00:04:13 +07:00
parent 99affe1529
commit 7ba2428de5

View File

@@ -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)