Javascript Rmanager commands
From Yate Documentation
(Difference between revisions)
(Created page with "You can interact with Javascript scripts from rmanager. * connect with telnet to Yate's rmanager interface telnet 127.0.0.1 5038 * see running scripts javascript info E...") |
|||
Line 1: | Line 1: | ||
You can interact with Javascript scripts from rmanager. | You can interact with Javascript scripts from rmanager. | ||
− | + | To connect to Yate's rmanager interface | |
telnet 127.0.0.1 5038 | telnet 127.0.0.1 5038 | ||
− | + | ==See running scripts== | |
javascript info | javascript info | ||
Line 16: | Line 16: | ||
nib.js is a global script and sip/74 is a sip channel that was routed by the configured routing script | nib.js is a global script and sip/74 is a sip channel that was routed by the configured routing script | ||
− | + | ==Reload scripts== | |
javascript reload script_name | javascript reload script_name | ||
− | + | ==Evaluate expresion== | |
Ask Javascript interpretor to evaluate expresion: | Ask Javascript interpretor to evaluate expresion: | ||
Line 27: | Line 27: | ||
Ask Javascript interpretor to evaluate expresion in the context of a specific script. In this case you will be able to access global variables from that script. | Ask Javascript interpretor to evaluate expresion in the context of a specific script. In this case you will be able to access global variables from that script. | ||
javascript eval=script_name Engine.debug("test"+var_name) | javascript eval=script_name Engine.debug("test"+var_name) | ||
− | |||
Ask Javascript interpretor to evaluate expresion in the context of a specific routing script instance. In this case you will be able to access global variables from that script instance. | Ask Javascript interpretor to evaluate expresion in the context of a specific routing script instance. In this case you will be able to access global variables from that script instance. | ||
javascript eval=sip/74 Engine.debug("test"+var_name) | javascript eval=sip/74 Engine.debug("test"+var_name) |
Revision as of 13:10, 26 February 2014
You can interact with Javascript scripts from rmanager.
To connect to Yate's rmanager interface
telnet 127.0.0.1 5038
See running scripts
javascript info
Ex output:
javascript info nib = ./share/scripts/nib.js sip/74: ReRoute
nib.js is a global script and sip/74 is a sip channel that was routed by the configured routing script
Reload scripts
javascript reload script_name
Evaluate expresion
Ask Javascript interpretor to evaluate expresion:
javascript eval Engine.debug("test")
Ask Javascript interpretor to evaluate expresion in the context of a specific script. In this case you will be able to access global variables from that script.
javascript eval=script_name Engine.debug("test"+var_name)
Ask Javascript interpretor to evaluate expresion in the context of a specific routing script instance. In this case you will be able to access global variables from that script instance.
javascript eval=sip/74 Engine.debug("test"+var_name)