========================
Asterisk Installation
========================
Installation
-------------
**Prerequisites**
* gcc
* gcc-c++
* libxml2-devel
* ncurses-devel
* mysql
* mysql-devel
* mysql-server
* php php-mysql
* php-devel
* openssl
* openssl-devel
# Install Prerequisites
``yum -y install gcc gcc-c++ libxml2-devel ncurses-devel mysql mysql-devel mysql-server php php-mysql php-devel openssl openssl-devel``
On a typical system, you'll want to download three components:
* Asterisk
* DAHDI
* libpri
The libpri library allows Asterisk to communicate with ISDN connections.
The DAHDI library allows Asterisk to communicate with analog and digital telephones and telephone lines, including connections to the Public Switched Telephone Network, or PSTN. It should also be installed on new systems, even if you don't immediately plan on using analog or digital connections to your Asterisk system.
DAHDI
DAHDI stands for Digium Asterisk Hardware Device Interface, and is a set of drivers and utilities for a number of analog and digital telephony cards, such as those manufactured by Digium. The DAHDI drivers are independent of Asterisk, and can be used by other applications. DAHDI was previously called Zaptel, as it evolved from the Zapata Telephony Project.
The DAHDI code can be downloaded as individual pieces (dahdi-linux for the DAHDI drivers, and dahdi-tools for the DAHDI utilities. They can also be downloaded as a complete package called dahdi-linux-complete, which contains both the Linux drivers and the utilities.
**Install Libpri**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Libpri
``wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.12.tar.gz``
# Extract tar source
``tar -zxvf libpri-1.4.12.tar.gz``
# Compile Source using make
``cd libpri-1.4.12/``
``make``
# Install source
``make install``
**Install Dahdi**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Dahdi
``wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.6.0+2.6.0.tar.gz``
# Extract tar source
``tar -zxvf dahdi-linux-complete-2.6.0+2.6.0.tar.gz``
# Compile Source using make
``cd dahdi-linux-complete-2.6.0+2.6.0/``
``make``
# Install source
``make install``
``make config``
**Install Asterisk**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Asterisk
``wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.10.1.tar.gz``
# Extract source
``tar -zxvf asterisk-1.8.10.1.tar.gz``
# Run Configuration script
``cd asterisk-1.8.10.1/``
``./configure``
This will run for a couple of minutes, and warn you of any missing system libraries or other dependencies. Upon completion, you should see a message that looks similar to the one shown below. (Obviously, your host CPU type may be different than the below.)
.. code-block:: java
:linenos:
.$$$$$$$$$$$$$$$=..
.$7$7.. .7$$7:.
.$7$7.. .7$$7:.
.$$:. ,$7.7
.$7. 7$$$$ .$$77
..$$. $$$$$ .$$$7
..7$ .?. $$$$$ .?. 7$$$.
$.$. .$$$7. $$$$7 .7$$$. .$$$.
.777. .$$$$$$77$$$77$$$$$7. $$$,
$$$~ .7$$$$$$$$$$$$$7. .$$$.
.$$7 .7$$$$$$$7: ?$$$.
$$$ ?7$$$$$$$$$$I .$$$7
$$$ .7$$$$$$$$$$$$$$$$ :$$$.
$$$ $$$$$$7$$$$$$$$$$$$ .$$$.
$$$ $$$ 7$$$7 .$$$ .$$$.
$$$$ $$$$7 .$$$.
7$$$7 7$$$$ 7$$$
$$$$$ $$$
$$$$7. $$ (TM)
$$$$$$$. .7$$$$$$ $$
$$$$$$$$$$$$7$$$$$$$$$.$$$$$$
$$$$$$$$$$$$$$$$.
configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
# Run menuselect to select asterisk options
``make menuselect``
select required options & continue
# Compile source
``make``
The compiling step will take several minutes, and you'll see the various file names scroll by as they are being compiled. Once Asterisk has finished compiling, you'll see a message that looks like:
.. code-block:: java
:linenos:
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
+--------- Asterisk Build Complete ---------+
# Now install compiled asterisk source
``make install``
# When finished, Asterisk will display the following warning:
.. code-block:: java
:linenos:
+---- Asterisk Installation Complete -------+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample +
+ configuration files (overwriting any +
+ existing config files), run: +
+ +
+ make samples +
+ +
+-------------------------------------------+
+---- Asterisk Installation Complete -------+
# To install a set of sample configuration files for Asterisk
``make sample``
# Now that you have Asterisk compiled and installed, the last step is to install the initialization script, or initscript.
``make config``
# Start dahdi
``lsmod | grep dahdi``
# If the command returns nothing, then DAHDI has not been started. Start DAHDI by running
``/etc/init.d/dadhi start``
# Start Asterisk
``/etc/init.d/asterisk start``
============================================
Installing & Settingup Sangoma USBFXO Card
============================================
Introduction
-------------
Sangoma's USBfxo is a low-cost development tool kit, ideal for those just getting started with Asterisk® or those who just want a simple external solution.The USBfxo is easy to install. There is no need to open up the computer to insert an interface card. Simply plug it in, and set up your Asterisk system; configure Sangoma's Wanpipe® drivers, as you would with any Sangoma card, and you're set to go. You can even connect multiple USBfxos in one system.The USBfxo fully supports Asterisk on Linux systems and includes Zaptel/DAHDI drivers.
* Dual FXO ports
* Easy installation, no need to open up computer to install PCI/PCIe card
* Supports up to 2 simultaneous calls
* Compact plastic enclosure
* Low power consumption, takes power from USB bus
* USB 2.0 compliant (compatible with USB 1.1)
Installation
-------------
**Prerequisites**
* C developement tools ...(gcc)
* C++ developement tools
* Make utility
* Ncurses library
* Perl developement tools
* AWK
* FLEX
* Patch
* libtermcap-devel
* bison
* libtools
* autoconf
* automake
* kernel-devel
# Install Prerequites
``yum -y install kernel-devel-$(uname -r) libtool* make gcc patch perl bison gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf``
**NOTE:** Before Installation of wanpipe connect your USBFXO Card to USB port.
# Download USBFXO Wanpipe Driver
``cd /usr/local/src``
``wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.25.tgz``
# Extract tar source
``tar -zxvf wanpipe-3.5.25.tgz``
``cd wanpipe-3.5.25/``
# To Setup wanpipe driver with dahdi use following command
``./Setup dahdi``
# Once you run above command it will ask you for dahdi source directory, enter the path where you have your dahdi source in our case it is "/usr/local/src/dahdi-linux-complete-2.6.0+2.6.0/", so wanpipe driver will compile with dahdi source & will install detected USBFXO Card.
# After complete installation varify installation using command
``ifconfig``
``wanrouter hwprobe``
===================================
FreePBX Configuration & IVR Setup
===================================
Ater installing FreePBX point your browser to `<http://yourip/admin>`_ & login to freepbx dashboard default login & password is admin/admin.After login dashboard shows many options as shown in image below. If you have error for symlinks as shown in image delete that file from /etc/asterisk & run configuration script /var/lib/asterisk/bin/retrive_conf.
# As per above image to solve symlink error for **sip_notify.conf** follow the steps given below,
``rm /etc/asterisk/sip_notify.conf``
``cd /var/lib/asterisk/bin``
``./retrive_conf``
# Now refresh browser to check symlink error again, if you get same error again follow the above steps until error get solve.
# Now install required modules to create IVR
# click on Module Admin on dashboard & check all repositories box & click on 'check online' as shown in image below
# To setup IVR we require dahdi_config & IVR module, so select both & click on 'process' as shown in image below
# Now click on Apply Configuration
# After applying configuration click on dahdi tab as shown in image
# Check all box & click on save do not change any option.
# Now Click on Trunks to add trunk as shown in image below
# Click on Add Zap Trunk (DAHDi compatibility mode) & add trunk name 'from-pstn' & dont change in setting & click on submit button
# Now Click on Extensions to add extension
# add extension as shown in images below
# Now add your IVR Announcement
# Click on add system recording
# click on browse & select your ivr announcement & rename as per requirement as shown in images above
# After adding system recording click on IVR & click on add ivr
# setup ivr options as shown in image
# Now route your inbound calls on IVR
# Click on inbound route & add inbound route name & redirect option select ivr as shown in image below
# Now goto terminal & type asterisk -rvvvv & call on your number & check your IVR
``asterisk -rvvvvv``
No comments:
Post a Comment