<p><a href="https://github.com/juha-h" class="user-mention">@juha-h</a>, <a href="https://github.com/miconda" class="user-mention">@miconda</a> ,</p>
<p>On making a "normalizing" function. I could do that to remove the visual separators from the "phone-context" field when it is a phone number, and, also, pre-sort the parameters in the tel: uri, so that when the current (light weight) function pulls them, the parameters are already in the sorted order, and there are no visual separators in the "phone-context" field.</p>
<p>A little more tricky, I could also delete the "phone-context" field from the tel: uri when it is a domain, assuming that the host name was already pulled out. But, if this was done before domain was extracted, it would cause an error (basically losing the domain). Currently, the domain in the "hostpart" variable is inserted after the "@" sign, and the contents in the "phone-context" field is inserted as is.</p>
<p>Also, in this case, there can be no logic in deciding which domain to select (the one in the "hostpart", or the one in the "phone-context" It seems that the hostpart is currently pulled using cscf_get_realm_from_uri(), so, theoretically, the variable "hostpart" and the contents of "phone-context" should always be the same.</p>
<p>Ok, in any case, I think it would be a little confusing to have a pre-filter that creates a special format of a tel: uri such that an existing translator will end up creating a standards compliant sip: uri.</p>
<p>I think it would be best to give a simple/fast version and a standards compliant version.</p>
<p>The existing function does try to do part of the standards in that it converts everything to lower case, and, removes visual separators from the phone number digits before the first semi-colon.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you were mentioned.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1173#issuecomment-314868356">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSaHScVHtbWsCM4NQAnJ-z0Bt1KKks5sNRqAgaJpZM4OJzVh">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUjvde44RYqsHVJR794XzzFsTkQ2ks5sNRqAgaJpZM4OJzVh.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-314868356"></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: @juha-h, @miconda ,\r\n\r\nOn making a \"normalizing\" function. I could do that to remove the visual separators from the \"phone-context\" field when it is a phone number, and, also, pre-sort the parameters in the tel: uri, so that when the current (light weight) function pulls them, the parameters are already in the sorted order, and there are no visual separators in the \"phone-context\" field. \r\n\r\nA little more tricky, I could also delete the \"phone-context\" field from the tel: uri when it is a domain, assuming that the host name was already pulled out. But, if this was done before domain was extracted, it would cause an error (basically losing the domain). Currently, the domain in the \"hostpart\" variable is inserted after the \"@\" sign, and the contents in the \"phone-context\" field is inserted as is. \r\n\r\nAlso, in this case, there can be no logic in deciding which domain to select (the one in the \"hostpart\", or the one in the \"phone-context\" It seems that the hostpart is currently pulled using cscf_get_realm_from_uri(), so, theoretically, the variable \"hostpart\" and the contents of \"phone-context\" should always be the same.\r\n\r\nOk, in any case, I think it would be a little confusing to have a pre-filter that creates a special format of a tel: uri such that an existing translator will end up creating a standards compliant sip: uri. \r\n\r\nI think it would be best to give a simple/fast version and a standards compliant version.\r\n\r\nThe existing function does try to do part of the standards in that it converts everything to lower case, and, removes visual separators from the phone number digits before the first semi-colon."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1173#issuecomment-314868356"}}}</script>