Hi all<div><br></div><div>I have some little problem with events generated by ESL originated calls.</div><div>Maybe someone had similar problem and could post how to solve it.</div><div><br>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.<br>
<br></div><div>Current version of my script works like this:</div><div>- send api originate [params]target via ESL<br>- wait for originate response to get uuid<br>- add filter: filter Unique-ID <uuid of my call><br>
- subscribe for events: event plain CHANNEL_ANSWER CHANNEL_HANGUP CUSTOM spandsp::txfaxresult<br><br></div><div>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.<br>
<br></div><div>In that case I lost important answer or hangup event and all processing logic is broken.</div><div><br></div><div>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.</div>
<div><br></div><div>Any hints on this?</div><div><br></div><div><br></div><div><br></div>