V8 Supersedes SpiderMonkey
Build and Install
mod_v8 is now built and installed by default.
If for some reason it's not, do the following:
- Uncomment languages/mod_v8 in modules.conf in your src directory (make it always build and install v8)
- Run 'make mod_v8-install' to make and install just the v8 module
- Edit conf/autoload_configs/modules.conf.xml in your FreeSWITCH™ install directory to load mod_v8
- Restart freeswitch
Execution of a script
From the Dialplan, you simply call it as an application similar to:
At the FreeSWITCH™ console, or some other application/interface execute the jsrun call with the script name as its argument.
SpiderMonkey Specific Objects
- File - File IO methods (Spidermonkey object)
Other Points Of Interest
jsrun script.js arg1 arg2 ...
These can be accessed as argv, argv,.. in the script
If you're running the script as an application for originate command:
console_log("notice","<Whatever you need to print>");