This module allows executing Ruby scripts from the Kamailio configuration file. It exports all KEMI functions to Ruby in order to access the currently processed SIP message. These functions are available within the Ruby module 'KSR'. IMPORTANT: because of Ruby language policy (which require that a public submodule name has to start with an uppercase letter), the KSR submodule names are with all letters uppercase. For example, what is documented as KSR.sl in KEMI docs, must be used as KSR::SL in Ruby scripts.
| Parámetro | Tipo | Descripción |
|---|---|---|
| load | str | 3.2. xval_mode (int) 3.3. modproc (str) |
| xval_mode | int | 3.3. modproc (str) |
| modproc | str | 3.1. load (str) |
| load | str | Set the path to the Ruby file to be loaded at startup. Then you can use Ruby_run(function, params) to execute a function from the script at runtime. If you use it for KEMI configuration, then it has t |
| xval_mode | int | Control if the external sub-module functions returning extended-values should propagate their string return value (when set to 0) or be replaced by NULL/nil (when set to 1). |
| modproc | str | The name of or the path to the required per-process API module. |
4.1. ruby_run(function, params)
Execute the Ruby function 'func' giving params as parameters. There can be up to 3 string parameters. The function must exist in the script loaded at startup via parameter 'load'. Parameters can be strings with pseudo-variables that are evaluated at
Copyright © 2018 Daniel-Constantin Mierla (asipto.com)