[OpenSIPS-Users] SIP URI User Parameters

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jul 6 06:43:31 EDT 2017


Ben,

Exploring the "whole RURI modification" option - once you get rid of the 
user=phone param, you are safe for the rest of the processing. My idea 
was to strip that parameter in the very beginning of the processing. 
After that, any DR processing will be safe.

Something like:

subst_uri('/^(.+);user=phone([^@]*)$/\1\2/i');

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/05/2017 08:16 PM, Ben Newlin wrote:
>
> Bogdan,
>
> Thanks for your suggestion to modify the whole RURI. While this will 
> work for our modifications, we have no control over how modules like 
> Dynamic Routing access the RURI and that module’s functions are also 
> causing the error to occur. So this will not work.
>
> However, I have found that using revert_uri within failure_route will 
> remove the user params prior to performing routing and so prevents the 
> issue. We can then add the user params back before sending out the 
> next branch. This workaround is of course specific to our current use 
> case, where we are always injecting the user params ourselves. It 
> would not work if the user params were present in the original 
> received RURI.
>
> We will continue with this workaround until we can upgrade to version 
> 2. Thanks again for your help.
>
> Ben Newlin
>
> *From: *Bogdan-Andrei Iancu <bogdan at opensips.org>
> *Date: *Wednesday, July 5, 2017 at 10:46 AM
> *To: *Ben Newlin <Ben.Newlin at genesys.com>, OpenSIPS users mailling 
> list <users at lists.opensips.org>
> *Subject: *Re: [OpenSIPS-Users] SIP URI User Parameters
>
> Hi Ben,
>
> The fix is present on trunk (2.4), 2.3 and 2.2 (the currently 
> maintained versions). Indeed, the 1.11 does not have the fix. You can 
> easily apply the fix on your 1.11 code via this patch - 
> https://github.com/OpenSIPS/opensips/commit/91c14ce679f80c8b4888769004c08039da2fc805.patch 
> . It should be 100% compatible.
>
> Otherwise, you can try to get rid of user=phone in the URI by doing 
> changes over the full RURI (to avoid its parsing) - like a subst over 
> the full RURI.
>
> Regards,
>
> Bogdan-Andrei Iancu
>    OpenSIPS Founder and Developer
>    http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2017, Houston, US
>    http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>
> On 07/05/2017 05:32 PM, Ben Newlin wrote:
>
>     Bogdan,
>
>     Thanks for your work to find the issue. I do agree that the usage
>     of the “user=phone” parameter is not well defined and a bit
>     ambiguous. However, I think your action is correct as it should be
>     the responsibility of the end gateway to do any necessary SIP ->
>     Tel conversion, not the proxy. And especially not a partial
>     conversion. :)
>
>     Just to clarify, where was the change you made submitted? I know
>     1.11 is no longer supported, but we are still using it and are not
>     ready to upgrade yet due to the many script changes necessary to
>     use 2.X. If this change cannot be added to 1.11, do you have any
>     suggestions for a workaround? I haven’t found anything yet, but
>     I’ve yet to try using revert_uri in the failure route to remove
>     the user params before any other processing. Do you think this
>     will work?
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170706/74d63a52/attachment-0001.html>


More information about the Users mailing list