<p>I have a fix just about ready for your review.  As noted, there can be some weird things in the telephone world!</p>
<p>There are a couple of not well defined issues. They more or less state that the objective of the sip: uri, is that two equivalent uris will always be the equivalent string, thus the need to sort the parameters and converting to lower case. That much is very clear. But, applying this same reasoning to the "phone-context" parameter, if it is a domain, then, it should be moved after the '@' symbol and not repeated as a "phone-context" parameter, as to have an equivalent string to one without the phone-context parameter.</p>
<p>For example, the following two are obviously equivalent, but, are not the same string:</p>
<p>sip:491234567891;phone-context=<a href="mailto:ims.tel.org@ims.tel.org">ims.tel.org@ims.tel.org</a>;user=phone<br>
sip:<a href="mailto:491234567891@ims.tel.org">491234567891@ims.tel.org</a>;user=phone</p>
<p>Also, they do not specifically state that visual separators should be removed from the "phone-context" parameter when it is a global phone number prefix, but, without removing them, we would again have the problem of equivalent sip uris not being equivalent strings.</p>
<p>For example, the following two are obviously equivalent, but, not the same string:</p>
<p>sip:1234567;phone-context=<a href="mailto:+52-33@ims.tel.org">+52-33@ims.tel.org</a>;user=phone<br>
sip:1234567;phone-context=<a href="mailto:+5233@ims.tel.org">+5233@ims.tel.org</a>;user=phone</p>
<p>If that all sounds good to you, I will submit a fix after more testing.</p>
<p>I have not messed with checking for clearly bad use of visual separators, I just silently remove all visual separators wherever they appear, as was done with the existing code.</p>
<p>Please let me know if you want any changes to the reasoning. You could also give me example tel: uris you would like me to test before submitting the fix.</p>
<p>Thanks for everything!</p>
<p>Don.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1173#issuecomment-313780749">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZalSTXn9E4Ebb-akk6-pUNXMqZIyks5sLpBVgaJpZM4OJzVh">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZSOtCNI4DwxaV0REqmIxo2pduNqhks5sLpBVgaJpZM4OJzVh.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1173#issuecomment-313780749"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@doncarr in #1173: I have a fix just about ready for your review.  As noted, there can be some weird things in the telephone world!\r\n\r\nThere are a couple of not well defined issues. They more or less state that the objective of the sip: uri, is that two equivalent uris will always be the equivalent string, thus the need to sort the parameters and converting to lower case. That much is very clear. But, applying this same reasoning to the \"phone-context\" parameter, if it is a domain, then, it should be moved after the '@' symbol and not repeated as a \"phone-context\" parameter, as to have an equivalent string to one without the phone-context parameter.  \r\n\r\nFor example, the following two are obviously equivalent, but, are not the same string:\r\n\r\nsip:491234567891;phone-context=ims.tel.org@ims.tel.org;user=phone\r\nsip:491234567891@ims.tel.org;user=phone\r\n\r\nAlso, they do not specifically state that visual separators should be removed from the \"phone-context\" parameter when it is a global phone number prefix, but, without removing them, we would again have the problem of equivalent sip uris not being equivalent strings. \r\n\r\nFor example, the following two are obviously equivalent, but, not the same string:\r\n\r\nsip:1234567;phone-context=+52-33@ims.tel.org;user=phone\r\nsip:1234567;phone-context=+5233@ims.tel.org;user=phone\r\n\r\nIf that all sounds good to you, I will submit a fix after more testing.\r\n\r\nI have not messed with checking for clearly bad use of visual separators, I just silently remove all visual separators wherever they appear, as was done with the existing code.\r\n\r\nPlease let me know if you want any changes to the reasoning. You could also give me example tel: uris you would like me to test before submitting the fix. \r\n\r\nThanks for everything! \r\n\r\nDon."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1173#issuecomment-313780749"}}}</script>