Automatic Dialer With Asterisk And GNUDialer
Author: Mario Hernández
Email: mariofix <at> spooky <dot> cl
Follow me on Twitter
This document describes the installation of the Automatic Dialer GNUDialer, this is an alternative dialer to VICIDial, with more lightweight scripts and a far more easier GUI, it uses Asterisk and MySQL for its operation.
I will use Debian as the OS system, but this install instructions should work anywhere else.
Base System
First things first, we need to follow steps 1 through 7 of the The Perfect Server - Debian Lenny (Debian 5.0) once we have a working "blank" debian system we can move on.
The documents say that you will need to download Debian version 5.0.0, if you use 5.0.0 or 5.0.3 makes no difference, although I recommend to use 5.0.3.
Requirements
According to the many GNU Dialer documentation, we will need the following software:
- Asterisk 1.2.x or Asterisk 1.4.x
- Zaptel or Dahdi
- libpri, libss7 (or whatever library you deem necessary)
- Asterisk-Addons
- HTTP Daemon (Apache 1.3/2.X, lighttpd, etc. with a CGI Interpreter)
- MySQL 4.1 or better
- libmysqlclient and it's development sources
We will also need a C/C++ compiler (we will use gcc).
Important Note: If you already have a working enviroment, be sure that you have the Asterisk and Zaptel sources, because we will need to patch them, otherwise the dialer will not work. Don't worry, it's only improvement, you will still be able to use the system without other modifications.
Apache 2.2, MySQL 5.1 and libmysqlclient
We now install the necessary packages using the apt tool.
apt-get install mysql-client mysql-server apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-perl2 apache2-suexec libmysqlclient15-dev libmysqlclient15off ntpdate
ntpdate time.nist.gov
During the install, MySQL will ask for a root password, enter it and continue with the install.
Optional: If you want PHP5 support, write the following
apt-get install libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp
Now we have to download Asterisk and friends.
cd /usr/src
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.24.1.tar.gz
wget http://downloads.digium.com/pub/telephony/dahdi-linux/releases/dahdi-linux-2.1.0.4.tar.gz
wget http://downloads.digium.com/pub/telephony/dahdi-tools/releases/dahdi-tools-2.1.0.2.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.9.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.8.tar.gz
Now, GNUDialer from the subversion repository.
apt-get install subversion
svn checkout http://dynx.net/svn/gnudialer-puff/trunk gnudialer
If you cannot download it from the repository you can go to http://dynx.net/ASTERISK/gnudialer/ and scroll down to the gnudialer-puff packages.
Developer Tools
First, we need to install gcc and related tools:
apt-get install build-essential linux-headers-`uname -r` make gcc g++ libncurses5-dev libnewt-dev zlib1g-dev bison flex openjdk-6-jdk
Dahdi and Libpri
Now, we install dahdi and libpri, or any other lib you want (ss7, iax2, etc.)
cd /usr/src
tar zvfx libpri-1.4.9.tar.gz
cd libpri-1.4.9
make
make install
cd ..
tar zvfx dahdi-linux-2.1.0.4.tar.gz
cd dahdi-linux-2.1.0.4
make
make install
cd ..
tar zvfx dahdi-tools-2.1.0.2.tar.gz
cd dahdi-tools-2.1.0.2
./configure
make menuconfig
This last one is to select additional tools for dahdi, select the ones you want and then Save & Exit.
make
make install
make config
If you don't have a analog or digital card (BRI, E1/T1/J1, FXS/FXO, etc.) you can comment out the devices from /etc/dahdi/modules then add dahdi_dummy at the end of the file, so you have a timing only interface (useful when using trunk=yes in IAX2 trunks).
So the file will look like this:
# Contains the list of modules to be loaded / unloaded by /etc/init.d/dahdi. # # NOTE: Please add/edit /etc/modprobe.d/dahdi or /etc/modprobe.conf if you # would like to add any module parameters. # # Format of this file: list of modules, each in its own line. # Anything after a '#' is ignore, likewise trailing and leading # whitespaces and empty lines. # Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1 # Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1 # Digium TE220: PCI-Express dual-port T1/E1/J1 # Digium TE420: PCI-Express quad-port T1/E1/J1 #wct4xxp # Digium TE120P: PCI single-port T1/E1/J1 # Digium TE121: PCI-Express single-port T1/E1/J1 # Digium TE122: PCI single-port T1/E1/J1 #wcte12xp # Digium T100P: PCI single-port T1 # Digium E100P: PCI single-port E1 #wct1xxp # Digium TE110P: PCI single-port T1/E1/J1 #wcte11xp # Digium TDM2400P/AEX2400: up to 24 analog ports # Digium TDM800P/AEX800: up to 8 analog ports # Digium TDM410P/AEX410: up to 4 analog ports #wctdm24xxp # X100P - Single port FXO interface # X101P - Single port FXO interface #wcfxo # Digium TDM400P: up to 4 analog ports #wctdm # Digium B410P: 4 NT/TE BRI ports #wcb4xxp # Digium TC400B: G729 / G723 Transcoding Engine #wctc4xxp # Xorcom Astribank Devices #xpp_usb # Timing only
dahdi_dummy