HOWTO :: VoIP: Whosesale :: Calling Card :: OpenSer :: Radius :: Asterisk :: FreeSwitch :: A2Billing :: IVR :: Colo :: Colocations :: GADGETS

April 21, 2010

CentOS 5.4 or 5.5 + Asterisk 1.4 + G729 + G723

Filed under: Asterisk PBX — Tags: , , — admin @ 1:12 pm

This tutorial will teach you how to install Asterisk 1.4 on a fresh install of CentOS 5.4 / 5.5 with g729 and g723 supported codec.

yum update

yum upgrade

yum groupinstall ‘Development Tools’

yum groupinstall ‘Development Libraries’

yum install -y kernel kernel-devel

cd /usr/src

wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4-current.tar.gz

tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel-1.4-current.tar.gz && tar xvzf libpri-1.4-current.tar.gz && tar xvzf asterisk-addons-1.4-current.tar.gz

a) Installing Zaptel

cd /usr/src/zaptel-1.4*
./install_prereq test
./install_prereq install
./configure
make
make install
make config
modprobe ztdummy

b) Installing Libpri

cd /usr/src/libpri-1.4*
make && make install

c) Installing Asterisk

c) Installing Asterisk

cd /usr/src/asterisk-1.4*

./configure

Comment: The next step is not mandatory. To install core and extra sounds in different languages:

make menuselect

Comment: Select the core-sounds you would like to play and extra sounds. Exit with �x� to save.

make
make install
make samples
make config
asterisk -vvvc
stop now
echo �ztdummy� >> /etc/modules

d) Installing Asterisk Addons

cd /usr/src/asterisk-addons*
./configure && make && make install
make samples

March 29, 2010

Installing Asterisk2Billing A2B 1.6 in Debian Lenny 5.0.4

Filed under: A2Billing, Asterisk PBX — Tags: , , , — admin @ 7:19 pm

I assumed that Debian Lenny is already installed on the system. This is a step-by-step procedure how to install Asterisk2Billing or A2B in Debian Lenny. This HowTo is just a copy/paste procedure. Let me know if you run into trouble installing this.

apt-get update
apt-get upgrade
aptitude install ssh ntp screen
aptitude install build-essential libcurl3-dev libvorbis-dev libspeex-dev unixodbc unixodbc-dev libiksemel-dev flex xsltproc linux-headers-`uname -r` g++ libncurses5-dev libnewt-dev libusb-dev subversion git-core flex bison
cd /usr/src/
wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4-current.tar.gz
tar xvfz asterisk-1.4-current.tar.gz
tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel-1.4-current.tar.gz && tar xvzf libpri-1.4-current.tar.gz && tar xvzf asterisk-addons-1.4-current.tar.gz tar
tar xvfz zaptel-1.4.12.1/
cd zaptel-1.4.12.1/
./install_prereq test
./install_prereq install
./configure
make
make install
make config
modprobe ztdummy
cd ../libpri-1.4.10.2/
make && make install
cd ../asterisk-1.4.30/
./configure
make
make install
make samples
make config
asterisk -vvvvvvvvvvvvgc
echo “ztdummy”
echo “ztdummy” >> /etc/modules
cd ../asterisk-addons-1.4-current.tar.gz
cd ..
tar xvfz asterisk-addons-1.4-current.tar.gz
cd asterisk-addons-1.4.10/
./configure && make && make install
make samples
apt-get install apache2 php5 mysql-server
cd /var/www/
wget http://www.asterisk2billing.org/downloads/A2Billing_1.6.0.tar.gz
tar xvfz A2Billing_1.6.0.tar.gz
mv A2Billing_1.6.0.tar.gz /tmp/
apt-get install libapache2-mod-php5 php5 php5-common
apt-get install php5-cli php5-mysql mysql-server apache2 php5-gd
apt-get install openssh-server subversion
apt-get install php5-mcrypt
mysql -u root -p < DataBase/mysql-5.x/a2billing-createdb-user.sql
mysql -u a2billinguser -p mya2billing
mysql -u root -p mya2billing < DataBase/mysql-5.x/a2billing-schema-v1.4.0.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.0-to-v1.4.1.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.1-to-v1.4.2.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.2-to-v1.4.3.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.3-to-v1.4.4.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.4-to-v1.4.4.1.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.4.1-to-v1.4.5.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.5-to-v1.5.0.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.5.0-to-v1.5.1.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.5.1-to-v1.6.0.sql
mysql -u a2billinguser -p mya2billing
cp a2billing.conf /etc/

touch /etc/asterisk/additional_a2billing_iax.conf
touch /etc/asterisk/additional_a2billing_sip.conf
echo \#include additional_a2billing_sip.conf >> /etc/asterisk/sip.conf
echo \#include additional_a2billing_iax.conf >> /etc/asterisk/iax.conf
chown -Rf www-data /etc/asterisk/additional_a2billing_iax.conf
chown -Rf www-data /etc/asterisk/additional_a2billing_sip.conf
cd addons/sounds/
./install_a2b_sounds.sh
chown -R asterisk:asterisk /var/lib/asterisk/sounds/
vi /etc/asterisk/manager.conf

Notice that we are using the default values (myasterisk, mycode) in this section. The configuration should look like this
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[myasterisk]
secret=mycode
read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user

cd AGI/
cp a2billing.php /var/lib/asterisk/agi-bin/
cp -rf ../common/lib /var/lib/asterisk/agi-bin/
chmod +x /var/lib/asterisk/agi-bin/a2billing.php
mkdir /var/www/a2billing
chown www-data:www-data /var/www/a2billing
mkdir -p /var/lib/a2billing/script
mkdir -p /var/run/a2billing
mv admin a2billing/
mv agent a2billing/
mv customer a2billing/
mv common a2billing/
chmod 755 a2billing/admin/templates_c
chmod 755 a2billing/customer/templates_c
chmod 755 a2billing/agent/templates_c
chown -Rf www-data:www-data /var/www/a2billing/admin/templates_c
chown -Rf www-data:www-data /var/www/a2billing/customer/templates_c/
chown -Rf www-data:www-data /var/www/a2billing/customer/templates_c
chown -Rf www-data:www-data /var/www/a2billing/agent/templates_c
/etc/init.d/apache2 status
/etc/init.d/apache2 restart
apt-get install python-setuptools python-mysqldb python-psycopg2 python-sqlalchemy
easy_install callback-daemon-py/dist/callback_daemon-1.0.prod_r1527-py2.5.egg

Direct a browser to the administrative web interface (http:///a2billing/admin) and login as administrator. Default passwords are:
user: root
pass: changepassword

vi /etc/asterisk/extensions.conf

[default]

include => a2billing

[a2billing]
; CallingCard application
exten => _X.,1,Answer
exten => _X.,2,Wait,2
exten => _X.,3,DeadAGI,a2billing.php
exten => _X.,4,Wait,2
exten => _X.,5,Hangup

[did]
; CallingCard application
exten => _X.,1,DeadAGI(a2billing.php|1|did)

crontab -e

# update the currency table
0 6 * * * php /usr/local/src/a2billing/Cronjobs/currencies_update_yahoo.php

# manage the monthly services subscription
0 6 1 * * php /usr/local/src/a2billing/Cronjobs/a2billing_subscription_fee.php

# To check account of each Users and send an email if the balance is less than the user have choice.
0 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_notify_account.php

# this script will browse all the DID that are reserve and check if the customer need to pay for it
# bill them or warn them per email to know if they want to pay in order to keep their DIDs
0 2 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_bill_diduse.php

# This script will take care of the recurring service.
0 12 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_process.php

#Generate Invoices at 6am everyday
0 6 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_billing.php

# to proceed the autodialer
*/5 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_autodialer.php

# manage alarms
0 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_alarm.php

This is the initial installation for Asterisk2Billing 1.6 in Debian Lenny 5.0.4

July 8, 2008

HOWTO: Asterisk CDR + MYSQL

Filed under: Asterisk CDR + MYSQL — Tags: , , — nelson @ 3:31 am

This tutorial will teach you how to configure Asterisk to store its CDR in MYSQL Database. Im using Debian Etch as my Operating System.

Installing Mysql Server 5 and Client

apt-get install mysql-server mysql-common php5-mysql mysql-client-5.0 mysql-client libmysqlclient15-dev

Creating a Database, Tables and Permissions

asterisk88:~# mysql -u root -p <enter>
Enter password: <enter>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 26
Server version: 5.0.32-Debian_7etch5 Debian etch distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> create database asterisk;
mysql> use asterisk;
mysql> 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 ”,
uniqueid varchar(32) NOT NULL default ”
);

ALTER TABLE cdr ADD INDEX ( calldate );
ALTER TABLE cdr ADD INDEX ( dst );
ALTER TABLE cdr ADD INDEX ( uniqueid );

You can add more indices if you want.

mysql> \q

(more…)

July 2, 2008

Debian Etch + Asterisk 1.4 + H323 + G729 + G723

This tutorial will show you how to install Asterisk 1.4 with H323 Support + G729 and G723 Codec.

1) Installing necessary Debian packages before installing Asterisk

aptitude update
aptitude upgrade

aptitude install ssh ntp screen

aptitude install build-essential libcurl3-dev libvorbis-dev libspeex-dev unixodbc unixodbc-dev libiksemel-dev flex xsltproc linux-headers-`uname -r` g++ libncurses5-dev libnewt-dev libusb-dev subversion git-core flex bison

2) Get the stable release of Asterisk, Libpri and Zaptel

cd /usr/src
wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4-current.tar.gz

tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel-1.4-current.tar.gz && tar xvzf libpri-1.4-current.tar.gz && tar xvzf asterisk-addons-1.4-current.tar.gz tar

(more…)

Powered by WordPress

HOWTO :: VoIP: Whosesale :: Calling Card :: OpenSer :: Radius :: Asterisk :: FreeSwitch :: A2Billing :: IVR :: Colo :: Colocations :: GADGETS is Digg proof thanks to caching by WP Super Cache!