External Module
From Yate Documentation
(Difference between revisions)
(Created page with " External Module allows you to use channel or global scripts in Yate. These modules can be started from Yate and communicate through pipes to the extmodule. They can also be ...") |
|||
Line 2: | Line 2: | ||
External Module allows you to use channel or global scripts in Yate. | External Module allows you to use channel or global scripts in Yate. | ||
− | These modules can be started from Yate and communicate through pipes to the extmodule. | + | These modules can be started from Yate and communicate through pipes to the extmodule.<br> |
They can also be started from outside Yate and connect to a TCP or UNIX socket if a listener is configured. | They can also be started from outside Yate and connect to a TCP or UNIX socket if a listener is configured. | ||
Line 70: | Line 70: | ||
; The parameter is optional and if present is passed to the program as the first | ; The parameter is optional and if present is passed to the program as the first | ||
; (and single) parameter | ; (and single) parameter | ||
+ | |||
+ | IMPORTANT: If an external module fails to start the exact reason why is not displayed in rmanager.<br> | ||
+ | You should instead examine the logs that will hold the reason the exec() has failed. | ||
+ | |||
+ | Also take a look at: How To For External Modules In Telnet |
Revision as of 13:56, 31 October 2012
External Module allows you to use channel or global scripts in Yate.
These modules can be started from Yate and communicate through pipes to the extmodule.
They can also be started from outside Yate and connect to a TCP or UNIX socket if a listener is configured.
Configuration
File extmodule.conf:
[general] ; General settings for the external module ; scripts_dir: string: The absolute or relative path used by default to load ; scripts if no full path is specified ; Note that a trailing path separator should be added ; Uncomment the following line when running in the sources directory ;scripts_dir=share/scripts/ ; priority: int: Priority of the call.execute handler ;priority=100 ; timeout: int: How many milliseconds to wait for a module to answer ;timeout=10000 ; timebomb: bool: Kill the module instance if it timed out ;timebomb=false ; waitflush: int: Milliseconds to wait at script shutdown after waiting messages ; and message relays are flushed, valid range 1-100 ms ;waitflush=5 ; trackparam: bool: Add the external module to the handler tracking parameter ; The default of false lets each external script do so ;trackparam=false ;[listener sample] ; For each socket listener there should be a section starting with the ; "listener" keyword ; type: keyword: Type of socket - "unix" or "tcp" ; path: string: Path of the UNIX socket to create ; addr: string: IP address to bind the TCP socket to ;addr=127.0.0.1 ; port: int: TCP port to bind to, must be positive ; role: keyword: Role of incoming connections - "global", "channel" or don't set [scripts] ; Add one entry in this section for each global external module that is to be ; loaded on Yate startup ; Each line has to be on the form: ; scriptname=parameter ; The script name should hold either the absolute path and name or the path ; and name relative to the scripts_dir in section [general] ; The parameter is optional and if present is passed to the script as the first ; (and single) parameter [execute] ; Add one entry in this section for each external program that is to be ; executed on Yate startup ; Each line has to be on the form: ; progname=parameter ; The program name should hold the absolute path to the program ; The parameter is optional and if present is passed to the program as the first ; (and single) parameter
IMPORTANT: If an external module fails to start the exact reason why is not displayed in rmanager.
You should instead examine the logs that will hold the reason the exec() has failed.
Also take a look at: How To For External Modules In Telnet