Establishing an outbound event socket connection
An "outbound" event socket connection lets you control a call leg from a program that sits and waits for a TCP connection on a specific port. The dialplan socket
application sends control of the call to the process listening on the specified TCP port. This recipe will guide you through the steps necessary to get a simple call control script up and running. You may find it easier to understand the information presented here if you are at least somewhat familiar with the concept of TCP sockets.
Getting ready
You will need a text editor and a telephone connected to FreeSWITCH as well as access to the fs_cli
for your system. You will also need to have the ESL compiled and working for your scripting language of choice (see Setting up the event socket Library (ESL) earlier in this chapter). The language used in this is example is Perl, however the principles apply to all ESL-enabled languages. When we are through we will have a simple script that...