<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";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* 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:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {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:windowtext">Hi Bogdan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks for your kind response. Am clear now.&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Agalya<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</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> Monday, June 13, 2016 4:59 PM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) &lt;Agalya_Ramachandran@comcast.com&gt;; OpenSIPS users mailling list &lt;users@lists.opensips.org&gt;<br>
<b>Subject:</b> Re: [OpenSIPS-Users] Provisional response handling in case of forking<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</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:&quot;Courier New&quot;"><br>
<br>
<tt>For the first 180, the flag is not set (by default, the flags are off), so no drop will be done and the execution will get to the setflag(), setting the flag. (only the drop is under the IF).</tt><br>
<br>
<tt>Regards,</tt><br>
<br>
</span><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 13.06.2016 22:48, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Bogdan,<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">OK. Got it. One more to question to understand the snippet you gave..<o:p></o:p></p>
<p class="MsoNormal">I have just commented my understanding of each snippet at the same line.<o:p></o:p></p>
<p class="MsoNormal">I don&#8217;t get why we need setflag(FLAG_180); after we drop the response.
<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">if ($rs==180) { //We are checking response is equal to 180
</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; if (isflagset(FLAG_180)) // Checking the flag is set or not. If response is 180, flag will be set</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drop();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //If set we are dropping the consecutive same response.
</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; setflag(FALG_180); ??</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">}</span></tt><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">(P.S) I tested without setting the flag after drop response. In this case it forwards both 180 response back to caller.
<o:p></o:p></p>
<p class="MsoNormal">Am curious how it controls it.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Is onreply_avp_mode controls dropping the 2nd response or setflag(FLAG_180);?<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">I want to be clear on what am working with. Hence posting you this question.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">&nbsp;</span></tt><o:p></o:p></p>
<p class="MsoNormal">Regards,<br>
Agalya<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</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> Monday, June 13, 2016 12:13 PM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) <a href="mailto:Agalya_Ramachandran@comcast.com">
&lt;Agalya_Ramachandran@comcast.com&gt;</a>; OpenSIPS users mailling list <a href="mailto:users@lists.opensips.org">
&lt;users@lists.opensips.org&gt;</a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] Provisional response handling in case of forking</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">&nbsp;<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:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">It is not a predefine flag. And you do not have to define the flags in OpenSIPS. Just pickup a name and start using it in script.</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">Regards,</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,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 13.06.2016 17:27, Ramachandran, Agalya (Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Bogdan,<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Thank you for your kind response. I will try the logic you told me. But I have a question in the below logic.<o:p></o:p></p>
<p class="MsoNormal">&#8220;FLAG_180&#8221;, is this something declared and maintained by opensips and set by default on its own if Ringing response is received or we need to define this flag explicitly ?<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">E.g for setting NAT flag, we are using &#8216;usrloc&#8217; module and &#8216;nat_bflag&#8217; as parameter and then value.<o:p></o:p></p>
<p class="MsoNormal">modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, &quot;NAT&quot;)<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Likewise if we need to define explicitly, what is the module in which we need to define the flag for FLAG_180?
<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Agalya<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> Monday, June 13, 2016 6:31 AM<br>
<b>To:</b> OpenSIPS users mailling list <a href="mailto:users@lists.opensips.org">
&lt;users@lists.opensips.org&gt;</a>; Ramachandran, Agalya (Contractor) <a href="mailto:Agalya_Ramachandran@comcast.com">
&lt;Agalya_Ramachandran@comcast.com&gt;</a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] Provisional response handling in case of forking</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">&nbsp;<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:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">Use the onreply route (be sure to onreply_avp_mode to be set to 1 - see
</span></tt><a href="http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294290"><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif">http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294290</span></a><tt><span style="font-size:10.0pt">)
 in combination with flags, to record when the an 180 reply was set. </span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">Like:</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">if ($rs==180) {</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; if (isflagset(FLAG_180))</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drop();</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">&nbsp;&nbsp;&nbsp; setflag(FALG_180);</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
</span><tt><span style="font-size:10.0pt">}</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">The onreply_avp_mode 1 will ensure that the onreply route will not overlap for 2 replies .</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">Regards,</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New ,serif&quot;,serif"><br>
<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 10.06.2016 23:07, 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">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">We are using opensips for our project and we are currently using opensips as proxy.<o:p></o:p></p>
<p class="MsoNormal">Am forking the incoming sip call, to two destinations. It Rings in both Dest A and Dest B, as a result I get two 180 Ringing response from A and B.<o:p></o:p></p>
<p class="MsoNormal">I want to filter only the first incoming 180 Ringing response and send to the actual caller. Is there a way to do this in opensips config file?<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">I have seen drop() function which drops the complete provisional response. But in my case I have to forward one 180 Ringing to the caller.
<o:p></o:p></p>
<p class="MsoNormal">Can it be achieved by the changes in config file? Please guide me.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Regards,<br>
Agalya<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><br>
<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:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman \,serif&quot;">&nbsp;</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>