mod_erlang_event
Subpages (click to expand)
0. Status
Historical note (click to expand)
This note has been created by John Boteler on 2014.04.10, and haven't been changed since. Although there was no major update in the source in at least 7 years, so this may still be accurate.
Maturing, I'll try to provide backwards compatibility for 2 FreeSWITCH releases if I have to make an API change.
TODO
-
Ability to have multiple event handler pids per node, each with their own event subscriptions?
-
Figure out how to handle premature exits of spawned outbound processes
-
Allow log/event handler and handle call processes to be registered processes or pids
-
Check pids obtained via 'get_pid' to determine the node they're on in case they're not the node we requested a pid from (load balancing)
-
Investigate supporting starting a gen_server/gen_fsm using proc_lib:spawn/4 and enter_loop
-
Make datastructures more proplist friendly
1. About
mod_erlang_event is a derivative of mod_event_socket that sends events and receives commands in Erlang's binary term format. This allows FreeSWITCH™ to behave like just another Erlang node (albeit a hidden one). It uses the ei library to handle encoding/decoding the Erlang binary format, and the ei_connect functions to handle the network connections.
About Erlang
Erlang is a general-purpose, concurrent, functional programming language, and a garbage-collected run-time system. It supports hot swapping, so that code can be changed without stopping a system.
This module, just as mod_event_socket, operates in two modes, inbound and outbound.
ESL modes of operation
See mod_event_socket for a more detailed description on inbound and outbound modes.
2. Installation
2.1. Vanilla FreeSWITCH installation
If FreeSWITCH has been installed from pre-built binaries (see Installation), all documented modules come pre-compiled with it, along with their sample configuration files in the <conf_dir>/autoload_configs/
directory.