<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Agalya,<br>
<br>
<tt>In<tt> the o<tt>n<tt>reply<tt>_route(), the lo<tt>gic seems
ok: <br>
<tt> * i<tt>f <tt>flag set -> drop and log<br>
<tt> * for a<tt>ll 180, set the flag.<br>
<tt>This shoul<tt>d allow onl<tt>y <tt>the
first 180 <tt>r<tt>eply to pass.<br>
<br>
<tt>But I do not understand wh<tt>at
is the purpose <tt>of</tt>
the relay2 r<tt>oute? the
onreply route should go
everything you need (in
term<tt>s of 180 logic).<br>
<br>
<tt>Regards,</tt><br>
</tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 27.07.2016 16:27, Ramachandran,
Agalya (Contractor) wrote:<br>
</div>
<blockquote
cite="mid:4bfa207a853f49eba59637064b77e650@COPDCEX28.cable.comcast.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<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:"Courier New \,serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Times New Roman \,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-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:blue">Hi Bogdan, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Yes you are
correct. Am trying to implement that logic. (</span><tt><span
style="font-size:10.0pt">keep and log the first 180, drop
the others)</span></tt><span style="color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Am giving you
snippet of onreply_route and relay2 attached here with this
mail.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">My intention is
just to log the response sent by OpenSIPS. For other
responses logic seems good and I could see that response
sent out are logged. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Only for 180
resposne, am not meeting my condition.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Correct me if am
wrong. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Agalya<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
[<a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
<br>
<b>Sent:</b> Wednesday, July 27, 2016 3:22 AM<br>
<b>To:</b> Ramachandran, Agalya (Contractor)
<a class="moz-txt-link-rfc2396E" href="mailto:Agalya_Ramachandran@comcast.com"><Agalya_Ramachandran@comcast.com></a>; 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> Re: [OpenSIPS-Users] Provisional
response handling in case of forking<o:p></o:p></span></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""><br>
<br>
<tt>First, take care that you can set and trigger only one
reply route per transaction !</tt><br>
<br>
<tt>Now, looking at your logic in the script, it does not
reflect your statement : keep and log the first 180, drop
the others <- is this correct ?</tt><br>
<br>
<tt>Best 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 moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 26.07.2016 21:26, 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 related to the below topic.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">When am
receiving more than 180 response from different
destinations , am sending 1<sup>st</sup> 180 to the caller
and dropping consecutive 180 ‘s.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">And this logic
is working fine.</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">Now I have a
scenario, where I need to log what are the responses sent
out of Opensips.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">My logic for
this is, am checking the flag value. If flag is set, log
the 1<sup>st</sup> 180 response, reset the flag and drop
the remaining 180 response.</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 could see
FLAG_180 is set, and when I try to reset flag
<b>is not getting reset</b>. Is it not possible to reset
the flag values when relay is done?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">I have added a
route(relay2) in onreply_route Below is the snippet of
it.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Please guide me
if am doing something wrong.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">route[relay2] {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> if
($rs==100)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">
drop();</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> if
($rs==180) {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> if
(isflagset(FLAG_180)){</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">
xlog(<a moz-do-not-send="true"
href="INFO:opensips:Flagisset%5Cn">"INFO:opensips: Flag
is set \n"</a>);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">
resetflag(FLAG_180);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> }</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> else{</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">
drop();</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> }</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">
#setflag(FLAG_180);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> }</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> xlog(<a
moz-do-not-send="true"
href="INFO:opensips:Sending$rsresposneout%5Cn"><a class="moz-txt-link-rfc2396E" href="INFO:opensips:Sending$rsresposneout\n">"INFO:opensips:
Sending $rs resposne out \n"</a></a>);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">}</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">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
moz-do-not-send="true"
href="mailto:bogdan@opensips.org"><a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a></a>]
<br>
<b>Sent:</b> Monday, June 13, 2016 6:31 AM<br>
<b>To:</b> OpenSIPS users mailling list <a
moz-do-not-send="true"
href="mailto:users@lists.opensips.org">
<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a></a>; Ramachandran,
Agalya (Contractor) <a moz-do-not-send="true"
href="mailto:Agalya_Ramachandran@comcast.com">
<Agalya_Ramachandran@comcast.com></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"> <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",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
<a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294290">http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294290</a>)
in combination with flags, to record when the an 180
reply was set.
</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">Like:</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
<br>
</span><tt><span style="font-size:10.0pt">if ($rs==180) {</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
</span><tt><span style="font-size:10.0pt"> if
(isflagset(FLAG_180))</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
</span><tt><span style="font-size:10.0pt"> drop();</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
</span><tt><span style="font-size:10.0pt">
setflag(FALG_180);</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",serif"><br>
</span><tt><span style="font-size:10.0pt">}</span></tt><span
style="font-size:10.0pt;font-family:"Courier New
,serif",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:"Courier New
,serif",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",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 moz-do-not-send="true" 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"> <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"> <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"> <o:p></o:p></p>
<p class="MsoNormal">Regards,<br>
Agalya<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><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 moz-do-not-send="true" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" 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"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>