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="gmail_quote">On Mon, Aug 30, 2010 at 4:34 PM, Nigel Kent <span dir="ltr"><<a href="mailto:ktngl@yahoo.co.uk">ktngl@yahoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" 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> #debug <br> puts "start loop" <br> <br>
#no digits<br> if dtmfbuffer.length == 0<br> e = @con.recvEventTimed(response_timeout)<br> # there are digits<br> elsif dtmfbuffer.length > 0<br> e =
@con.recvEventTimed(interdigit_timeout)<br> end<br><br><br> if e<br> name = e.getHeader("Event-Name")<br> puts "#{name}"<br> break if name == "SERVER_DISCONNECTED"<br>
if name == "DTMF"<br> digit = e.getHeader("DTMF-Digit")<br> duration = e.getHeader("DTMF-Duration") <br> dtmfbuffer << digit<br> puts "*** Dtmf #{digit} dur:#{duration} from #{@cli}"<br>
end<br> end<br><br> if dtmfbuffer.length > 9<br>
break<br> end<br> #debug<br> puts "end loop"<br>end<br></td></tr></tbody></table><br>
<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>