This module allows executing Python scripts from config file, exporting functions to access the SIP message from Python. For some basic examples of Python scripts that can be used with this module, look at the files inside source tree located at 'modules/app_python/python_examples/'. As python2 is deprecated in Debian and other distributions, please use the “app_python3” module instead. This module will be removed in a future release.
| Parámetro | Tipo | Descripción |
|---|---|---|
| load | string | 3.2. script_name (string) 3.3. mod_init_function (string) 3.4. child_init_method (string) |
| script_name | string | 3.3. mod_init_function (string) 3.4. child_init_method (string) |
| mod_init_function | string | 3.4. child_init_method (string) |
| child_init_method | string | 3.1. load (string) |
| load | string | The path to the file with Python code to be executed from configuration file. |
| script_name | string | This is same as "load" parameter, kept for backward compatibility with the older versions of the module. |
| mod_init_function | string | The Python function to be executed by this module when it is initialized by Kamailio. |
| child_init_method | string | The Python function to be executed by this module when a new worker process (child) is initialized by Kamailio. |
4.1. python_exec(method [, args])
Execute the Python function with the name given by the parameter 'method'. Optionally can be provided a second string with parameters to be passed to the Python function.
Copyright © 2010 Maxim Sobolev