<p></p>
<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/alexyosifov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexyosifov">@alexyosifov</a> ,</p>
<p>a little comment regarding the fill bits, it's just for information.<br>
There is a more easy way to perform decoding and encoding of 7bit concatenated sms.</p>
<p>Let me explain</p>
<p>3GPP has added the fill bits for retro compatibility with old devices that doesn't support the concatenated sms and then the UDH header.<br>
With this assumption the decoding of entire PDU may be done with the effect of first N ASCII characters (due to udh header) are not valid but the rest is ok. So it's possible to decode the entire user-data pdu as a normal non udh pdu discarding the first N decoded ASCII string.<br>
N is equal to the septet of udh header + 1</p>
<p>In encoding the concept is the same, just add N preamble (3GPP recommends N '\n') characters to the ASCII string, encode as 7bit and overwrite the initial octets with the UDH header.</p>
<p>Hope my comment was useful<br>
Regards</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2756#issuecomment-855064337">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLHEROJRBN2S3MUZBLTRFJBRANCNFSM456ET6RQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOODHYNGEA54OYJZA3TRFJBRA5CNFSM456ET6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGL3T6EI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2756#issuecomment-855064337",
"url": "https://github.com/kamailio/kamailio/pull/2756#issuecomment-855064337",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>