<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br># time out and inter digit time out<br>response_timeout = (20 * 1000)<br>interdigit_timeout = (10 * 1000)<br><br><br>--- On <b>Tue, 31/8/10, Michael Collins <i>&lt;msc@freeswitch.org&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael Collins &lt;msc@freeswitch.org&gt;<br>Subject: Re: [Freeswitch-users] recvEvent in ruby<br>To: "FreeSWITCH Users Help" &lt;freeswitch-users@lists.freeswitch.org&gt;<br>Date: Tuesday, 31 August, 2010, 0:13<br><br><div id="yiv305195716">What integer values are in response_timeout and interdigit_timeout? Just curious, because if they are too large then it will indeed block while waiting for events.<br>-MC<br><br><div class="yiv305195716gmail_quote">On Mon, Aug 30, 2010 at 4:34 PM, Nigel Kent <span dir="ltr">&lt;<a rel="nofollow"
 ymailto="mailto:ktngl@yahoo.co.uk" target="_blank" href="/mc/compose?to=ktngl@yahoo.co.uk">ktngl@yahoo.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="yiv305195716gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
I have this code below in which I want to receive and extract dtmf events.<br>It seems all previous events are queued and received together at this point as the while loop is run. I don't know why it does this I only need the current events to be received.<br>
<br>Another issue happening at this point when I press any digit 0-9 on the phone it is not getting an incoming dtmf events<br><br><br><br>while @con.connected<br>&nbsp;&nbsp;&nbsp; #debug&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; puts "start loop" <br>&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; #no digits<br>&nbsp;&nbsp;&nbsp; if dtmfbuffer.length == 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e = @con.recvEventTimed(response_timeout)<br>&nbsp;&nbsp;&nbsp; # there are digits<br>&nbsp;&nbsp;&nbsp; elsif dtmfbuffer.length &gt; 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e =
 @con.recvEventTimed(interdigit_timeout)<br>&nbsp;&nbsp;&nbsp; end<br><br><br>&nbsp;&nbsp;&nbsp; if e<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name = e.getHeader("Event-Name")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; puts "#{name}"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break if name == "SERVER_DISCONNECTED"<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if name == "DTMF"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; digit = e.getHeader("DTMF-Digit")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; duration = e.getHeader("DTMF-Duration")&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dtmfbuffer &lt;&lt; digit<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; puts "*** Dtmf #{digit} dur:#{duration} from #{@cli}"<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp;&nbsp; end<br><br>&nbsp;&nbsp;&nbsp; if dtmfbuffer.length &gt; 9<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 break<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #debug<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; puts "end loop"<br>end<br></td></tr></tbody></table><br>



      <br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="/mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>