<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 6: Code-Review-1</p><p style="white-space: pre-wrap; word-wrap: break-word;">(2 comments)</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">From 3GPP TS 24.008, EF-MSISDN, following is my understanding</p><p style="white-space: pre-wrap; word-wrap: break-word;">The total length of EF-MSISDN Record length is X+14 bytes, where the first X bytes are Alpha identifier, so the actual number (not supporting extension number, just 10 bytes Dialing number max) will be present in the last 14 bytes (includes BCD length, TON/NPI Capability/Configuration2 Record Identifier and Extension5 Record Identifier as well) of "res".</p><p style="white-space: pre-wrap; word-wrap: break-word;">Hence,</p><p style="white-space: pre-wrap; word-wrap: break-word;">x_bytes = (len(res)/2) - 14<br># xbytes here is the length of alpha identifier in "res"</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Since in "res" each element (e.g. res[0]) is 4 bits, the BCD length is present in "res" <br> between indexes (x_bytes * 2) and (x_bytes * 2) + 2</pre><p style="white-space: pre-wrap; word-wrap: break-word;">Similarly, TON/NPI is present in next byte after BCD length and so on so forth</p><p style="white-space: pre-wrap; word-wrap: break-word;">Please correct me if I am wrong. </p><p style="white-space: pre-wrap; word-wrap: break-word;">P.S: I have verified the MSISDN programmed on the SIM represented in the same way as it was programmed</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/16947">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/16947">change 16947</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/16947"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 </div>
<div style="display:none"> Gerrit-Change-Number: 16947 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-Assignee: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 Jan 2020 15:05:35 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>