[Kamailio-Devel] How to check URI protocol ("sip", "sips", "tel") ? How to deal with a TEL URI ?
Iñaki Baz Castillo
ibc at aliax.net
Fri Mar 13 19:54:56 CET 2009
Hi, perhaps I miss something but I don't find how to retrieve the RURI
protocol (I don't mean the transport protocol but the URI protocol => sip,
sips, tel...).
I don't want to do:
if ($ru =~ "^tel:")
BTW I've realized that in case of receiving a TEL URI ("tel:+1234"), $rU shows
the TEL number ("+1234") but doing:
$rU = "+22222";
gives an error:
ERROR:core:parse_uri: bad host in uri (error at char
ERROR:core:parse_sip_msg_uri: bad uri <tel:+22222@>
ERROR:domain:is_uri_host_local: Error while parsing R-URI
It seems that using "$rU=" inmediatelly converts the URI into a SIP URI. How
to handle with a TEL URI number?
For example: imagine I receive a request with RURI as follows:
INVITE tel:999888777;phone-context=+34 SIP/2.0
It's a local number and I want to convert it into a TEL global number
(assuming "phone-context" contains the international prefix):
INVITE tel:+34999888777 SIP/2.0
I see no clear way to do it.
Other example: I receive a request like:
INVITE tel:+1234;custom-param=lalala SIP/2.0
and I want to change the number keeping the TEL parameters:
INVITE tel:+999991234;custom-param=lalala SIP/2.0
Which TEL URI operations does Kamailio provide? I would like to work on it.
Regards.
--
Iñaki Baz Castillo
More information about the Devel
mailing list