-
Book Overview & Buying
-
Table Of Contents
FreeSWITCH Cookbook
Events are the lifeblood of the FreeSWITCH eventing system. FreeSWITCH throws events for virtually everything that happens. This can overwhelm a program (and indeed the programmer) with a flood of information. The solution is to use the FreeSWITCH event filter feature.
Learning about filters is very simple. Initially we will just use fs_cli connected to a FreeSWITCH server. Later we will look at some simple programming examples using ESL. You will need a phone connected to your FreeSWITCH server, and two terminal windows open so that you can look at your program in one session and fs_cli in another.
Consider a simple example. Here we will compare the event socket output before and after using a filter:
Launch fs_cli and connect to a running FreeSWITCH server. Issue these two commands at fs_cli:
/log 0 /event plain all
Wait a few seconds and no doubt you'll see some events, and possibly a lot of events.
From your phone, dial *98 and wait for the...
Change the font size
Change margin width
Change background colour