<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \,serif";}
@font-face
        {font-family:"Courier New \,serif";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thank a lot Bogdan. I got it. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards,<br>
Agalya<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]
<br>
<b>Sent:</b> Wednesday, June 22, 2016 11:32 AM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) <Agalya_Ramachandran@comcast.com>; users@lists.opensips.org<br>
<b>Subject:</b> Re: [OpenSIPS-Users] DNS-SRV query in opensips<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
They are different. RURI is the part in request's first line, while the DURI is a an outbound proxy used just to finding the destination at network level (it will not be present in the SIP request).<br>
<br>
by using the set functions you do not create a new branch, you are just changing the RURI and DURI from the default branch. To create a new branch you have to use append_branch().<br>
<br>
Regards,<br>
<br>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 22.06.2016 17:13, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:blue">Hi Bogdan, </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">Request URI and destination URI are one and the same right?
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Basically what I understand from the below mail is , we can use both seturi and setdsturi to set a new branch.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Am I right?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"><br>
Regards,<br>
Agalya</span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Bogdan-Andrei Iancu [<a href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
<br>
<b>Sent:</b> Wednesday, June 22, 2016 3:15 AM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) <a href="mailto:Agalya_Ramachandran@comcast.com">
<Agalya_Ramachandran@comcast.com></a><br>
<b>Cc:</b> OpenSIPS users mailling list <a href="mailto:users@lists.opensips.org">
<users@lists.opensips.org></a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] DNS-SRV query in opensips</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi Agalya,</span></tt><span style="font-size:10.0pt;font-family:"Courier New \,serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">seturi() and setdsturi() set the RURI / DestinationURI for the current message / branch.</span></tt><span style="font-size:10.0pt;font-family:"Courier New \,serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">When you do an append_branch() a new branch is stored for serial/parallel forking (note that the current branch does not changes - this is branch number 1).</span></tt><span style="font-size:10.0pt;font-family:"Courier New \,serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">So, append_branch() will make a copy of the current branch (RURI, DURI, PATH, Forced Socket, etc) and store a new branch for later forking.
</span></tt><span style="font-size:10.0pt;font-family:"Courier New \,serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">Regards,</span></tt><span style="font-size:10.0pt;font-family:"Courier New \,serif""><br>
<br>
<br>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 21.06.2016 21:08, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:blue">Hi Bogdan,</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 regarding </span>
<i><span style="color:red">seturi</span></i><span style="color:blue"> and </span>
<i><span style="color:red">setdsturi</span></i><i><span style="color:blue"> </span>
</i><span style="color:blue">function calls.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">As far as my understanding, when append_branch() is called,
</span><span style="color:red">seturi () </span><span style="color:blue">is called to set the URI where to fork the call.</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 tried by calling only </span><i><span style="color:red">seturi ()</span></i><span style="color:red">
</span><span style="color:blue">function call, after append_branch it was working same behavior as when I used
</span><i><span style="color:red">setdsturi()</span></i><span style="color:red"> </span>
<span style="color:blue">as well.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">My question is do we really need </span>
<i><span style="color:red">setdsturi </span></i><span style="color:blue">or when is the case when
</span><i><span style="color:red">setdsturi()</span></i><span style="color:red"> </span>
<span style="color:blue">is used.?</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>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Bogdan-Andrei Iancu [<a href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
<br>
<b>Sent:</b> Tuesday, June 21, 2016 3:41 AM<br>
<b>To:</b> OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>>; Ramachandran, Agalya (Contractor) <<a href="mailto:Agalya_Ramachandran@comcast.com">Agalya_Ramachandran@comcast.com</a>>; Ramachandran, Agalya
(Contractor) <<a href="mailto:Agalya_Ramachandran@comcast.com">Agalya_Ramachandran@comcast.com</a>><br>
<b>Subject:</b> Re: [OpenSIPS-Users] DNS-SRV query in opensips</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><tt><span style="font-size:10.0pt">Hi Agalya,</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
<tt>OpenSIPS does full flavor DNS lookup (with NATPR and SRV), but this is internal, and not accessible from script. OpenSIPS implements auto DNS-based failover :</tt><br>
<tt> <a href="http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id293694">
http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id293694</a></tt><br>
<br>
<tt>My understanding is you want the DNS resolving to be done at script level and to have access to the results ?</tt><br>
<br>
<tt>Regards,</tt></span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 20.06.2016 20:35, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi team,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">We are using opensips for our project requirements.<o:p></o:p></p>
<p class="MsoNormal">I have a scenario where we need DNS-SRV query and the result of this should be placed as the desturi to send request out.(In case of forking call)<o:p></o:p></p>
<p class="MsoNormal">As far as I went through opensips documentation, there are some core parameters for dns related config such as “<a href="https://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc44"><span style="color:windowtext;text-decoration:none">dns_retr_time</span></a>”
,”<a href="https://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc44"><span style="color:windowtext;text-decoration:none">dns_retr_time</span></a>” ,”<a href="https://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc46"><span style="color:windowtext;text-decoration:none">dns_servers_no</span></a>”
etc… <o:p></o:p></p>
<p class="MsoNormal">According to my understanding these config variables can be declared and used in the opensips.config file to control the settings of DNS query.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Is there any available function where I can use and pass the DNS server domain name, so that it fetches the IP address of the host ?<o:p></o:p></p>
<p class="MsoNormal">Please let us know what is the best way to achieve this?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Agalya<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"><br>
<br>
<br>
<br>
</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
</body>
</html>