Daniel-Constantin Mierla e43191620f app_python: include dset.h 15 years ago
..
doc bd93ff3ab2 app_python: added skeleton for docs 16 years ago
Makefile 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
README bd93ff3ab2 app_python: added skeleton for docs 16 years ago
handler.py 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_exec.c 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_exec.h 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_iface.c 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_iface.h 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_mod.c 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_mod.h 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_msgobj.c e43191620f app_python: include dset.h 15 years ago
python_msgobj.h 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_support.c 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago
python_support.h 2cef856586 Revert "Revert "Add Python module, still WIP, but should be usable. No xml"." 16 years ago

README

app_python Module

Maxim Sobolev

Edited by

Maxim Sobolev

Copyright � 2010 Maxim Sobolev
__________________________________________________________________

Table of Contents

1. Admin Guide

1.1. Overview
1.2. Dependencies

1.2.1. Kamailio Modules
1.2.2. External Libraries or Applications

1.3. Exported Parameters

1.3.1. script_name (string)
1.3.2. mod_init_function (string)
1.3.3. child_init_method (string)

1.4. Exported Functions

1.4.1. python_exec(method [, mystr])

List of Examples

1.1. Set script_name parameter
1.2. Set mod_init_function parameter
1.3. Set child_init_method parameter
1.4. python_exec usage

Chapter 1. Admin Guide

1.1. Overview

This module allows executing Python scripts from config file, exporting
functions to access the SIP message from Python.

1.2. Dependencies

1.2.1. Kamailio Modules

The following modules must be loaded before this module:
* none.

1.2.2. External Libraries or Applications

The following libraries or applications must be installed before
running Kamailio with this module loaded:
* python-dev - Python devel library.

1.3. Exported Parameters

1.3.1. script_name (string)

TBD.

Default value is "/usr/local/etc/sip-router/handler.py".

Example 1.1. Set script_name parameter
...
modparam("app_python", "script_name", "/usr/local/etc/sip-router/myscript.py")
...

1.3.2. mod_init_function (string)

TBD.

Default value is "mod_init".

Example 1.2. Set mod_init_function parameter
...
modparam("app_python", "mod_init_function", "my_mod_init")
...

1.3.3. child_init_method (string)

TBD.

Default value is "child_init".

Example 1.3. Set child_init_method parameter
...
modparam("app_python", "child_init_method", "my_child_init")
...

1.4. Exported Functions

1.4.1. python_exec(method [, mystr])

TBD.

Example 1.4. python_exec usage
...
python_exec("...");
python_exec("...", "...");
...