<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi, Agalya!<br>
<br>
The setdsturi() function only accepts strings as parameters, not
pseudo-variables[1]. As Ben suggested, the $du pseudo-variable is
more flexible and recommended.<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc49">http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc49</a><br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 11/10/2016 11:58 PM, Newlin, Ben
wrote:<br>
</div>
<blockquote cite="mid:1B5505EA-045F-4856-A976-661B906AD1F1@inin.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:11.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;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        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-size:10.0pt;}
@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">I would recommend just using $du. [1]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">$du = “sip:” + $var(Fqdn) + “:5060”;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[1] <a moz-do-not-send="true"
href="http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc35">
http://www.opensips.org/Documentation/Script-CoreVar-2-2#toc35</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Ben
Newlin</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span
style="color:black"><a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a>
on behalf of "Ramachandran, Agalya (Contractor)"
<a class="moz-txt-link-rfc2396E" href="mailto:Agalya_Ramachandran@comcast.com"><Agalya_Ramachandran@comcast.com></a><br>
<b>Reply-To: </b>OpenSIPS users mailling list
<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Date: </b>Thursday, November 10, 2016 at 4:35 PM<br>
<b>To: </b>OpenSIPS users mailling list
<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Subject: </b>[OpenSIPS-Users] usage of setdsturi</span><span
style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Times New
Roman""><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:blue">Hi team, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">I have a question
in usage of setdsturi().
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">When I hardcode
the uri in the function, such as
setdsturi(“<a class="moz-txt-link-abbreviated" href="mailto:sip:test@test.com:5060">sip:test@test.com:5060</a>”) – this works.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">But why I try to
use script variable, it complains as bad_uri.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">$var(test) =
"sip:"+$var(Fqdn)+ ":5060";</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">setdsturi("$var(test)");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">How do I
setdsturi() dynamically, with the value in script variable
and not by hardcoding?
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Regards,<br>
Agalya</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>