# &adminguide;

## Overview

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

## Dependencies

### &kamailio; Modules

The following modules must be loaded before this module:

- none.

### External Libraries or Applications

The following libraries or applications must be installed before running &kamailio; with this module loaded:

- python-dev - Python devel library.

## Parameters

### `script_name` (string)

TBD.

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

#### Set `script_name` parameter

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

### `mod_init_function` (string)

TBD.

Default value is mod_init.

#### Set `mod_init_function` parameter

    ...
    modparam("app_python", "mod_init_function", "my_mod_init")
    ...

### `child_init_method` (string)

TBD.

Default value is child_init.

#### Set `child_init_method` parameter

    ...
    modparam("app_python", "child_init_method", "my_child_init")
    ...

## Functions

### `python_exec(method [, mystr])`

TBD.

#### `python_exec` usage

    ...
    python_exec("...");
    python_exec("...", "...");
    ...