register/2 is an Erlang function exported by "freeswitch" module. Registers a new FreeSWITCH server. By this registration you can command and control the functions from this API just by selecting a single atom - the Server identifier. However, the FreeSWITCH server needs to be configured, and the approach is not so straightforward. Here we are assuming that FreeSWITCH server is already compiled and installed on Linux under /usr/local/freeswitch/. 1)FreeSWITCH server has to have "Erlang Socket Client" module enabled. The following files are required: ✓/usr/local/freeswitch/mod/mod_erlang_event.so ✓/usr/local/freeswitch/conf/autoload_configs/erlang_event.conf.xml 2)The configuration file erlang_event.conf.xml has to be setup correctly. The following fields are mandatory: ✓listen-port = 8031 ✓nodename = "freeswitch" ✓shortname = true ✓encoding = "string" For better clarity, we've provided below our own erlang_event.conf.xml, as an example. Nevertheless, you have to take into consideration that this plug-in and FreeSWITCH itself are working into a distributed network, and MUST share the same "magic cookie" in order to communicate properly. In our examples we shall use the default cookie for the FreeSWITCH's distribution called "ClueCon" but on production environment most likely you have to take care about this parameter as well. |
|
|