<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Ben<br>
<br>
I understand you add the npdi useraname parameter after performing
the initial do_routing() - if you do it in request or branch route
is not relevant (for RURI changes) as RURI is anyhow a per-branch
value.<br>
In failure route, when resuming, you will get the RURI of the
winning branch ( the one which was selected to be sent back to
caller), so you see the npdi param. <br>
<br>
So far so good. And now you do use_next_gw() in failure route and
you get "<span style="font-size:11.0pt"><a class="moz-txt-link-freetext" href="sip:+15555551212@gw2.com;npdi">sip:+15555551212@gw2.com;npdi</a>"
directly, without any another npdi addition ? I'm asking, as
use_next_gw() does a full RURI replacement (it doesn;t care what
is the existing RURI).<br>
<br>
Could you also do an<br>
xlog("DR ruris are <$(avp(___dr_ruri__)[*])>\n");<br>
right after do_routing() ?<br>
<br>
Regards,<br>
</span>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2017, Houston, US
<a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html">http://opensips.org/training/OpenSIPS_Bootcamp_2017.html</a>
</pre>
<div class="moz-cite-prefix">On 06/28/2017 11:41 PM, Ben Newlin
wrote:<br>
</div>
<blockquote
cite="mid:F54E25BA-AB4A-4A75-98BD-C6F1ECBBD796@genesys.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:Calibri;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:Calibri;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We have run
into an issue with OpenSIPs’ handling of user parameters in
SIP URIs with Dynamic Routing module. When a parameter is
added to a SIP URI user part, any subsequent modification of
the URI by DR module results in the parameter being moved to
be a URI parameter. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">For example,
starting with $ru of “<a class="moz-txt-link-freetext" href="sip:+15555551212@gw1.com”">sip:+15555551212@gw1.com”</a>, if we
modify it this way:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">$rU = $rU +
“;npdi”;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">then we get
a new $ru of “<a class="moz-txt-link-freetext" href="sip:+15555551212;npdi@gw1.com”">sip:+15555551212;npdi@gw1.com”</a>.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We send this
call out and if it returns an error we want to use the next
available gateway.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The Request
URI in the failure route is still
“<a class="moz-txt-link-freetext" href="sip:+15555551212;npdi@gw1.com”">sip:+15555551212;npdi@gw1.com”</a>.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Note: this
is the case even when the “;npdi” parameter was added in a
branch route, which I didn’t expect. I thought changes made
in a branch route were isolated to that branch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Now from the
failure route when we call use_next_gw the npdi parameter is
moved and the URI is now “<a class="moz-txt-link-freetext" href="sip:+15555551212@gw2.com;npdi”">sip:+15555551212@gw2.com;npdi”</a>.
This is not correct.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Is there
some other way to properly manipulate SIP URI user
parameters or is this a bug?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ben Newlin</span><o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>