[Freeswitch-users] How best to use event system for many originates with listeners

Chad Phillips -- Apartment Lines chad at apartmentlines.com
Tue Dec 6 19:10:03 MSK 2011


I'm designing an application that will originate many calls via the event system which I also want to attach event listeners to.  i want each event listener to only listen for events particular to each originated call.

Since I want FreeSWITCH to control the call after I originate it, it seems that I should use an inbound connection.  The two possible workflows I see are:

  a) Issue an originate command via inbound, then turn it into an outbound-type connection via a 'myevents <uuid>' call (or 'handlecall' using mod_erlang_event) once the channel is up.  With this method, it seems that I could miss critical channel events between the time the call is originated and the listener is attached.

  b) Set up an inbound listener filtered on a pre-determined UUID for the call, then originate the call with that UUID.  This would seem to guarantee that no events are missed by the listener, but I'm wondering about the performance of having potentially hundreds of inbound connections with filters going at the same time.

So my questions are:

  1) Is there a way to accomplish a) without potentially missing any channel events?

  2) Is b) vastly less efficient than a)?




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