<div dir="ltr"><div><font color="#3366ff"><font><font face="tahoma,sans-serif">First, I am posting about the wrong behavior of CallControl (or most probably Kamailio modules) which leaves no option. </font></font></font><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif">I should be the only one deciding about how to handle timeouts. If I decide to take some risk, no module should oblige me to do otherwise.</span></div>

<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">Mediaproxy detects ONLY RTP timeouts from BOTH parties, because linux conntrack rules it uses are bi-directional. If a single party stops sending RTP for whatever reason (connection lost, codec with silence detection used, ....), mediaproxy doesn&#39;t care and doesn&#39;t act upon it. This is a feature, and a wanted one, to mainly support voice-detecting codecs. Think also about conferences for example, in which only a single person talks for a long time while others are silent and don&#39;t send RTP.</font></font></font></div>

<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif">Single-side RTP timeout because of a real problem (loosing network connection for example) should be handled with other methods, such as SIP session timers.</span></div>

<div><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br></span></div><div><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif">MY POINT IS : </span><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif">I don&#39;t see it practical to handle RTP flows for EVERY call to handle the least probable scenario: an RTP timeout from both (or all) parties.</span></div>

<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">If I understood well, mediaproxy updates the CDR when it detects an RTP timeout from both parties. CallControl can look in the CDR to debit the correct balance, instead of attaching itself to the dialog module to detect dialog termination.</font></font></font></div>

<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">This is an extract from the call_control module :</font></font></font></div>

<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;background-color:rgb(255,255,255)">Even when mediaproxy is unable to end the dialog because it was not started with engage_media_proxy(), the callcantrol application is still able to detect calls that did timeout sending media, by looking in the radius accounting records for entries recorded by mediaproxy for calls that did timeout. These calls will also be ended gracefully by the callcontrol application itself.</span></div>

<div><div><font color="#3366ff" face="tahoma, sans-serif"><br></font></div></div></blockquote><div><div dir="ltr"><div><font color="#3366ff" face="tahoma, sans-serif"><br></font></div><div><font color="#3366ff" face="tahoma, sans-serif">Unless there is something I miss..</font></div>

<div><font color="#3366ff" face="tahoma, sans-serif"><br></font></div><div><font color="#3366ff" face="tahoma, sans-serif">I also opened a bug about the issue because call_control doesn&#39;t have the same behavior with OpenSips. It doesn&#39;t force mediaproxy.</font></div>

<div><font color="#3366ff" face="tahoma, sans-serif"><br></font></div><div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div></div><br>
<br><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 20:00, Jeff Brower <span dir="ltr">&lt;<a href="mailto:jbrower@signalogic.com">jbrower@signalogic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Reda-<br>
<div class="im"><br>
&gt; It&#39;s clear but not necessary. It can look at radius records fixed by<br>
&gt; mediaproxy on RTP timeout to debit the correct balance as well. And why<br>
&gt; also force it on postpaid calls which it doesn&#39;t control at all ?<br>
<br>
</div>I don&#39;t understand how you plan to tear down Kamailio calls that suffer RTP time-out?<br>
<span class="HOEnZb"><font color="#888888"><br>
-Jeff<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; What happens is cost and performance issues for additional calls passing<br>
&gt; through my mediaproxy server, which I didn&#39;t plan for at first. No audio<br>
&gt; issue at all.<br>
&gt;<br>
&gt; Reda<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Feb 23, 2012 at 11:58, Sammy Govind &lt;<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Reading from the module docs its clear why it needs to engage media/rtp<br>
&gt;&gt; proxy to start,stop billing or timer of a call. so what happens when it<br>
&gt;&gt; engages mediaproxy on unwanted calls !? audio-issues?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Feb 23, 2012 at 1:21 PM, Reda Aouad &lt;<a href="mailto:reda.aouad@gmail.com">reda.aouad@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Thanks Sammy. I didn&#39;t get any reply yet.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; CallControl is an application used with CDRTool for prepaid calls. It<br>
&gt;&gt;&gt; calculates the maximum call duration based on the user&#39;s balance. Once the<br>
&gt;&gt;&gt; call&#39;s duration limit is reached, it sends BYE to both calling parties,<br>
&gt;&gt;&gt; terminating the call. At the end of a prepaid call, terminated either by<br>
&gt;&gt;&gt; the user or by CallControl, it debits the user&#39;s balance according to the<br>
&gt;&gt;&gt; call&#39;s duration.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The Call_Control module interfaces with this external application.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; call_control function is called in Kamailio&#39;s cfg to check if the user<br>
&gt;&gt;&gt; has prepaid or postpaid account, and get the max call duration for prepaid<br>
&gt;&gt;&gt; users. CallControl controls only prepaid calls, not postpaid ones.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; So call control and NAT traversal using mediaproxy are two differents<br>
&gt;&gt;&gt; things which i can&#39;t link, since I don&#39;t want mediaproxy for every call.<br>
&gt;&gt;&gt; And since the function call_control is called on every invite before<br>
&gt;&gt;&gt; knowing if the user has a prepaid account or not, it engages mediaproxy for<br>
&gt;&gt;&gt; every call.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; CallControl relies on mediaproxy to detect RTP timeouts and debit the<br>
&gt;&gt;&gt; correct balance from a prepaid account based on the last instant the<br>
&gt;&gt;&gt; mediaproxy saw an RTP packet.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; But why to force using mediaproxy with no choice? And why to force it for<br>
&gt;&gt;&gt; every call, whether it falls under CallControl&#39;s control or not?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am using Kamailio 3.2.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Reda<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 23 févr. 2012, at 07:21, Sammy Govind &lt;<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; I can see you posting multiple times on both proxies listings so I&#39;m sure<br>
&gt;&gt;&gt; you havent heard back from anyone.I am not at all familiar with your<br>
&gt;&gt;&gt; functions in email but could it be possible for you to determine on which<br>
&gt;&gt;&gt; calls you need to engage mediaproxy and on which not to, then on the base<br>
&gt;&gt;&gt; of that flag use the call_control function !<br>
&gt;&gt;&gt; your problem is complicated for me atleast. I hope somebody could answer<br>
&gt;&gt;&gt; you accurately and precisely.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; btw, what are you using in real? opensips or kamailio, which version? and<br>
&gt;&gt;&gt; in what context you need to use the call_control function?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt; Sammy<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Thu, Feb 23, 2012 at 12:45 AM, Reda Aouad &lt;<a href="mailto:reda.aouad@gmail.com">reda.aouad@gmail.com</a>&gt;wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; When I use the function call_control( ) of the call_control module, it<br>
&gt;&gt;&gt;&gt; automatically engages mediaproxy if it finds the mediaproxy module loaded.<br>
&gt;&gt;&gt;&gt; If the mediaproxy module is not loaded, call_control doesn&#39;t even try to<br>
&gt;&gt;&gt;&gt; engage it.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I need mediaproxy for NAT traversal in some cases, but don&#39;t want it to<br>
&gt;&gt;&gt;&gt; be engaged on every call.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; How can I disable this behavior?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt;&gt; Reda<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div></div>