Skip to main content

Event Handlers



0. About

In the context of FreeSWITCH, event handlers are modules that provide a way to interact with the event system. Used the word "interact", because

  • some only forward system events to external (and possibly remote) applications
    (e.g., mod_amqp, mod_event_zmq, mod_cdr_*),

  • but others also provide the ability (aside from subscribing to events) to inject events, and control the FreeSWITCH instance via external applications
    (such as mod_event_socket, mod_erlang_event, etc.).

TODO Not entire sure whether mod_amqp, mod_event_zmq can only be used to forward events, or also as a way to control FreeSWITCH? Both of their documentations imply the latter, but there are no examples. 2600hz uses mod_kazoo and RabbitMQ to use FreeSWITCH as a media server, so why are they are not using the aforementioned modules instead? (Or are they in some capacity?)

TODO The event system is not really introduced anywhere (except for the books), and by doing so, I think the a similar docs structure would make sense:

(top) Event system

  • list of system events (Event List)
  • Event Socket Library
  • this page (Event handlers) → should also be a subsection for Modules. (Briefly mentioned as "event socket layer" modules there.)

Would specifically create an ESL and an Event handler section, because only lately realized that the only thing they have in common is to interact with the event system, and, in some cases, having the same (or similar) implicit API.

1. List of event handlers

TODO The section title is not great, and probably just use the name of specific event handler categories instead (once the right terms are found...).