[OpenSIPS-Users] usage of setdsturi
Ramachandran, Agalya (Contractor)
Agalya_Ramachandran at comcast.com
Mon Nov 14 20:47:29 CET 2016
Thank you. Got it.
Regards,
Agalya
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Friday, November 11, 2016 8:33 AM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] usage of setdsturi
Hi, Agalya!
The setdsturi() function only accepts strings as parameters, not pseudo-variables[1]. As Ben suggested, the $du pseudo-variable is more flexible and recommended.
[1] http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc49
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>
On 11/10/2016 11:58 PM, Newlin, Ben wrote:
I would recommend just using $du. [1]
$du = “sip:” + $var(Fqdn) + “:5060”;
[1] http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc35
Ben Newlin
From: <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.org> on behalf of "Ramachandran, Agalya (Contractor)" <Agalya_Ramachandran at comcast.com><mailto:Agalya_Ramachandran at comcast.com>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>
Date: Thursday, November 10, 2016 at 4:35 PM
To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>
Subject: [OpenSIPS-Users] usage of setdsturi
Hi team,
I have a question in usage of setdsturi().
When I hardcode the uri in the function, such as setdsturi(“sip:test at test.com:5060<mailto:sip:test at test.com:5060>”) – this works.
But why I try to use script variable, it complains as bad_uri.
$var(test) = "sip:"+$var(Fqdn)+ ":5060";
setdsturi("$var(test)");
How do I setdsturi() dynamically, with the value in script variable and not by hardcoding?
Regards,
Agalya
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161114/79e7da38/attachment.htm>
More information about the Users
mailing list