[sr-dev] [kamailio/kamailio] Incorrect translation of tel: uri to sip: uri in tel2sip() (#1173)

Donald Carr notifications at github.com
Wed Jul 12 21:12:00 CEST 2017


@juha-h, @miconda ,

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. 

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. 

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.

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. 

I think it would be best to give a simple/fast version and a standards compliant version.

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.

-- 
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1173#issuecomment-314868356
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170712/4c3fc0cc/attachment.html>


More information about the sr-dev mailing list