SettingUpAsterisk
Setting up Asterisk Configuration Files
NOTE: If you are running FreePBX, there is a module that makes configuration much easier:
http://sourceforge.net/projects/safiserverfreep/
The network layout used in this example is the following:
In order for the SafiServer to make a connection to the Asterisk PBX and handle events, it will need to have a valid entry set up in the manager.conf file on the Asterisk Server (located by default in /etc/asterisk/).
Here is an example entry from the manager.conf file where the SafiServer is located at 192.168.0.200 :
[username] secret=password deny=0.0.0.0/0.0.0.0 permit=192.168.0.200/255.255.255.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user write = system,call,log,verbose,command,agent,user,originate
While you're in the manager.conf file; make sure that the manager API is enabled (found at the top of the config file):
[general] enabled=yes port=5038 bindaddr=0.0.0.0 webenabled=no
The next file that needs to be altered is the extensions.conf file (also located by default in /etc/asterisk/). The following example assumes that your SafiServer is at 92.168.0.10 and the Saflet that you wish to call is callflow1 in the project of demo :
exten => 9998,1,Agi(agi://192.168.0.200/safletEngine.agi?saflet=demo/callflow1) exten => 9998,2,Hangup()
Once changes have been made (and saved) to the manager.conf and extensions.conf files you can reload with the following commands:
# asterisk -r CLI> reload
To see how to add an Asterisk server from SafiServer, see the following walkthrough:
Adding an Asterisk Server to SafiServer
SideBar
User Login