Lua and FreeSWITCH
Calling a Lua script from FreeSWITCH makes one object available: the "freeswitch" object (from which you can create other basic FreeSWITCH-related objects).
You can execute a Lua script from FreeSWITCH console in two ways: lua and luarun. If you execute the script with lua, it will block your console until the script returns, as though it was the console thread itself to execute the script. Only after the script has exited will you see console messages. If instead you use luarun, a new thread will be created that will run the script (in this case the script will have no access to the stream object) completely independently from the console.
If the Lua script has been called from dialplan (an incoming call matches an extension ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access