← Volver al índice de módulos

app_python

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, lo
⚙️ Scripting e Integración Kamailio 6.1 8 parámetros 2 funciones

Descripción general

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.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/app_python.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/app_python

Parámetros de configuración

ParámetroTipoDescripció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.

Funciones exportadas

python_exec(method [, args])

4.1. python_exec(method [, args])

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.

Autores y contribuidores

Maxim Sobolev

Copyright © 2010 Maxim Sobolev

Módulos relacionados

app_lua app_perl app_python3 app_python3s app_ruby app_ruby_proc async evapi