Asterisk Installation

Top  Previous  Next

AgileVoice uses a single shell control script to automate the provisioning and rating process.  Below outlines the steps required to configure them and install them on your Asterisk system.

 

We do not cover the installation or configuration of Asterisk. This is left as an exercise to the reader. We are a billing and provisioning solution provider. We are not a technical support contact for Asterisk configuration details.

 

Important: You should ensure that you have a working backup of the entire Asterisk system, before proceeding.

 

Depending on your operating system, Asterisk stores its' configuration files in different locations.

 

Linux: /etc/asterisk

Solaris: /etc/opt/asterisk

 

 

1.Edit the scripts shown below, changing the database connection parameters and other pertinent information related to your company.

 

agilevoice.properties

agileengine.properties

hibernate.cfg.xml

 

2.Place the following entries in crontab to enable the scripts to automatically generate the necessary Asterisk configuration files every 15 minutes.  These configuration files are only generated if a change was detected in the billing and provisioning system.  This helps reduce the load on the Asterisk system.

 

Linux: Edit /etc/crontab

*/15 * * * * root /opt/agilevoice/run-av.sh -ptv

*/15 * * * * root /opt/agilevoice/run-av.sh -r 

 

Solaris: EDITOR=vi crontab -e

0,15,30,45 * * * * /opt/agilevoice/run-av.sh -ptv

0,15,30,45 * * * * /opt/agilevoice/run-av.sh -r

 

3.Edit your sip.conf and place the following line at the very end of the file:

 

#include "sip_agilevoice.conf"

 

4. Edit your iax.conf and place the following line at the very end of the file:

 

#include "iax_agilevoice.conf"

 

5. Edit your extensions.conf and place the following line into the [default] context.

 

#include "extensions_agilevoice.conf"

 

6. If you have the professional version of AgileVoice, the following macro must be installed in extensions.conf :

 

[macro-agilevoice]

;     1          2           3             4             5               6        7

; [dialstr] [extension] [callforward] [ringbeforecf] [vmafter/dialfor] [bcf] [failover]

exten => s,1,GotoIf($["${ARG3}" = ""]?20:2)

exten => s,2,NoOp("Call forwarding enabled")

exten => s,3,Dial(${ARG1},${ARG4},jo)

exten => s,4,Dial(Local/${ARG3}@longdistance/n,${ARG5},jo)

exten => s,5,Voicemail(u${ARG2})

exten => s,6,Hangup()

exten => s,104,Goto(s|4)

exten => s,105,Goto(s|500)

exten => s,106,Hangup()

 

 

exten => s,20,NoOp("No call forwarding enabled")

exten => s,21,Dial(${ARG1},${ARG5},jo)

exten => s,22,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?700:23) ; goto failover

exten => s,23,Voicemail(u${ARG2})

exten => s,24,Hangup()

exten => s,122,Goto(s|500) ; bcf logic

 

 

exten => s,500,NoOp("Performing busy call forwarding")

exten => s,501,GotoIf($["${ARG6}" = ""]?504:502)

exten => s,502,Dial(Local/${ARG6}@longdistance/n,${ARG5},jo)

exten => s,503,Hangup

exten => s,504,Voicemail(b${ARG2})

exten => s,505,Hangup

exten => s,603,Goto(s|504)

 

exten => s,700,NoOp("Failover logic")

exten => s,701,GotoIf($["${ARG7}" = ""]?803:702)

exten => s,702,Dial(Local/${ARG7}@longdistance/n,${ARG5},jo) ; FAILOVER

exten => s,703,Hangup

exten => s,803,Voicemail(u${ARG2})

 

exten => a,1,VoicemailMain()

exten => a,2,Hangup

 

7. If you have the professional version of AgileVoice, Asterisk from SolarisVoip.com, and you wish to use the HTML based voicemail email notices, then you may customize the template used to generate the voicemail and fax notifications.  The files used to generate the notifications are listed below.

 

Linux:

/etc/asterisk/vm_template.html

/etc/asterisk/fax_template.html

 

Solaris:

/etc/opt/asterisk/vm_template.html

/etc/opt/asterisk/fax_template.html

 

8. To enable web access to voicemail messages, a NFS mount is created on the AgileVoice system, to mount the proper voicemail directory on the Asterisk server.

 

Linux: /var/spool/asterisk/voicemail

Solaris: /var/opt/spool/asterisk/voicemail