diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index e68866c4..4d1c3dcb 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -1152,12 +1152,12 @@ class ADF_USIM(CardADF): EF_ECC(), EF_CBMIR(service=16), EF_PSLOCI(), - EF_ADN('6f3b', None, 'EF.FDN', 'Fixed Dialling Numbers', service=[2, 89]), + EF_ADN('6f3b', None, 'EF.FDN', 'Fixed Dialling Numbers', service=[2, 89], ext=2), EF_SMS('6f3c', None, service=10), EF_MSISDN(service=21), EF_SMSP(service=12), EF_SMSS(service=10), - EF_ADN('6f49', None, 'EF.SDN', 'Service Dialling Numbers', service=[4, 89]), + EF_ADN('6f49', None, 'EF.SDN', 'Service Dialling Numbers', service=[4, 89], ext=3), EF_EXT('6f4b', None, 'EF.EXT2', 'Extension2 (FDN)', service=3), EF_EXT('6f4c', None, 'EF.EXT3', 'Extension2 (SDN)', service=5), EF_SMSR(service=11), @@ -1170,7 +1170,7 @@ class ADF_USIM(CardADF): EF_eMLPP(service=24), EF_AAeM(service=25), # EF_Hiddenkey - EF_ADN('6f4d', None, 'EF.BDN', 'Barred Dialling Numbers', service=6), + EF_ADN('6f4d', None, 'EF.BDN', 'Barred Dialling Numbers', service=6, ext=4), EF_EXT('6f55', None, 'EF.EXT4', 'Extension4 (BDN/SSC)', service=7), EF_CMI(service=6), EF_EST(service=[2, 6, 34, 35]), @@ -1186,11 +1186,11 @@ class ADF_USIM(CardADF): TransparentEF('6fc4', None, 'EF.NETPAR', 'Network Parameters'), EF_PNN('6fc5', 0x19, service=45), EF_OPL(service=46), - EF_ADN('6fc7', None, 'EF.MBDN', 'Mailbox Dialling Numbers', service=47), + EF_ADN('6fc7', None, 'EF.MBDN', 'Mailbox Dialling Numbers', service=47, ext=6), EF_EXT('6fc8', None, 'EF.EXT6', 'Extension6 (MBDN)'), EF_MBI(service=47), EF_MWIS(service=48), - EF_ADN('6fcb', None, 'EF.CFIS', 'Call Forwarding Indication Status', service=49), + EF_ADN('6fcb', None, 'EF.CFIS', 'Call Forwarding Indication Status', service=49, ext=7), EF_EXT('6fcc', None, 'EF.EXT7', 'Extension7 (CFIS)'), TransparentEF('6fcd', None, 'EF.SPDI', 'Service Provider Display Information', service=51), EF_MMSN(service=52), diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index df1bfedb..8196a55f 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -358,14 +358,15 @@ class ExtendedBcdAdapter(Adapter): # TS 51.011 Section 10.5.1 class EF_ADN(LinFixedEF): - def __init__(self, fid='6f3a', sfid=None, name='EF.ADN', desc='Abbreviated Dialing Numbers', **kwargs): + def __init__(self, fid='6f3a', sfid=None, name='EF.ADN', desc='Abbreviated Dialing Numbers', ext=1, **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=(14, 30), **kwargs) + ext_name = 'ext%u_record_id' % ext self._construct = Struct('alpha_id'/COptional(GsmStringAdapter(Rpad(Bytes(this._.total_len-14)), codec='ascii')), 'len_of_bcd'/Int8ub, 'ton_npi'/TonNpi, 'dialing_nr'/ExtendedBcdAdapter(BcdAdapter(Rpad(Bytes(10)))), 'cap_conf_id'/Int8ub, - 'ext1_record_id'/Int8ub) + ext_name/Int8ub) # TS 51.011 Section 10.5.5 class EF_SMS(LinFixedEF): @@ -497,7 +498,7 @@ class DF_TELECOM(CardDF): super().__init__(fid=fid, name=name, desc=desc, **kwargs) files = [ EF_ADN(), - EF_ADN(fid='6f3b', name='EF.FDN', desc='Fixed dialling numbers'), + EF_ADN(fid='6f3b', name='EF.FDN', desc='Fixed dialling numbers', ext=2), EF_SMS(), LinFixedEF(fid='6f3d', name='EF.CCP', desc='Capability Configuration Parameters', rec_len=(14, 14)), @@ -507,7 +508,7 @@ class DF_TELECOM(CardDF): EF_SMSP(), EF_SMSS(), # LND - EF_ADN('6f49', None, 'EF.SDN', 'Service Dialling Numbers'), + EF_ADN('6f49', None, 'EF.SDN', 'Service Dialling Numbers', ext=3), EF_EXT('6f4a', None, 'EF.EXT1', 'Extension1 (ADN/SSC)'), EF_EXT('6f4b', None, 'EF.EXT2', 'Extension2 (FDN/SSC)'), EF_EXT('6f4c', None, 'EF.EXT3', 'Extension3 (SDN)'),