Hello,

The line that generates the error is:
    $ru = $var(ds);

In such an assignment, the value you push in $ru must be valid SIP URI...but you have a list of URIs there :).

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.

Regards,

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

On 15.02.2014 00:07, Hiers, David wrote:
Hi folks,
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:
$var(ds) =  $ru;
while(use_next_gw()) {
        $var(ds) = $var(ds) + "," + $ru;
}
$ru = $var(ds);
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 $ru = $var(ds): Xlog statement showing the value of $var(ds) and $ru before executing $ru = $var(ds): : ACTION: ru is now 'sip:[email protected]', var(ds) is now 'sip:[email protected],sip:[email protected],sip:[email protected]'
Log output from assignment statement:
: ERROR:core:parse_uri: bad port in uri (error at char @ in state 8) parsed: <sip:[email protected],sip:9712258888>(44) /<sip:[email protected],sip:[email protected],sip:[email protected]> (89) : ERROR:core:parse_sip_msg_uri: bad uri <sip:[email protected],sip:[email protected],sip:[email protected]>
: DBG:core:set_err_info: ec: 1, el: 3, ei: 'error parsing r-uri'
: ERROR:core:pv_get_ruri: failed to parse the R-URI
Xlog statement showing the value of $var(ds) and $ru:
: ACTION: ru is now '<null>', var(ds) is now 'sip:[email protected],sip:[email protected],sip:[email protected]' Even though the log show that $ru is empty, I send a 302 with the desired 3 contacts in the correct order:
SIP/2.0 302 moved
Via: SIP/2.0/UDP 172.16.250.133:5060;branch=z9hG4bK-1134-1-0
From: USER X2092002222X <sip:[email protected]:5060>;tag=1
To: IPNS-TEST CALL<sip:[email protected]:5060>;tag=f9fce5da52de3d8ea163745714675c40.4b2d
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: <sip:[email protected],sip:[email protected],sip:[email protected]>
Server: OpenSIPS (1.10.0-notls (x86_64/linux))
Content-Length: 0
If I remove the $ru = $var(ds)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.
What am I doing wrong?
David
------------------------------------------------------------------------


          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.



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to