Rmanager
(Created page with "== Remote Manager Module == This module allows controlling Yate using a simple telnet client. {|class="wikitable" width="85%" | telnet 127.0.0.1 5038 Trying 127.0.0.1... ...") |
(→Remote Manager configuration file) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
This module allows controlling Yate using a simple telnet client. | This module allows controlling Yate using a simple telnet client. | ||
− | + | By controlling Yate means that from a remote console you can: | |
− | + | ||
− | telnet | + | : - stop or reload Yate's engine; see the uptime of Yate |
− | Trying | + | : - watch the status, load or reload a specified module |
− | Connected to | + | : - enable debugging |
+ | : - enable output | ||
+ | : - start or stop calls | ||
+ | : - add, update or delete a user (phone number) | ||
+ | : - view logs | ||
+ | |||
+ | === How to use Remote Manager Module === | ||
+ | |||
+ | In a terminal run command: | ||
+ | |||
+ | # telnet 0 5038 | ||
+ | Trying 0.0.0.0... | ||
+ | Connected to 0 (0.0.0.0). | ||
Escape character is '^]'. | Escape character is '^]'. | ||
− | YATE | + | YATE 4.2.1-alpha1 (http://YATE.null.ro) ready on localhost.localdomain. |
+ | |||
? | ? | ||
Available commands: | Available commands: | ||
Line 22: | Line 34: | ||
color [on|off] | color [on|off] | ||
debug [module] [level|on|off] | debug [module] [level|on|off] | ||
− | |||
drop {chan|*|all} [reason] | drop {chan|*|all} [reason] | ||
call chan target | call chan target | ||
control chan [operation] [param=val] [param=...] | control chan [operation] [param=val] [param=...] | ||
− | reload | + | reload [plugin] |
restart [now] | restart [now] | ||
stop [exitcode] | stop [exitcode] | ||
+ | alias [name [command...]] | ||
module {{load|reload} modulefile|unload modulename|list} | module {{load|reload} modulefile|unload modulename|list} | ||
+ | events [clear] [type] | ||
+ | logview | ||
+ | status jabber [stream_name|{c2s|s2s} [remote_jid]] | ||
+ | jabber drop {stream_name|{c2s|s2s|*|all} [remote_jid]} | ||
+ | jabber create remote_domain [local_domain] [parameter=value...] | ||
+ | jabber debug stream_name [debug_level|on|off] | ||
+ | javascript {info|eval instructions...} | ||
+ | filetransfer {{send|receive} filename [callto:]target [[paramname=value]...]} | ||
callgen {start|stop|drop|pause|resume|single|info|reset|load|save|set paramname[=value]} | callgen {start|stop|drop|pause|resume|single|info|reset|load|save|set paramname[=value]} | ||
+ | users {add user [parameter=value...]|delete user|update user [parameter=value...]} | ||
accounts [reload|{login|logout|...} [account]] | accounts [reload|{login|logout|...} [account]] | ||
sigdump component [filename] | sigdump component [filename] | ||
− | |} | + | cache {load|flush} cache_name [[param=value]...] |
+ | |||
These commands can be entered by hand. More or less commands may be available depending on the loaded modules. | These commands can be entered by hand. More or less commands may be available depending on the loaded modules. | ||
Line 39: | Line 61: | ||
Entering a question character alone on a line will display the help screen. Entering ''help commandname'' or ''? commandname'' will display a short description of that command. | Entering a question character alone on a line will display the help screen. Entering ''help commandname'' or ''? commandname'' will display a short description of that command. | ||
− | |||
− | |||
help status | help status | ||
status [overview] [modulename] | status [overview] [modulename] | ||
Shows status of all or selected modules or channels | Shows status of all or selected modules or channels | ||
− | |||
To exit from Remote Manager type "quit" and press enter. | To exit from Remote Manager type "quit" and press enter. | ||
− | A list of | + | A list of [[Rmanager_Commands|possible commands]] is provided. |
− | === Machine mode === | + | ==== Machine mode ==== |
− | Remote Manager has a special machine mode that is activated by the "machine on" command. In this mode answers are machine parsable and also the messages are dumped just after being dispatched. The message text format is the same with the one from [[ | + | Remote Manager has a special machine mode that is activated by the "machine on" command. In this mode answers are machine parsable and also the messages are dumped just after being dispatched. The message text format is the same with the one from [[External Module|extmodule]]. |
If you want to connect programmatically to rmanager to give it commands consider disabling Telnet negotiation. This will avoid the need of interpreting Telnet escape sequences and will also disable remote echo mode. | If you want to connect programmatically to rmanager to give it commands consider disabling Telnet negotiation. This will avoid the need of interpreting Telnet escape sequences and will also disable remote echo mode. | ||
− | === Secure connections (Yate 3+) === | + | ==== Secure connections (Yate 3+) ==== |
It is possible to enable SSL encryption by specifying a '''context=''' or '''domain=''' in the desired listener section. Usually a separate listener is used, bound to a different interface or port number. | It is possible to enable SSL encryption by specifying a '''context=''' or '''domain=''' in the desired listener section. Usually a separate listener is used, bound to a different interface or port number. | ||
− | The [[ | + | The [[OpenSSL]] module is required and it needs to have the context or domain properly configured (including a server certificate) in openssl.conf. |
+ | |||
+ | Suppose a secure listener is set up on port 5050 the [http://voip.null.ro/tarballs/misc/telnet-ssl-0.17-1jh.src.rpm telnet-ssl] program can be used to connect: | ||
− | |||
− | |||
− | |||
$ telnet-ssl -z ssl 127.0.0.1 5050 | $ telnet-ssl -z ssl 127.0.0.1 5050 | ||
Trying 127.0.0.1... | Trying 127.0.0.1... | ||
Line 73: | Line 91: | ||
Escape character is '^]'. | Escape character is '^]'. | ||
YATE 3.0.0-alpha1 (http://YATE.null.ro) ready. | YATE 3.0.0-alpha1 (http://YATE.null.ro) ready. | ||
− | |||
− | For Windows clients no simple free connection solution exists. The commercial (with 30 days trial) program [http://www.vandyke.com/products/securecrt/index.html SecureCRT] can be used. If you have a self-signed certificate you will need to go to ''Options -> Session Options -> Connection -> Telnet/SSL -> SSL'' '''[x] Disable certificate verification'''. Also it's nice to enable color - in ''Options -> Session Options -> Terminal -> Emulation'' '''[x] ANSI Color'''. The same program supports SSH/SSH2 (which is a very different protocol) if you need to log in to a Linux box from Windows. | + | For Windows clients no simple free connection solution exists. The commercial (with 30 days trial) program [http://www.vandyke.com/products/securecrt/index.html SecureCRT] can be used.<br> |
+ | If you have a self-signed certificate you will need to go to ''Options -> Session Options -> Connection -> Telnet/SSL -> SSL'' '''[x] Disable certificate verification'''.<br> | ||
+ | Also it's nice to enable color - in ''Options -> Session Options -> Terminal -> Emulation'' '''[x] ANSI Color'''. The same program supports SSH/SSH2 (which is a very different protocol) if you need to log in to a Linux box from Windows. | ||
− | Another alternative for both Windows and POSIX systems is to secure the connection with | + | Another alternative for both Windows and POSIX systems is to secure the connection with [http://www.stunnel.org/ stunnel] and connect to it with the default Telnet client. This setup is more elaborate and prone to error. |
− | === Remote Manager | + | ==== Remote Manager configuration file ==== |
rmanager.conf | rmanager.conf | ||
− | |||
− | |||
[general] | [general] | ||
; Each section creates a connection listener in the Remote Manager. | ; Each section creates a connection listener in the Remote Manager. | ||
; An empty (all defaults) general section is assumed only in server mode if the | ; An empty (all defaults) general section is assumed only in server mode if the | ||
; configuration file is missing. | ; configuration file is missing. | ||
− | + | ||
; port: int: TCP Port to listen on, 0 to disable the listener | ; port: int: TCP Port to listen on, 0 to disable the listener | ||
;port=5038 | ;port=5038 | ||
− | + | ||
; addr: ipaddress: IP address to bind to | ; addr: ipaddress: IP address to bind to | ||
;addr=127.0.0.1 | ;addr=127.0.0.1 | ||
− | + | ||
; header: string: Header string to display on connect | ; header: string: Header string to display on connect | ||
− | ;header=YATE ${version}-${release} (http://YATE.null.ro) ready. | + | ;header=YATE ${version}-${release} (http://YATE.null.ro) ready on ${nodename}. |
− | + | ||
; password: string: Password required to authenticate as admin, default empty! | ; password: string: Password required to authenticate as admin, default empty! | ||
;password= | ;password= | ||
− | + | ||
; userpass: string: Password to authenticate as observer user, default empty! | ; userpass: string: Password to authenticate as observer user, default empty! | ||
;userpass= | ;userpass= | ||
− | + | ||
; timeout: int: Timeout until authentication succeeds in msec | ; timeout: int: Timeout until authentication succeeds in msec | ||
; Defaults to waiting 30s until closing an unauthenticated connection | ; Defaults to waiting 30s until closing an unauthenticated connection | ||
; Set to zero to disable else enforced minimum value is 5000 ms (5s) | ; Set to zero to disable else enforced minimum value is 5000 ms (5s) | ||
;timeout=30000 | ;timeout=30000 | ||
− | + | ||
; telnet: bool: Initiate TELNET negotiation on connect | ; telnet: bool: Initiate TELNET negotiation on connect | ||
;telnet=yes | ;telnet=yes | ||
− | + | ||
; output: bool: Enable output as soon as connecting | ; output: bool: Enable output as soon as connecting | ||
; This setting is ignored if an userpass is set | ; This setting is ignored if an userpass is set | ||
;output=no | ;output=no | ||
− | + | ||
; debug: bool: Enable local debug as soon as connecting | ; debug: bool: Enable local debug as soon as connecting | ||
; This setting is ignored if any password is set | ; This setting is ignored if any password is set | ||
;debug=no | ;debug=no | ||
− | + | ||
; color: bool: Enable colorization debug as soon as connecting | ; color: bool: Enable colorization debug as soon as connecting | ||
; This setting is ignored if telnet negotiation is disabled | ; This setting is ignored if telnet negotiation is disabled | ||
;color=no | ;color=no | ||
− | + | ||
; interactive: bool: Disable the TCP coalescing to improve interactivity | ; interactive: bool: Disable the TCP coalescing to improve interactivity | ||
; This is almost never required and needs Yate to run as superuser | ; This is almost never required and needs Yate to run as superuser | ||
;interactive=no | ;interactive=no | ||
− | + | ||
+ | ; maxhistory: int: Number of distinct lines to preserve in the session history | ||
+ | ; The Up / Down arrow keys allow cycling through the history | ||
+ | ;maxhistory=10 | ||
+ | |||
; context: string: SSL context to use to secure the connection | ; context: string: SSL context to use to secure the connection | ||
; Setting a context enables SSL on the listener and overrides any domain | ; Setting a context enables SSL on the listener and overrides any domain | ||
;context= | ;context= | ||
− | + | ||
; domain: string: Domain used to identify the SSL context to use | ; domain: string: Domain used to identify the SSL context to use | ||
; Setting a domain enables SSL on the listener | ; Setting a domain enables SSL on the listener | ||
;domain= | ;domain= | ||
− | + | ||
; verify: keyword: SSL handshake client certificate verification type | ; verify: keyword: SSL handshake client certificate verification type | ||
; For acceptable values see the documentation of the openssl module | ; For acceptable values see the documentation of the openssl module | ||
; By default no client certificate is required | ; By default no client certificate is required | ||
;verify= | ;verify= | ||
− | + | ||
+ | ; Initial aliases can be created for each connection | ||
+ | ; Each declaration line starts with alias: and may include \0 as placeholder | ||
+ | ; for the line entered in rmanager and \1 ... \9 for individual components | ||
+ | ; Example: | ||
+ | ; alias:cgu=control \1/ISUP unblock force=yes circuits=\2 | ||
+ | |||
+ | |||
+ | '''See also''' | ||
+ | |||
+ | * [[Debugging and, or Investigation of messages]] | ||
+ | * [[Rmanager Commands]] | ||
+ | * [[OpenSSL]] | ||
+ | * [[Modules]] | ||
+ | |||
+ | [[Category:Telnet]] [[Category:Debug]] [[Category:Rmanager]] |
Latest revision as of 15:24, 4 June 2014
This module allows controlling Yate using a simple telnet client.
By controlling Yate means that from a remote console you can:
- - stop or reload Yate's engine; see the uptime of Yate
- - watch the status, load or reload a specified module
- - enable debugging
- - enable output
- - start or stop calls
- - add, update or delete a user (phone number)
- - view logs
Contents |
[edit] How to use Remote Manager Module
In a terminal run command:
# telnet 0 5038 Trying 0.0.0.0... Connected to 0 (0.0.0.0). Escape character is '^]'. YATE 4.2.1-alpha1 (http://YATE.null.ro) ready on localhost.localdomain. ? Available commands: quit echo [on|off] help [command] auth password status [overview] [modulename] uptime machine [on|off] output [on|off] color [on|off] debug [module] [level|on|off] drop {chan|*|all} [reason] call chan target control chan [operation] [param=val] [param=...] reload [plugin] restart [now] stop [exitcode] alias [name [command...]] module {{load|reload} modulefile|unload modulename|list} events [clear] [type] logview status jabber [stream_name|{c2s|s2s} [remote_jid]] jabber drop {stream_name|{c2s|s2s|*|all} [remote_jid]} jabber create remote_domain [local_domain] [parameter=value...] jabber debug stream_name [debug_level|on|off] javascript {info|eval instructions...} filetransfer {{send|receive} filename [callto:]target [[paramname=value]...]} callgen {start|stop|drop|pause|resume|single|info|reset|load|save|set paramname[=value]} users {add user [parameter=value...]|delete user|update user [parameter=value...]} accounts [reload|{login|logout|...} [account]] sigdump component [filename] cache {load|flush} cache_name [[param=value]...]
These commands can be entered by hand. More or less commands may be available depending on the loaded modules.
Entering a question character alone on a line will display the help screen. Entering help commandname or ? commandname will display a short description of that command.
help status status [overview] [modulename] Shows status of all or selected modules or channels
To exit from Remote Manager type "quit" and press enter.
A list of possible commands is provided.
[edit] Machine mode
Remote Manager has a special machine mode that is activated by the "machine on" command. In this mode answers are machine parsable and also the messages are dumped just after being dispatched. The message text format is the same with the one from extmodule.
If you want to connect programmatically to rmanager to give it commands consider disabling Telnet negotiation. This will avoid the need of interpreting Telnet escape sequences and will also disable remote echo mode.
[edit] Secure connections (Yate 3+)
It is possible to enable SSL encryption by specifying a context= or domain= in the desired listener section. Usually a separate listener is used, bound to a different interface or port number.
The OpenSSL module is required and it needs to have the context or domain properly configured (including a server certificate) in openssl.conf.
Suppose a secure listener is set up on port 5050 the telnet-ssl program can be used to connect:
$ telnet-ssl -z ssl 127.0.0.1 5050 Trying 127.0.0.1... SSL: Server has a self-signed certificate SSL: unknown issuer: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit /CN=localhost.localdomain/emailAddress=root@localhost.localdomain Connected to 127.0.0.1. Escape character is '^]'. YATE 3.0.0-alpha1 (http://YATE.null.ro) ready.
For Windows clients no simple free connection solution exists. The commercial (with 30 days trial) program SecureCRT can be used.
If you have a self-signed certificate you will need to go to Options -> Session Options -> Connection -> Telnet/SSL -> SSL [x] Disable certificate verification.
Also it's nice to enable color - in Options -> Session Options -> Terminal -> Emulation [x] ANSI Color. The same program supports SSH/SSH2 (which is a very different protocol) if you need to log in to a Linux box from Windows.
Another alternative for both Windows and POSIX systems is to secure the connection with stunnel and connect to it with the default Telnet client. This setup is more elaborate and prone to error.
[edit] Remote Manager configuration file
rmanager.conf
[general] ; Each section creates a connection listener in the Remote Manager. ; An empty (all defaults) general section is assumed only in server mode if the ; configuration file is missing. ; port: int: TCP Port to listen on, 0 to disable the listener ;port=5038 ; addr: ipaddress: IP address to bind to ;addr=127.0.0.1 ; header: string: Header string to display on connect ;header=YATE ${version}-${release} (http://YATE.null.ro) ready on ${nodename}. ; password: string: Password required to authenticate as admin, default empty! ;password= ; userpass: string: Password to authenticate as observer user, default empty! ;userpass= ; timeout: int: Timeout until authentication succeeds in msec ; Defaults to waiting 30s until closing an unauthenticated connection ; Set to zero to disable else enforced minimum value is 5000 ms (5s) ;timeout=30000 ; telnet: bool: Initiate TELNET negotiation on connect ;telnet=yes ; output: bool: Enable output as soon as connecting ; This setting is ignored if an userpass is set ;output=no ; debug: bool: Enable local debug as soon as connecting ; This setting is ignored if any password is set ;debug=no ; color: bool: Enable colorization debug as soon as connecting ; This setting is ignored if telnet negotiation is disabled ;color=no ; interactive: bool: Disable the TCP coalescing to improve interactivity ; This is almost never required and needs Yate to run as superuser ;interactive=no ; maxhistory: int: Number of distinct lines to preserve in the session history ; The Up / Down arrow keys allow cycling through the history ;maxhistory=10 ; context: string: SSL context to use to secure the connection ; Setting a context enables SSL on the listener and overrides any domain ;context= ; domain: string: Domain used to identify the SSL context to use ; Setting a domain enables SSL on the listener ;domain= ; verify: keyword: SSL handshake client certificate verification type ; For acceptable values see the documentation of the openssl module ; By default no client certificate is required ;verify= ; Initial aliases can be created for each connection ; Each declaration line starts with alias: and may include \0 as placeholder ; for the line entered in rmanager and \1 ... \9 for individual components ; Example: ; alias:cgu=control \1/ISUP unblock force=yes circuits=\2
See also