diff --git a/modules/app_python/doc/app_python_admin.xml b/modules/app_python/doc/app_python_admin.xml index 56aa4df2e84..ef726c4664a 100644 --- a/modules/app_python/doc/app_python_admin.xml +++ b/modules/app_python/doc/app_python_admin.xml @@ -20,6 +20,11 @@ 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/'. +
Dependencies @@ -56,18 +61,19 @@
<varname>script_name</varname> (string) - TBD. + The path to the fiel with Python code to be executed + from configuration file. - Default value is /usr/local/etc/sip-router/handler.py. + Default value is /usr/local/etc/kamailio/handler.py. Set <varname>script_name</varname> parameter ... -modparam("app_python", "script_name", "/usr/local/etc/sip-router/myscript.py") +modparam("app_python", "script_name", "/usr/local/etc/kamailio/myscript.py") ... @@ -76,7 +82,8 @@ modparam("app_python", "script_name", "/usr/local/etc/sip-router/myscript.py")
<varname>mod_init_function</varname> (string) - TBD. + The Python function to be executed by this module when + it is initialied by &kamailio;. @@ -96,7 +103,8 @@ modparam("app_python", "mod_init_function", "my_mod_init")
<varname>child_init_method</varname> (string) - TBD. + The Python function to be executed by this module when + a new worker process (child) is initialied by &kamailio;. @@ -119,17 +127,19 @@ modparam("app_python", "child_init_method", "my_child_init") Functions
- <function moreinfo="none">python_exec(method [, mystr])</function> + <function moreinfo="none">python_exec(method [, args])</function> - TBD. + 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. <function>python_exec</function> usage ... -python_exec("..."); -python_exec("...", "..."); +python_exec("my_python_function"); +python_exec("my_python_function", "my_params"); ...