Настройка AsteriskNow после установки (Eng)
Well after much researching I have complied a procedure to help people install AsteiskNow from scratch. Hope this helps.
Install AsteriskNOW 1.5.0 from CD.
After installation first boot will prompt with Setup-Agent to enter IP address, subnet mask, and gateway.
# vi /etc/resolv.conf
(add DNS servers ex. Nameserver 192.168.1.2)
# /etc/init.d/network restart
# yum update
(reply ’y’ when prompted.)
# yum install kmod-dahdi-linux-PAE(reply ’y’ when prompted.)
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.1.tar.gz (or latest version).
# tar -xvvzf libpri-1.4.10.1.tar.gz
# cd libpri-1.4.10.1
# make
# make install
# rm libpri-1.4.10.1.tar.gz
# vi /etc/php.ini
(change (increase) memory_limit=16M TO memory_limit=100M under RESOURCE LIMITS header)
# reboot
# dahdi_genconf
# cp /etc/asterisk/chan_dahdi.conf.template /etc/asterisk/chan_dahdi.conf
# vi /etc/asterisk/chan_dahdi.conf
Enter the following not including this line replacing ALL original text in file. I am using a TE210P card for T1 if you are using an Analog card you do not need to replace this files contents.
;# Flash Operator Panel will parse this file for dahdi trunk buttons
;# AMPLABEL will be used for the display labels on the buttons
;# %c Dahdi Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n
;# For Dahdi/* buttons use the following
;# (where x=number of buttons to dislpay)
;# ;AMPWILDCARDLABEL(x):MyLabel
[trunkgroups]
[channels]
language=en
;; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf
#include dahdi-channels.conf
eof (do not include this line in the code above)
# amportal stop
# dahdi_cfg
# amportal start
Install Asterisk addons
# yum install asterisk-addons
(reply ’y’ when prompted.)
# amportal restart
Install FTP service ( I use ftp instead of tftp for the phone config files so I can use an easy ftp program like Filezilla to transfer the files around )
# yum install vsftpd
(reply ’y’ when prompted.)
edit vsftpd config file to remove anonymous access then start the service and enable it to start on boot.
# vi /etc/vsftpd/vsftpd.conf
# chkconfig vsftpd on
# /etc/init.d/vsftpd start
Create ftp user poly (or whatever you want) for phone config files.
# useradd -G ftp poly
Create password for poly ftp account.
# passwd thepassword
# chown poly:ftp /home/poly
# chmod 755 /home/poly
# /etc/init.d/vsftpd restart
Enable remote MySQL access if you use another program to manage your db
# mysql -uroot -p
Hit enter again when prompted for password
mysql> GRANT ALL ON asterisk.* TO root@'10.101.4.%';
mysql> exit
Edit Apache config file to get rid of a few errors on the freepbx panel that wont make any sense to you.
# vi /etc/httpd/conf/httpd.conf
Change
User apache
Group apache
TO
User asterisk
Group asterisk
Restart apache service
# apachectl -k restart
FreePBX set up
log on to web interface using server IP address in browser.
Click Module Admin from Nav Menu.
Click Check for update online.
Click Download all.
Click Process button.
Click Confirm button.
Click Return.
Click Apply Configuration Changes & Continue with Reload.
Repeat until all modules are downloaded and upgraded.
Installs done.