[OpenSIPS-Users] OpenSIPS fails on urn:service:sos RURI

Vlad Paiu vladpaiu at opensips.org
Wed Apr 2 13:57:49 CEST 2014


Hello Anders,

I've just committed a fix for this on OpenSIPS trunk, see 
https://github.com/OpenSIPS/opensips/commit/edef0fd73cc03fbb9cd31191529cd9b988bb6394

The patch accepts urn:service type URIs and also allows the OpenSIPS 
script writer to extract the actual service that the request targets. 
Here a short script example that I've used to test

         if (is_method("INVITE") && $ru =~ "^urn:service") {
                 xlog("Received INVITE going to service $(ru{uri.host}) 
\n");
                 record_route();
                 t_relay("udp:192.168.2.134:5070");
                 exit;
         }

Patch was only comitted on trunk, so please apply the patch to your 
sources and re-test.

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 01.04.2014 21:48, Bogdan-Andrei Iancu wrote:
> Hello Anders,
>
> I was not aware of this RFC (to be honest its approach seems odd to me 
> as it is over-complicating such a simple problem - generic naming for 
> services) . OpenSIPS is not supporting URN schema. I haven;t read the 
> RFC in all details to understand if a SIP proxy is required to 
> actually support and parse such schema or it should simply act as a 
> blind forwarder for it (based on OBP info). The RFC keeps mentioning:
>
> <quote>
>
> Since service URNs are not routable, a SIP proxy or user agent has to
>    translate the service URN into a routable URI for a location-
>    appropriate service provider, such as a SIP URL
>
> </quote>
>
> I will do more digging into this.
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 19.03.2014 03:08, Anders Kristensen wrote:
>> I'm trying to route calls to emergency services through an OpenSIPS
>> proxy. It seems that the tm module fails because it (or OpenSIPS
>> itself) is unable to parse urn:service:sos RURI (defined in RFC 5031).
>>
>> Mar 18 17:27:31 [8807] ERROR:core:parse_uri: bad uri,  state 0 parsed:
>> <urn:> (4) / <urn:service:sos> (15)
>> Mar 18 17:27:31 [8807] ERROR:core:parse_sip_msg_uri: bad uri 
>> <urn:service:sos>
>> Mar 18 17:27:31 [8807] DBG:core:set_err_info: ec: 1, el: 3, ei: 'error
>> parsing r-uri'
>> Mar 18 17:27:31 [8807] ERROR:tm:new_t: uri invalid
>> Mar 18 17:27:31 [8807] ERROR:tm:t_newtran: new_t failed
>>
>> I'm routing the call using t_relay("udp:127.0.0.1:5070") so there
>> should be no real need to parse the RURI. (What I'd really like to do
>> instead is have the client insert a preloaded route in the INVITE and
>> have OpenSIPS route based on that and leave the RURI untouched.)
>>
>> A quick search shows that this exact issue came up back in 2008:
>> http://lists.sip-router.org/pipermail/users/2008-March/016680.html
>> Also, RFC 5031 was published in 2008 so I'm surprised if this is still
>> an issue. Can you experts think of *any* way to get OpenSIPS to send
>> an INVITE with RURI urn:service:sos? Preferably one that doesn't
>> involve writing a new module just for this purpose.
>>
>> I tried this with the latest OpenSIPS 1.10.
>>
>> Thanks,
>> Anders
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list