set the sleep value to something really low, like 20ms or something. Find the lowest value that still lets the tone_detect work.<div>-MC<br><br><div class="gmail_quote">On Tue, Mar 22, 2011 at 10:59 AM, Stephen Wilde <span dir="ltr">&lt;<a href="mailto:wstephen80@gmail.com">wstephen80@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I cannot slow down the call rate, this is a real traffic and is not generate but the session rate it&#39;s not a real problem because my session rate is never more then 100cps with a medium value of 50cps so, when I activate this sleep, Freeswitch calculate a wrong CPS value. It seems that during sleep, FS freezes, as the sleep is performed synchronously.<div>

<div><br></div><div>Another effect is:</div><div><br></div><div><div>2011-03-22 09:17:57.551069 [ERR] mod_freetdm.c:2177 Session for channel 29:15 not found [UUID: N/A]</div><div>2011-03-22 09:18:00.181462 [ERR] mod_freetdm.c:2177 Session for channel 29:18 not found [UUID: N/A]</div>

<div>2011-03-22 09:18:00.301001 [ERR] mod_freetdm.c:2177 Session for channel 25:25 not found [UUID: N/A]</div><div>2011-03-22 09:18:03.931076 [ERR] mod_freetdm.c:2177 Session for channel 10:3 not found [UUID: N/A]</div><div>

2011-03-22 09:18:05.331547 [ERR] mod_freetdm.c:2177 Session for channel 10:10 not found [UUID: N/A]</div><div>2011-03-22 09:18:06.768937 [ERR] mod_freetdm.c:2177 Session for channel 24:14 not found [UUID: N/A]</div><div>
2011-03-22 09:18:07.248782 [ERR] mod_freetdm.c:2177 Session for channel 24:26 not found [UUID: N/A]</div>
<div>2011-03-22 09:18:07.797798 [ERR] mod_freetdm.c:2177 Session for channel 24:15 not found [UUID: N/A]</div></div><div><div><br></div><div>and many calls are dropped (I never seen these errors before). </div><div>Removing the sleep from dialplan, all revert to normal.</div>

<div><br></div><font color="#888888"><div>Stephen</div></font><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Tue, Mar 22, 2011 at 6:26 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br><div class="gmail_quote"><div>On Tue, Mar 22, 2011 at 1:29 AM, Stephen Wilde <span dir="ltr">&lt;<a href="mailto:wstephen80@gmail.com" target="_blank">wstephen80@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I have tested this trick with 1 call and it worked fine but when tested on a production environment doesn&#39;t work.<div><br></div><div>The problem seems to be the &quot;sleep&quot; called by &quot;execute_extension&quot; executed on answer.</div>



<div><br></div><div>If I activate this extension, I see in freeswitch log:</div><div><br></div><div><div>2011-03-22 09:18:10.191304 [CRIT] switch_core_session.c:1646 Throttle Error! 1326</div><div>2011-03-22 09:18:10.193260 [CRIT] switch_core_session.c:1646 Throttle Error! 1326</div>



<div>2011-03-22 09:18:10.194796 [CRIT] switch_core_session.c:1646 Throttle Error! 1323</div><div>2011-03-22 09:18:10.194796 [CRIT] switch_core_session.c:1646 Throttle Error! 1323</div><div>2011-03-22 09:18:10.199238 [CRIT] switch_core_session.c:1646 Throttle Error! 1317</div>



<div>2011-03-22 09:18:10.204815 [CRIT] switch_core_session.c:1646 Throttle Error! 1314</div><div>2011-03-22 09:18:10.204815 [CRIT] mod_sofia.c:3896 Error Creating Session</div><div>2011-03-22 09:18:10.214916 [CRIT] switch_core_session.c:1646 Throttle Error! 1302</div>



<div>2011-03-22 09:18:10.214916 [CRIT] mod_sofia.c:3896 Error Creating Session</div><div><b><font color="#FF0000">2011-03-22 09:18:10.377962 [CRIT] switch_time.c:788 Over Session Rate of 200!</font></b></div>
</div></blockquote></div><div>Notice the above line!</div><div><br></div><div>You are overwhelming your system with too many calls in such a short period of time. Slow things down a bit on your call generation. Also, you can probably experiment with the sleep time. 500ms might be too long. Try setting it to something shorter, like 100ms or so. That might help speed things up a bit. Shaving 400ms off the call may not seem like a lot but if you&#39;re doing hundreds of calls per second then that 400ms will add up quickly.</div>


<div><br></div><font color="#888888"><div>-MC</div></font><div><div></div><div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div>2011-03-22 09:18:33.938094 [CRIT] switch_core_session.c:1646 Throttle Error! 1266</div>

<div>2011-03-22 09:18:33.938094 [CRIT] switch_core_session.c:1646 Throttle Error! 1266</div><div>2011-03-22 09:18:33.939077 [CRIT] switch_core_session.c:1646 Throttle Error! 1266</div><div>2011-03-22 09:18:33.939077 [CRIT] switch_core_session.c:1646 Throttle Error! 1266</div>



<div>2011-03-22 09:18:33.944077 [CRIT] switch_core_session.c:1646 Throttle Error! 1264</div><div>2011-03-22 09:18:33.944077 [CRIT] mod_sofia.c:3896 Error Creating Session</div><div><br></div></div><font color="#888888"><div>


Stephen</div></font><div><div></div><div><div><br>
<div class="gmail_quote">On Tue, Mar 22, 2011 at 8:54 AM, Stephen Wilde <span dir="ltr">&lt;<a href="mailto:wstephen80@gmail.com" target="_blank">wstephen80@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Thank you Michael, with this trick it works fine!<div><div></div><div><br><br><div class="gmail_quote">On Tue, Mar 22, 2011 at 6:33 AM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Add this to your dialplan...</div><div><br></div><div><font face="&#39;courier new&#39;, monospace">&lt;extension name=&quot;start tone detect&quot;&gt;</font></div>




<div>
<font face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;destination_number&quot; data=&quot;custom_start_tone_detect&quot;&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;sleep&quot; data=&quot;500&quot;/&gt;</font></div>





<div><font face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;tone_detect&quot; data=&quot;MYTONE 680 ro +5000 set MYTONE=1&quot;/&gt;</font></div><div>
<font face="&#39;courier new&#39;, monospace">  &lt;/condition&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">&lt;/extension&gt;<br></font><br></div><div>
...then change your export...</div><div><font face="&#39;courier new&#39;, monospace">&lt;action application=&quot;export&quot; data=&quot;nolocal:execute_on_answer=execute_extension custom_start_tone_detect&quot;/&gt;</font></div>





<div><br></div><div>Let us know if that does the trick.</div><div><br></div><div>-MC</div><div><br><div class="gmail_quote"><div><div></div><div>On Mon, Mar 21, 2011 at 12:33 PM, Stephen Wilde <span dir="ltr">&lt;<a href="mailto:wstephen80@gmail.com" target="_blank">wstephen80@gmail.com</a>&gt;</span> wrote:<br>





</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><div>I start the tone_detect on answer using &quot;execute_on_answer&quot; as:</div>
<div><br></div><div>&lt;action application=&quot;export&quot; data=&quot;nolocal:execute_on_answer=tone_detect MYTONE 680 ro +5000 set MYTONE=1&quot; /&gt;</div>

<div><br></div><div>but I have the necessity to start the tone_detect for example 500ms after answer: there is a way to do that in dialplan?</div>
<br></div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>