Asterisk Client - Download, Build and Install V2.1

From ProjectDiaStar

Jump to: navigation, search

Contents

Getting the source code

The source code for the Asterisk Woomera channel driver is distributed on the DiaStar™ Server ISO Install CD.
It is recommended that you use the version from the DiaStar installation CD which can be found in the extras folder on the CD.

 /extras/asterisk-chan-woomera-{version}.tar.gz 

Alternately you can get chan_woomera from source control. It is however recommended that you use the version of chan_woomera that corresponds to the version of the DiaStar Server that you are running.

The URL below will checkout the latest development trunk:

# svn checkout svn://svn.projectdiastar.org/diastar/trunk/clients/asterisk/chan_woomera

Released versions are also available:

# svn checkout svn://svn.projectdiastar.org/diastar/tags/REL-{version}/clients/asterisk/chan_woomera

Asterisk

Asterisk must be installed before the chan_woomera driver is built. Asterisk installation is well documented here. However, there may be an unfulfilled dependency on CDRs as Open Database Connect libraries are not usually part of a basic CentOS install. To get around this:

# ./configure
# make menuselect   (and then turn off the first three CDR options)
# make install

chan_woomera Build and Install

chan_woomera is built and installed with the makefile that accompanies it.

Before executing, the makefile needs to know where the Asterisk installation is located so that it can find Asterisk header files and install its shared object library in the correct place.

The environment variable PBXDIR is used. This can be done in several ways:

# export PBXDIR=/asterisk_is_here/asterisk-1.6.1.12
# make install

or

# make PBXDIR=/asterisk_is_here/asterisk-1.6.1.12
# make install

If PBXDIR is not specified, /usr/src/asterisk is used. A copy of PBXDIR is also kept in the file .pbxdir and referenced in subsequent builds.

The install option copies the chan_woomera.so module into /var/lib/asterisk/modules and also puts a copy of woomera.conf into /etc/asterisk if one is not already there.

Doxygen code documentation may be generated using the docs make target

# export PBXDIR=/asterisk_is_here/asterisk-1.6.1.12
# make docs

Configuration

The Asterisk configuration options for chan_woomera can be modified by editing the file /etc/asterisk/woomera.conf.
The default woomera.conf file, with explanations for each parameter, follows:

;-----------------------------------------------------------------------------
;
;  Example configuration file for the Asterisk chan_woomera channel driver
;  when used in conjunction with DiaStar Server.
;-----------------------------------------------------------------------------

;===========================================================================
; Global Configuration Section
;===========================================================================
[settings]

;---------------------------------------------------------------------------
; Debug level for the chan_woomera driver message output in Asterisk
;
; Options:
;   0 - No debug messages
;   1 - Error messages
;   2 - Warning messages (default)
;   3 - Info messages
;   4 - Debug messages
;   5 - Trace messages
;------------------------------
debug=2

;===========================================================================
; Dialplan Application Configuration Section
;===========================================================================
[applications]

;---------------------------------------------------------------------------
; Supported applications.
;------------------------------
WoomeraPlayback=1
WoomeraBackground=1
WoomeraRecord=1

;===========================================================================
;Default Profile Configuration Section
;===========================================================================
[default]

;---------------------------------------------------------------------------
; DiaStar Server IP Address or hostname
;
; This is the remote ip address of the DiaStar Server
; Both Asterisk and the DiaStar Server may reside on same machine.
;------------------------------
host=localhost

;---------------------------------------------------------------------------
; DiaStar Server TCP Port
;
; This is the remote port number of the DiaStar Server
;
; Range:
;   Valid port number (0-65535)
;   42420 (default)
;------------------------------
port=42420

;---------------------------------------------------------------------------
; Enable native media bridging.
;------------------------------
bridge_enable=1

;---------------------------------------------------------------------------
; Enable RTP audio transport (disables raw udp)
;------------------------------
rtp_enable=1

;---------------------------------------------------------------------------
; Enable RTP video transport (only enable when using video)
;------------------------------
vrtp_enable=1

;---------------------------------------------------------------------------
; The local IP address used for UDP based audio and video streaming.
; If Asterisk and the DiaStar Server reside on the same machine then the
; loopback address 127.0.0.1 can be used.
; Otherwise the external IP address assigned to the NIC on the Asterisk server
; should be used.
;------------------------------
audio_ip=127.0.0.1

;---------------------------------------------------------------------------
; UDP ports used for receiving audio.  Note that this is if/when raw audio
; streaming is supported.  RTP ports are handled by Asterisk core and their
; range is defined in rtp.conf.
;------------------------------
base_media_port=10000
max_media_ports=1000

;---------------------------------------------------------------------------
; Hard limit for woomera channels
; Set this value based on number of channels supported.
; If unsure set this value to 0.
;
; Options:
;   1 to 720 - limited calls
;   0 - unlimited Calls (default)
;------------------------------
max_calls=0

;---------------------------------------------------------------------------
; Incoming Context
; All incoming calls will be forwarded to defined context in extensions.conf
;------------------------------
context=dialogic

;---------------------------------------------------------------------------
; Default language. This _must_ be defined before group.
; Affects media play/record
; May be overridden using dialplan channel var e.g. Set(CHANNEL(language)=en_GB)
;------------------------------
language=en_US

;---------------------------------------------------------------------------
; IMPORTANT: Do not change or remove this setting.
;------------------------------
group=1

;---------------------------------------------------------------------------
; Preferred audio encoding
;
; Options:
;   ulaw (Default)
;   alaw
;------------------------------
coding=ulaw

;---------------------------------------------------------------------------
; Preferred video encoding
;
; Options:
;   h263 (Default)
;   mpeg4
;   
;------------------------------
videocoding=h263

;---------------------------------------------------------------------------
; Enable Incoming DTMF detection in Asterisk
; This option will enable Rx DTMF detection on each channel.
; The Tx DTMF is automatically enabled on the DiaStar Server.
; If you don't need DTMF detection from Asterisk, do not enable it.
;
; Options:
;   1 - Enable DTMF
;   0 - Disable DTMF (default)
;------------------------------
dtmf_enable=0

;---------------------------------------------------------------------------
; Enable outgoing DTMF sending using out-of-band using Woomera messages.
; When not enabled, DTMF will be sent by Asterisk using in-band tones.
;
; Options:
;   1 - Enable out-of-band DTMF (default)
;   0 - Disable DTMF out-of-band
;------------------------------
;send_dtmf=0

;---------------------------------------------------------------------------
; Enable Jitter buffer for this profile
; This option is tied to the above global jitter buffer options.
; NOTE: a jb patch must be applied to Asterisk.
;
; Options:
;   1 - Enable JitterBuffer (default)
;   0 - Disable JitterBuffer
;-------------------------------------
jb_enable=1

;---------------------------------------------------------------------------
; Enable Asterisk Progress Messaging
; Used for Asterisk Early Audio with Zap and SIP.
;
; Options:
;   1 - Enable ProgresMsg
;   0 - Disable ProgresMsg (default)
;------------------------------------
progress_enable=0

;---------------------------------------------------------------------------
; Gain applied to raw udp Rx audio frames
;
; Rx gain = 10^(rxgain/20.0)
;
; Options:
;   0.0 - disables Rx gain (gain of 1.0)
;   Other values are used in the 'Rx gain' equation for scaling audio values.
;------------------------------
rxgain=1.0

;---------------------------------------------------------------------------
; Gain applied to raw udp Tx audio frames
;
; Tx gain = 10^(txgain/20.0)
;
; Options:
;   0.0 - disables Tx gain (gain of 1.0)
;   Other values are used in the 'Tx gain' equation for scaling audio values.
;------------------------------
txgain=1.0

;---------------------------------------------------------------------------
; Woomera raw UDP Sequencing
;
; This option MUST be also supported by the server.
; Should be used for debugging.
;
; Options:
;   0 - Disable (default)
;   1 - Enable
;------------------------------
woomera_udp_seq=0

;---------------------------------------------------------------------------
; Option to enable/disable inbound calls.
;
; Options:
;   0 = Don't allow inbound calls
;   1 = allow inbound calls (Default)
;------------------------------
inbound=1

;---------------------------------------------------------------------------
; Option to enable/disable outbound calls.
;
; Options:
;   0 = Don't allow outbound calls
;   1 = allow outbound calls (Default)
;------------------------------
outbound=1

; eof

Verification Demo

A SIP-based verification demo for Asterisk and DiaStar should also be run to insure their operation together.
An Asterisk dialplan, externsions-verification.conf, is included on the DiaStar installation CD in the "extras" directory.
The media for the demo is pre-installed on the DiaStar server.

To test place a sip call to the IP address of the DiaStar server. Any or no SIP user name can be given.
A simple IVVR verification demo should be seen, which allows the caller to work through several menus, play two video clips or record one.

Profiles

There are multiple options for deploying DiaStar™ Servers with Asterisk.

  • Co-Resident Asterisk and the DiaStar™ Server
  • 1 Asterisk to 1 DiaStar™ Server
  • N Asterisks to 1 DiaStar™ Server
  • 1 Asterisk to N DiaStar™ Servers
  • N Asterisks to N DiaStar™ Servers

These deployment options are configured using profiles that are specified in the woomera.conf file.

Co-Resident Asterisk and the DiaStar™ Server

First, it is also possible to locate the client and server on the same system, connected using the local loopback IP interface:


File:coresident.jpg

For this configuration, set

host=localhost

and

audio_ip = 127.0.0.1

1 Asterisk to 1 DiaStar™ Server

The standard woomera.conf file is shipped with a single 'default' profile. This profile describes a simple deployment using 1 Asterisk and 1 DiaStar™ Server:


File:singletwosys1.jpg


Only two lines in woomera.conf need to be modified. The first should be set to the IP address of the DiaStar™ Server:

;---------------------------------------------------------------------------
; DiaStar Server IP Address or hostname
;
; This is the remote ip address of the Woomera Server
; Both Asterisk and the Woomera Server may reside on same machine.
;----------------------------
host=192.168.1.101

and the second to the IP address of the external ethernet NIC on the Asterisk client:

;---------------------------------------------------------------------------
; The local IP address used for UDP based audio streaming.
; If Asterisk and the DiaStar Server reside on the same machine then the
; loopback address 127.0.0.1 can be used.
; Otherwise the external IP address assigned to the NIC on the Asterisk server
; should be used.
;------------------------------
audio_ip=192.168.1.102

N Asterisks to 1 DiaStar™ Server

This is similar to the example just given, except that there will be multiple Asterisk clients:


File:multiasterisks1.jpg


Each has its own woomera.conf file. So, the "host" parameter will be set to the IP address of the same DiaStar™ Server in all woomera.conf files. The "audio_ip" parameter will be set to the external Ethernet NIC address for each individual system.

An inbound call that arrives on a physical connection to a DiaStar™ Server is offered to all Asterisk clients that have registered with the server. The first client to accept the call gets it.

1 Asterisk to N DiaStar™ Servers

In this case, there is more than one DiaStar™ Server:


File:multiwoomera1.jpg


A new profile for each DiaStar™ Server must be added. Copy the entire existing default profile that begins here:

;===========================================================================
;Default Profile Configuration Section
;===========================================================================
[default]

and runs through the end of the file. Rename the profile:

 ;===========================================================================
 ;Woomera 1 Profile Configuration Section
 ;===========================================================================
 [woomera1]

Set the "host" parameter under this profile to the IP address of the DiaStar™ Server.

Outbound calls from an Asterisk client that is connected to more than one Woomera server needs to specify which server should be used to make the call. See the "Outbound Calls/Profiles" section of the Asterisk Client (chan_woomera) - User's Guide for more information.


N Asterisks to N DiaStar™ Servers

Any N to N configuration can be arrived at by keeping these rules in mind:

  • Use a uniquely named profile in woomera.conf for each DiaStar™ Server that an Asterisk client will access
  • The DiaStar™ Server described by that profile will have a unique IP address set by the "host" parameter
  • All "audio_ip" parameters in all profiles will be set to the same external Ethernet NIC on the Asterisk client
Personal tools