July 2017
Intermediate to advanced
434 pages
12h 59m
English
This is the second workhorse of FreeSWITCH Lua scripting. The API object allows you to send API commands to FreeSWITCH exactly as if you were at the console.
API commands are provided by mod_commands (look it up in https://freeswitch.org/confluence) and by many other modules (in fact, almost all modules provide additional API commands). You can see a list of all API commands available in your FreeSWITCH server by issuing the following from the FreeSWITCH console (help will do the same):
show api
Let's look at the freeswitch.API object doing its things: edit the file /usr/local/freeswitch/scripts/test6.lua:
freeswitch.consoleLog("WARNING","before creating the API object\n") api = freeswitch.API() freeswitch.consoleLog("WARNING","after ...Read now
Unlock full access