FW: Inbound ESL .RecvEventTimed(0) Blocking?
Hi, Can someone please give me an answer, I am problaby not the first to notice. I need to know why (and how to avoid) ESLevent RecvEventTimed(0) being blocking and keeps waiting for event to arrive, as it should not. It seems to ignore any form of time you pass as parameter and just always wait for an event. Btw, I am on Windows. Thanks! Mike. From: Michael Lutz Sent: donderdag 5 april 2012 22:19 To: 'FreeSWITCH Users Help' Subject: Inbound ESL .RecvEventTimed(0) Blocking? Hi Guys, Can anybody please help me, I am using .RecvEventTimed(0) on a inbound ESL connection to check if events are there. According to specs, this should be non-blocking and as the wiki says "used for polling". However, the code just seems to stop until it gets an event. I am listening with a filter for a specific uuid like: ESLevent eslEvent = fsConnection.SendRecv("event plain ALL"); eslEvent = fsConnection.SendRecv("filter Unique-ID " + thisCall.callId); . Some code. . eslEvent = fsConnection.RecvEventTimed(0); But it just waits for an event on the RecvEventTimed(0); When I generate an event (for example pressing a dtmf) is continues. Is there some extra thing I need to do? Thanks, Mike.
try 1 instead of 0 i believe 0 means forever On Fri, Apr 6, 2012 at 2:53 AM, Michael Lutz <mytemike72@gmail.com> wrote:
Hi,
Can someone please give me an answer, I am problaby not the first to notice…
I need to know why (and how to avoid) ESLevent RecvEventTimed(0) being blocking and keeps waiting for event to arrive, as it should not.
It seems to ignore any form of time you pass as parameter and just always wait for an event.
Btw, I am on Windows…
Thanks!
Mike.
From: Michael Lutz Sent: donderdag 5 april 2012 22:19 To: 'FreeSWITCH Users Help' Subject: Inbound ESL .RecvEventTimed(0) Blocking?
Hi Guys,
Can anybody please help me, I am using .RecvEventTimed(0) on a inbound ESL connection to check if events are there.
According to specs, this should be non-blocking and as the wiki says “used for polling”.
However, the code just seems to stop until it gets an event.
I am listening with a filter for a specific uuid like:
ESLevent eslEvent = fsConnection.SendRecv("event plain ALL");
eslEvent = fsConnection.SendRecv("filter Unique-ID " + thisCall.callId);
…
Some code…
…
eslEvent = fsConnection.RecvEventTimed(0);
But it just waits for an event on the RecvEventTimed(0);
When I generate an event (for example pressing a dtmf) is continues…
Is there some extra thing I need to do?
Thanks,
Mike.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
On Fri, Apr 6, 2012 at 12:53 AM, Michael Lutz <mytemike72@gmail.com> wrote:
Hi,****
** **
Can someone please give me an answer, I am problaby not the first to notice…****
** **
I need to know why (and how to avoid) ESLevent RecvEventTimed(0) being blocking and keeps waiting for event to arrive, as it should not.****
It seems to ignore any form of time you pass as parameter and just always wait for an event.****
** **
Btw, I am on Windows…
You say that no matter what value you put in for the argument that it always waits for an event? On a Linux box I tested Tony's suggestion about using 1 vs 0 and it worked. I just tested on latest git from 2 days ago and I definitely have "polling" behavior when I use 1 but I have "wait forever" behavior when I use 0. I suspect that the wiki is wrong. (Sadly, this means that chapter 9, page 224 is also wrong.) I'll try testing on Windows later today and see what I get. BTW, are you building FS from scratch or are you using the weekly binaries? -MC
participants (3)
-
Anthony Minessale
-
Michael Collins
-
Michael Lutz