[Freeswitch-users] ESL originate - call events are sent too fast

Adam Raszynski netcentrica at gmail.com
Thu Jun 14 17:42:37 MSD 2012


Hi all

I have some little problem with events generated by ESL originated calls.
Maybe someone had similar problem and could post how to solve it.

I would like to originate call and receive events related only to that
call. At the same time my originate script is executed multiple times i.e.
100 times.

Current version of my script works like this:
- send api originate [params]target via ESL
- wait for originate response to get uuid
- add filter: filter Unique-ID <uuid of my call>
- subscribe for events: event plain CHANNEL_ANSWER CHANNEL_HANGUP CUSTOM
spandsp::txfaxresult

Unfortunately execution of all above statements sometimes take a while and
in meanwhile FreeSWITCH generates event and send it back to my script
BEFORE it has subscribed to receive events. It happens for example for very
fast call answer or hangup.

In that case I lost important answer or hangup event and all processing
logic is broken.

I've tried to change sequence of commands, but when I put event
subscription before adding filter then I get events from other channels. I
also can't add filter earlier because need to wait for originate response.

Any hints on this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120614/9aae0ce7/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list