<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hello,<br>
<br>
The line that generates the error is:<br>
$ru = $var(ds);<br>
<br>
In such an assignment, the value you push in $ru must be valid
SIP URI...but you have a list of URIs there :).<br>
<br>
If you want to iterate and add them for 3xx replies, better add
the additional URIs via the append_branch() function - add them
as additional branches.<br>
<br>
Regards,<br>
</tt>
<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></pre>
On 15.02.2014 00:07, Hiers, David wrote:<br>
</div>
<blockquote
cite="mid:CFEC2ABD93715E4B96AAD927F5AAB44C548A6172@DSXMBX1HE.ds.ad.adp.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font size="2" face="Calibri"><span style="font-size:11pt;">
<div>Hi folks,</div>
<div>I'm running 1.10 and building a script variable by
concatenating the values that I find in $ru as I run through
a use_next_gw() loop. Roughly, the code looks like this:</div>
<div> </div>
<div><font face="Courier New">$var(ds) = $ru;</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New">while(use_next_gw()) {</font></div>
<div><font face="Courier New"> $var(ds) = $var(ds) +
"," + $ru;</font></div>
<div><font face="Courier New">}</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New">$ru = $var(ds);</font></div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>It runs along pretty well, and I actually get the contact
list that I want in the 302 that I send, but I'm logging
some errors. Here's my debug log that covers the statement
<font face="Courier New">$ru = $var(ds)</font>:</div>
<div> </div>
<div> </div>
<div>Xlog statement showing the value of $var(ds) and $ru
before executing <font face="Courier New">$ru = $var(ds)</font>:</div>
<div><font face="Courier New">: ACTION: ru is now
'<a class="moz-txt-link-abbreviated" href="mailto:sip:9712258888@172.16.250.134">sip:9712258888@172.16.250.134</a>', var(ds) is now
'<a class="moz-txt-link-abbreviated" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134">sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134</a>'</font></div>
<div> </div>
<div> </div>
<div>Log output from assignment statement:</div>
<div><font face="Courier New">: ERROR:core:parse_uri: bad port
in uri (error at char @ in state 8) parsed:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888"><sip:9712258888@172.16.250.129,sip:9712258888></a>(44)
/<a class="moz-txt-link-rfc2396E" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134"><sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134></a>
(89)</font></div>
<div><font face="Courier New">: ERROR:core:parse_sip_msg_uri:
bad uri
<a class="moz-txt-link-rfc2396E" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134"><sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134></a></font></div>
<div><font face="Courier New">: DBG:core:set_err_info: ec: 1,
el: 3, ei: 'error parsing r-uri'</font></div>
<div><font face="Courier New">: ERROR:core:pv_get_ruri: failed
to parse the R-URI</font></div>
<div> </div>
<div> </div>
<div>Xlog statement showing the value of $var(ds) and $ru:</div>
<div><font face="Courier New">: ACTION: ru is now
'<null>', var(ds) is now
'<a class="moz-txt-link-abbreviated" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134">sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134</a>'</font></div>
<div> </div>
<div> </div>
<div> </div>
<div>Even though the log show that $ru is empty, I send a 302
with the desired 3 contacts in the correct order:</div>
<div> </div>
<div> </div>
<div><font face="Courier New">SIP/2.0 302 moved</font></div>
<div><font face="Courier New">Via: SIP/2.0/UDP
172.16.250.133:5060;branch=z9hG4bK-1134-1-0</font></div>
<div><font face="Courier New">From: USER X2092002222X
<a class="moz-txt-link-rfc2396E" href="mailto:sip:2092002222@172.16.250.133:5060"><sip:2092002222@172.16.250.133:5060></a>;tag=1</font></div>
<div><font face="Courier New">To: IPNS-TEST
CALL<a class="moz-txt-link-rfc2396E" href="mailto:sip:9712258888@172.16.250.130:5060"><sip:9712258888@172.16.250.130:5060></a>;tag=f9fce5da52de3d8ea163745714675c40.4b2d</font></div>
<div><font face="Courier New">Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:1-1134@172.16.250.133">1-1134@172.16.250.133</a></font></div>
<div><font face="Courier New">CSeq: 1 INVITE</font></div>
<div><font face="Courier New">Contact:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134"><sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134></a></font></div>
<div><font face="Courier New">Server: OpenSIPS (1.10.0-notls
(x86_64/linux))</font></div>
<div><font face="Courier New">Content-Length: 0</font></div>
<div><font face="Courier New"> </font></div>
<div> </div>
<div> </div>
<div>If I remove the <font face="Courier New">$ru = $var(ds</font><font
face="Courier New">)</font><font face="Courier New"> </font>statement,
my 302 has just the last (.134) URI in the contact list and
no errors are logged, so it is pretty clear that this
statement is the one that is building the final ru and
causing all the fuss in the log.</div>
<div> </div>
<div>What am I doing wrong?</div>
<div> </div>
<div> </div>
<div>David</div>
<div> </div>
<div> </div>
</span></font>
<div>
<hr>
<h5><font color="grey">This message and any attachments are
intended only for the use of the addressee and may contain
information that is privileged and confidential. If the
reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are
hereby notified that any dissemination of this communication
is strictly prohibited. If you have received this
communication in error, please notify us immediately by
e-mail and delete the message and any attachments from your
system. </font></h5>
</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>