Siproxd Users Guide
Prev | Chapter 5. Plug-ins | Next

# 5.2. Available Plug-ins

The following plug-ins are provided with siproxd:

1. `plugin_demo`

   Demo plug-in. Provides the basic framework to be used for plug-ins.

2. `plugin_logcall`

   Very simplistic call logging to syslog.

3. `plugin_shortdial`

   Quick Dial feature.

4. `plugin_defaulttarget`

   Incoming calls to a non-existing UA are redirected to a specific target (catch-all).

5. `plugin_fix_bogus_via`

   Fixes broken VIA headers on incoming calls.

6. `plugin_stun`

   Cyclically checks with an STUN server for the public IP address of siproxd.

Some of the plug-ins are described in more detail in the following chapters.

## 5.2.1. Demo Plug-in

Name: plugin_demo

Purpose: To be used as skeletton for your own plug-ins.

Configuration options:

    plugin_demo_string = This_is_a_string_passed_to_the_demo_plugin

Description:

This plug-in can be used as framework for your own plug-ins. It contains the required code for the API and also shows how to load plug-in specific configuration parameters.

## 5.2.2. Call Logging Plug-in

Name: plugin_logcall

Purpose: Does a very simplistic call logging to syslog.

Configuration options:

    none

Description:

The numbering starts with "1" ("*01") and every following "plugin_shortdial_entry" entry will allocate the following position. It is not possible to freely assign the positions.

## 5.2.3. Short Dial Plug-in

Name: plugin_shortdial.c

Purpose: Provides a quick-Dial feature.

Configuration options:

    # The first character is the "key", the following characters give
    # the length of the number string. E.g. "*00" allows speed dials
    # from *01 to *99. (the number "*100" will be passed through unprocessed)
    plugin_shortdial_akey = *00
    #
    # *01 sipphone echo test
    plugin_shortdial_entry = 17474743246
    # *02 sipphone welcome message
    plugin_shortdial_entry = 17474745000

Description:

Allows the definition of quick dial entries. E.g. *01 to *99 can be defined to redirect the caller. Note: Currently only the user part (phone number) can be replaced, the domain part will not be changed (means a short dial tarket of sip:111@other.domain.com will not work). The '*' character can be chosen freely (plugin_shortdial_akey). Note: To call a real number like "*12" you have to dial "**12"

## 5.2.4. Default Target Plug-in

Name: plugin_defaulttarget

Purpose: Incoming calls to non-existing local UAs are redirected to another SIP URI.

Configuration options:

    # Log redirects to syslog
    plugin_defaulttarget_log = 1
    # target must be a full SIP URI with the syntax
    # sip:user@host[:port]
    plugin_defaulttarget_target = sip:defaulttarget@some.sip.domain:port

Description:

Incoming SIP calls directed to a non-existing (registered) local UA will be redirected to another target. This basically implements a catch-all feature. The new target can be any SIP URI and is not required to be local.

## 5.2.5. Fix bogus Via Plug-in

Name: plugin_fix_bogus_via

Purpose: Fixes broken VIA headers on incoming SIP requests.

Configuration options:

    # Incoming (from public network) SIP messages are checked for broken
    # SIP Via headers. If the IP address in the latest Via Header is
    # part of the list below, it will be replaced by the IP where the
    # SIP message has been received from.
    plugin_fix_bogus_via_networks = 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16

Description:

Fixes broken VIA headers on incoming SIP requests (inspired by Ralph Babel, see http://babel.de/art20080317a.html for more info). Can be applied if you have remote UAs calling you from the Internet and those UAs do have crappy Via headers (like private IPs because there is some NAT involved on their side).

## 5.2.6. STUN Plug-in

Name: plugin_stun

Purpose: Uses an external STUN server to determine the public IP address of the host running siproxd.

Configuration options:

    # Plugin_stun
    #
    # Uses an external STUN server to determine the public IP
    # address of siproxd. Useful for "in-front-of-NAT-router"
    # scenarios.
    plugin_stun_server = stun.ekiga.net
    plugin_stun_port = 3478
    # period in seconds to request IP info from STUN server
    plugin_stun_period = 300

Description:

Does contact the configured STUN server at startup and then cyclically at the configured interval to determine the public visible IP address of the host running siproxd. Useful for setups that have changing public IP addresses and siproxd is running in the "in-front-of-NAT-router" scenario.

Prev | Home | Next
Plug-ins | Up | Troubleshooting