Tuesday, June 17, 2008

Asterisk

Asterisk is an open source PBX software, it works wonders If you want to use at home or at a small business. I'm trying to convince my place of employment to switch over to Asterisk since they are looking for a new phone setup. I will be using Cisco 7940 phones using the sip protocol. To install Asterisk you need to have source tree installed. The install is straight foward. You change to the asterisk port directory.
#cd /usr/ports/net/asterisk12
#make install clean
I used all the default compile settings.
I launched asterisk to make sure everything was working just fine. I used this following command which will also log you into the asterisk terminal.
#asterisk -vvvvvvvvvvvvvvc
That is 14 v's
Once asterisk was running I installed asterisk-gui.
#cd /usr/ports/www/asterisk-gui
#make install clean
In the compile settings I checked sip and load default config files everything else is default.
No after is done compiling there are some tweaks you have to make to enable it on the conf files.
#cd /usr/local/etc/asterisk
First we are going to edit the manager.conf file
#nano manager.conf
It should read as follows
'displayssystemname = yes
enabled = yes
webenabled = yes
port = 5038
httptimeout = 60
bindaddr = 0.0.0.0'
Save
Next we edit the http.conf file
#nano http.conf
The top portion should be as follows
'enabled=yes
enablestatic=yes
bindaddr=0.0.0.0
bindport=8088'
Save an exit
I have the following at the end of manager.conf for a user names cmclaine it is completley optional but it makes my life easier so I would assume it would do the same for you.
'[cmclaine]
secret=password
permit=10.10.10.197/255.255.255.0
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config'
The permit line allows another IP address to connect to the asterisk-gui because by default on localhost can connect to asterisk-gui. You are done configuring asterisk-gui.
I've noticed if you do a reload in asterisk it wont always reload everything so go ahead and reboot your box then you can run asterisk.
#asterisk -vvvvvvvvvvvvvc

No comments: