3493
Commento:
|
3475
|
Le cancellazioni sono segnalate in questo modo. | Le aggiunte sono segnalate in questo modo. |
Linea 125: | Linea 125: |
password=torvergogna user=asterisk |
password=password |
Install Asterisk 1.4 Branch with Asterisk GUI
This guide will show how to compile and install Asterisk 1.4 from the SVN 1.4 branch.
As far as I know, no Linux distro comes with a packaged Asterisk 1.4, but this new version brings a lot of new features, such as the web configuration tool called AsteriskGUI.
Instead you could use AsteriskNow, but it does not come with the latest AsteriskGUI, and is not flexible as your own Linux Box.
In this guide I used my Gentoo Linux Box
Log in as root and... :
Backup
Remove any older Asterisk installation and backup your existing /etc/asterisk folder, we are going to make a big mess
Download the sources
cd /usr/src svn co http://svn.digium.com/svn/asterisk/branches/1.4/ asterisk-1.4 svn co http://svn.digium.com/svn/asterisk-addons/branches/1.4/ asterisk.addons-1.4 svn co http://svn.digium.com/svn/asterisk-gui/branches/1.4/ asterisk-gui-1.4 asterisk-gui-1.4
Compile
in each folder (follow the same order as source download):
./configure make make install make samples
Optionally you can run make menuselect before make to customize your build
In the asterisk-gui-1.4 run
make checkconfig
and follow the output of the command to tune the configuration files. You will need to run make checkconfig several times fixing one thing per time.
Run Asterisk
Now just run:
asterisk
and once started you might attach to the console this way:
asterisk -rvvvv
The web interface is here:
http://127.0.0.1:8088/asterisk/static/config/cfgbasic.html
To configure your account add a block in your /etc/asterisk/manager.conf
[admin] secret = mysecret read = system,call,log,verbose,command,agent,user,config,dtmf,reporting write = system,call,log,verbose,command,agent,user,config,dtmf,reporting
MYSQL CDR Logs
For this section it is supposed that you have a basic MySQL knowledge
Create a asterisk.sql file like this:
CREATE DATABASE asterisk; GRANT INSERT ON asterisk.* TO asterisk@localhost IDENTIFIED BY 'yourpassword'; USE asterisk; CREATE TABLE `cdr` ( `calldate` datetime NOT NULL default '0000-00-00 00:00:00', `clid` varchar(80) NOT NULL default '', `src` varchar(80) NOT NULL default '', `dst` varchar(80) NOT NULL default '', `dcontext` varchar(80) NOT NULL default '', `channel` varchar(80) NOT NULL default '', `dstchannel` varchar(80) NOT NULL default '', `lastapp` varchar(80) NOT NULL default '', `lastdata` varchar(80) NOT NULL default '', `duration` int(11) NOT NULL default '0', `billsec` int(11) NOT NULL default '0', `disposition` varchar(45) NOT NULL default '', `amaflags` int(11) NOT NULL default '0', `accountcode` varchar(20) NOT NULL default '', `userfield` varchar(255) NOT NULL default '' ); ALTER TABLE `cdr` ADD INDEX ( `calldate` ); ALTER TABLE `cdr` ADD INDEX ( `dst` ); ALTER TABLE `cdr` ADD INDEX ( `accountcode` );
Change the password in the file and then simply
mysql -u root -p < asterisk.sql
Now edit {/etc/asterisk/cdr_mysql.conf :
[global] hostname=localhost dbname=asterisk table=cdr password=password port=3306 sock=/tmp/mysql.sock userfield=1