User GuidesBack to Flexor Software User Guides

Administrator setup: Configuring your Asterisk server to work with Flexor Manager


Server Configuration

Flexor Manager communicates with an Asterisk server using the Asterisk Manager Interface (AMI). In order to use Flexor Manager with Asterisk, you must enable the AMI on the server. This is done by ensuring the following lines are present in the manager.conf file of your server configuration:

[general]
enabled = yes
port = 5038
writetimeout=1000

manager.conf entry to enable AMI

5038 is the standard port for AMI, but you can use any other available port, as this can be configured in Flexor Manager when adding the server in Devices and Applications.

Please note it may also be necessary to increase the writetimeout value if you find the connection to the Asterisk server is dropped.

To allow your users to connect to the AMI server, you must define a user login in manager.conf. Although it is possible to have almost complete control of the server using the AMI, Flexor Manager requires access only to certain commands. As your users will need to be given the AMI username and password, it is recommended that the AMI user you create does not grant permission to access any more commands than is necessary. 

Please also make sure access to the AMI is allowed from IP addresses on your network. Some Asterisk configurations only permit connections from the host computer (127.0.0.1). The permit setting needs to be changed to include the IP addresses of the computers running Flexor. A restart of the Asterisk server may also be required after making any changes to the configuration files. For further assistance please contact your Asterisk PBX supplier.

Here is an example which defines the user 'amiuser' with password 'mysecret':

[amiuser]
secret = mysecret
read = call,agent
write = call

AMI user definition in manager.conf for Asterisk 1.4 (AMI 1.0)

[amiuser]
secret = mysecret
read = call,agent
write = call,originate

AMI user definition in manager.conf for Asterisk 1.6 (AMI 1.1)

The reason for the difference between the two versions is that the AMI version 1.1 provided in Asterisk 1.6 introduces an new permission 'originate' which is required if the user is to be allowed to originate calls. This is necessary for the Flexor Manager Asterisk driver to be able to perform click-to-dial requests from applications.

*** Please Note *** Some Asterisk platforms also require the addition of "System" to the write permissions of the AMI user. ***

If your organisation does not use call queues, you can omit the 'agent' read permission from the user definition. Flexor Manager only requires information about agents in order to handle calls received from queues properly.

Finally, in order that events indicating that calls have been put on hold or taken off hold can be received, you need to add the following line to sip.conf if it is not already present:

callevents=yes

Entry in sip.conf to enable hold events

After you have finished editing the configuration files, you will need to restart Asterisk for the changes to take effect.

Auto-answer configuration

Please note, this actually refers to outbound click to dial originated calls not inbound. Normally, when a call is made from an extension that is originated from the Asterisk server (or via the AMI), the user needs to "accept" the call. In the context of Flexor, this means that when a user clicks on a link in a CRM application to dial a number, the first thing that will happen is that their extension will start to ring. Only when they answer the ringing extension will the call be placed to the person that they want to talk to.

Flexor provides a facility to avoid this additional step when using SIP devices that support auto-answer, by allowing users to configure an auto-answer extension. This is an extension which forwards to their real extension in such a way that the phone automatically answers the call. To enable this, auto-answer extensions need to be configured on the server. One way of achieving this is to add an entry like this to the extensions.conf file:


exten => 0200,1,SIPAddHeader(Call-Info: <sip:10.0.0.26>\;answer-after=0)
exten => 0200,n,Dial(SIP/200)

*Replace 10.0.0.26 with the IP Address of your Asterisk Server
*Replace 0200 with a suitable auto-answer extension on your Asterisk Server
*Replace 200 with the real extension on your Asterisk Server


This defines an auto-answer extension "0200" corresponding to the extension "200". If a call is initiated from 0200, it has the effect of being a call from 200, but with the device registered to 200 auto-answering. To make this feature available to a Flexor user, you will also need to configure the device with the auto-answer extension corresponding to their 'real' extension.

The above is known to work with Linksys, Snom and Grandstream handsets. For Polycom handsets the following may be better.


exten => 0200,n,Set(_ALERT_INFO="RA")
exten => 0200,n,Dial(SIP/200)

If there is already a configured Dialplan for the extension or context, then the above lines need to be integrated into it.

For more information on Dialplan syntax and the meaning of the commands. Please click on the following external link.

https://wiki.asterisk.org/wiki/display/AST/Dialplan


Please note that auto-answer of IAX devices is not currently supported by Flexor.

This is only an example of how to provide auto-answer extensions on an Asterisk server, and is not intended to be a definitive solution. Some SIP clients may not support the answer-after header.

Not all SIP devices provide an auto-answer facility. You should check this in your Asterisk server and SIP device's documentation.

Other Languages

Camrivox is currently expanding its support for other languages. In the meantime, this web page can be accessed in other languages using Google's automated translation service below:

Search User Guides


Copyright © Camrivox 2008-2015.Website Terms of Use Policy - Privacy Policy - Terms & Conditions of Sale