freeswitch Module

Liviu Chircu

   OpenSIPS Solutions
   <liviu@opensips.org>

Edited by

Liviu Chircu

   Copyright © 2017 www.opensips-solutions.com
     __________________________________________________________

   Table of Contents

   1. Admin Guide

        1.1. Overview
        1.2. External Libraries or Applications
        1.3. Exported Parameters

              1.3.1. event_heartbeat_interval (integer)
              1.3.2. esl_connect_timeout (integer)
              1.3.3. esl_cmd_timeout (integer)
              1.3.4. esl_cmd_polling_itv (integer)

        1.4. Exported Functions

   List of Examples

   1.1. Setting the event_heartbeat_interval parameter
   1.2. Setting the esl_connect_timeout parameter
   1.3. Setting the esl_cmd_timeout parameter
   1.4. Setting the esl_cmd_polling_itv parameter

Chapter 1. Admin Guide

1.1. Overview

   The "freeswitch" module is a C driver for the FreeSWITCH Event
   Socket Layer interface. It can interact with one or more
   FreeSWITCH servers either by issuing commands to them, or by
   receiving events from them.

   This driver can be seen as a centralized FreeSWITCH ESL
   connection manager. OpenSIPS modules may use its API in order
   to easily establish, reference and reuse ESL connections.

   A FreeSWITCH ESL URL is of the form:
   fs://[username]:password@host[:port]. The default ESL port is
   8021.

1.2. External Libraries or Applications

   The following libraries or applications must be installed
   before running OpenSIPS with this module loaded:
     * None

1.3. Exported Parameters

1.3.1. event_heartbeat_interval (integer)

   The expected interval between FreeSWITCH HEARTBEAT event
   arrivals.

   Default value is “1” (second).

   Example 1.1. Setting the event_heartbeat_interval parameter
...
modparam("freeswitch", "event_heartbeat_interval", 20)
...

1.3.2. esl_connect_timeout (integer)

   The maximally allowed duration for the establishment of an ESL
   connection.

   Default value is “5000” (milliseconds).

   Example 1.2. Setting the esl_connect_timeout parameter
...
modparam("freeswitch", "esl_connect_timeout", 3000)
...

1.3.3. esl_cmd_timeout (integer)

   The maximally allowed duration for the execution of an ESL
   command. This interval does not include the connect duration.

   Default value is “5000” (milliseconds).

   Example 1.3. Setting the esl_cmd_timeout parameter
...
modparam("freeswitch", "esl_cmd_timeout", 3000)
...

1.3.4. esl_cmd_polling_itv (integer)

   The sleep interval used when polling for an ESL command
   response. Since the value of this parameter imposes a minimal
   duration for any ESL command, you should run OpenSIPS in debug
   mode in order to first determine an expected response time for
   an arbitrary ESL command, then tune this parameter accordingly.

   Default value is “1000” (microseconds).

   Example 1.4. Setting the esl_cmd_polling_itv parameter
...
modparam("freeswitch", "esl_cmd_polling_itv", 3000)
...

1.4. Exported Functions
