AsterCRM Installation

From asterCRM, open source asterisk call center

Jump to: navigation, search

Install Manually

1.Download the source package of asterCC from astercc.org, extract it and move to your directory of your web service

 cd /usr/src
 wget http://astercc.org/download/astercc-0.1-beta.zip
 unzip astercc-0.1-beta.zip
 mv ./ astercc-0.1-beta /var/www/html/asterCC

It strongly recommend that the directory “scripts” should be moved to the higher-level security place,such as /opt ,and please don’t put it under the web directory(it will be shown in next steps).

2.Create a directory, and move scripts to the directory In 0.1 beta version , there are several daemons for asterCRM in the directory “scripts”

  • Astercc, astercctools will be applied to acquire the detail of calling message from asterisk and some information about extensions and queues.
  • eventdog.sh, eventsdaemon.pl will be applied to acquire AMI event of asterisk.

In the directory “scripts”, there is some tools as follows:

  • asterccd: Control some process related to asterCC to start, stop, status check(you can edit the script, and assign the process it controls)
  • asterccdaemon: a “watchdog” process, which will make a real time check on all the process related to asterCC and which will restart those if it is suspended(if it will be started by asterccd, the checking process is the same as the process controlled by asterccd )
  • dialer.pl is applied to dial on time,but there are no strickly test on 0.1beta version
mkdir -p /opt/asterisk/scripts/astercc
mv /var/www/html/asterCC/scripts/*  /opt/asterisk/scripts/astercc
chmod +x /opt/asterisk/scripts/astercc/*

3.create mysql database, and asterCC is required to run on mysql 4.1 or later

 mysqladmin -uyourmysqluser -pyourmysqlpasswd create astercc
 mysql -uyourmysqluser -pyourmysqlpasswd astercc </var/www/html/asterCC/sql/astercc.sql

we create the database named “astercc” in this document, but you can name the database as any name you like

4.setup manager.conf in asterisk, with creating a user that can connect AMT for asterCRM

vi /etc/asterisk/manager.conf
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
;displayconnects = yes
;According to your requirement, you can modify several rows as belows
[asterccdaemon]
secret = myasterccdaemon
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
deny=0.0.0.0/0.0.0.0
;only allow local access, if you want to run asterCRM on another server
;use your asterCRM ip to replace 127.0.0.1 or add a new line
permit=127.0.0.1/255.255.255.0

5.Setup the parameters on asterbilling.conf.php according to your situation The key point is setting a correct database connection string, and you can log into the system correctly by web pages after that.

6.Startup asterisk and the process you need

  • Use eventsdaemon.pl (Setup eventtype = event in astercrm.conf.php)
Edit eventsdaemon.pl ,setup the correct parameter for database connection and AMI connection。
Start test eventsdaemon.pl
/opt/asterisk/scripts/astercc/eventsdaemon.pl 
If the screen shows:

“Message: Authentication accepted”

Congratulations,your eventsdaemon has already started normally。
Press ctrl + c to exit the program
If the screen is show abnormally,please check whether the parameter of database connection and AMI connection is correct in eventsdaemon.pl or not.
Then you start eventsdaemon by the command as follows:
/opt/asterisk/scripts/astercc/eventsdaemon.pl -d
In some cases,in order to acquiret the better performance,you may requiret to delete some old data in database,and you can view the file assigned
by the parameter "log_life"in eventsdaemon.pl.
We can provide a “watchdog”process,which will ensure that eventsdaemon will restart in abnormally stop,
such as at the moment you restart asterisk.Please add the command as follows:
/opt/asterisk/scripts/astercc/eventdog.sh
on your system start file(such as:/etc/rc.d/rc.local)
When the system start every time,eventsdaemon will start automatically。
  • Use astercc mode (setup eventtype = curcdr in astercrm.conf.php)
Setup the correct parameters for /opt/asterisk/scripts/astercc/astercc.conf
Start test astercc Note:After “debug =1” will be set up in astercc.conf ,the
screen will show the information as follows
/opt/asterisk/scripts/astercc/astercc
If the message shows as follows:
Connecting to mysql database on 127.0.0.1:
Database connection successful.
Connecting to asterisk on 127.0.0.1 port 5038:
Asterisk socket connection successful.
Check asterisk username & secret:
Success
Monitor Start:
…(some log message)…”
Congratulations, your “astercc” has already run normally,press ctrl + c to escape the process running;
If the screen shows errors, please check your configuration for database/AMT on astercc.conf.
Startup daemon as follows:
/opt/asterisk/scripts/astercc/astercc –d
/opt/asterisk/scripts/astercc/astercctools –d
or startup all the process by the command as follows:
/opt/asterisk/scripts/astercc/asterccd start
Configure your process of astercc with your system autostart:
prompt: This action is only applied to redhat-release system.
cp /opt/asterisk/scripts/astercc/asterccd /etc/rc.d/init.d
chmod 755 /etc/rc.d/init.d/asterccd
chkconfig --add asterccd
advice: set your asrercc restart once a day,which is not necessary,But it is good to improve the performance of your astercc.
crontab -e
Add the row as follows:
0 0 * * * /etc/rc.d/init.d/asterccd restart to the end of the file
The first “0” is applied to assign the minutes,and the second “0″ is applied to assign the hours.

7.Setup the correct access rights for files and directories:

 After setting up the rights of the directory for file uploading(astercrm/upload),you can import the file “csv/xls”.
 chmod 777 /var/www/html/asterCC/astercrm/upload

8.Test

 Open your browser, Input the URL as follows:
 http://localhost/asterCC/astercrm
 Or
 http://YOUR-WEB-SERVER-ADDRESS/asterCC/astercrm
 login system as admin/admin
Personal tools