<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><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 'sip:9712258888@172.16.250.134', var(ds) is now 'sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134'</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: <sip:9712258888@172.16.250.129,sip:9712258888>(44) /<sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134> (89)</font></div>
<div><font face="Courier New">: ERROR:core:parse_sip_msg_uri: bad uri <sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134></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 'sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134'</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 <sip:2092002222@172.16.250.133:5060>;tag=1</font></div>
<div><font face="Courier New">To: IPNS-TEST CALL<sip:9712258888@172.16.250.130:5060>;tag=f9fce5da52de3d8ea163745714675c40.4b2d</font></div>
<div><font face="Courier New">Call-ID: 1-1134@172.16.250.133</font></div>
<div><font face="Courier New">CSeq: 1 INVITE</font></div>
<div><font face="Courier New">Contact: <sip:9712258888@172.16.250.129,sip:9712258888@172.16.250.133,sip:9712258888@172.16.250.134></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><P><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>
</P></DIV>
</body>
</html>