Вы находитесь на странице: 1из 6

Quick Installation & Upgradation Guide (Highly Recommended for V1.7.

3)
# wget --no-check-certificate http://bit.ly/SouxDj -O install.sh # chmod +x install.sh # ./install.sh

Please refer What To Do Next

Manual Installation Guide

1. Setup EPEL Yum Repositories with newer packages and install Git:
[CentOS] rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/`uname -m`/epel-release-68.noarch.rpm

2. Install packages
[Debian] apt-get install git [CentOS] yum install git

3. Install Freeswitch :

Install Freeswitch pre-requisite packages

[Debian] aptitude update && aptitude safe-upgrade && aptitude clean && aptitude autoclean aptitude -y install autoconf automake devscripts gawk g++ git-core libjpeg62dev libncurses5-dev libtool make python-dev gawk pkg-config libtiff4-dev libperldev libgdbm-dev libdb-dev gettext sudo lua5.1 chkconfig mysql-server apache2 apache2-threaded-dev php5 php5-dev php5-common php5-cli php5-gd php-pear php5-mysql php5-cli phpapc php5-curl libapache2-mod-php5 perl libapache2-mod-perl2 libxml2 libxml2-dev openssl libcurl4-openssl-dev gettext libtool gcc g++ ntp ntpdate [CentOS] yum install -y git yum clean all yum install -y autoconf automake expat-devel gnutls-devel libtiff-devel libX11-devel unixODBC-devel python-devel zlib-devel alsa-lib-devel libogg-devel libvorbisdevel perl perl-libs uuid-devel @development-tools gdbm-devel db4-devel libjpeg libjpeg-devel compat-libtermcap ncurses ncurses-devel ntp screen sendmail sendmail-cf gccc++ libtool cpan

yum install -y bison bzip2 curl curl-devel dmidecode git make mysqlconnector-odbc openssl-devel unixODBC zlib

Set the right time before continue

ntpdate pool.ntp.org service ntpd start chkconfig ntpd on

Download latest freeswitch version

cd /usr/local/src git clone git://git.freeswitch.org/freeswitch.git cd freeswitch ./bootstrap.sh

Edit modules.conf

Enable mod_xml_curl, mod_xml_cdr, mod_perl (If you want to use calling card features)

Compile the Source

./configure make

Install Freeswitch with sound files Create symbolic links for Freeswitch executables

make all install cd-sounds-install cd-moh-install ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

Configure Freeswitch Startup Script

[Debian] adduser --disabled-password --quiet --system --home /usr/local/freeswitch -gecos "FreeSWITCH Voice Platform" --ingroup daemon freeswitch chown -R freeswitch:daemon /usr/local/freeswitch/ chmod -R o-rwx /usr/local/freeswitch/ cp /usr/src/ASTPP/freeswitch/init/freeswitch.debian.init /etc/init.d/freeswitch [CentOS] cp /usr/src/ASTPP/freeswitch/init/freeswitch.init to /etc/init.d/freeswitch chmod 755 /etc/init.d/freeswitch chkconfig --add freeswitch chkconfig --level 345 freeswitch on

4. ASTPP Install :
1. Download ASTPP cd /usr/src/ git clone git://github.com/ASTPP/ASTPP.git 2. Install ASTPP pre-requisite packages using YUM [Debian] aptitude install -y mysql-server apache2 apache2-threaded-dev php5 php5dev php5-common php5-cli php5-gd php-pear php5-mysql php5-cli php-apc php5-curl libapache2-mod-php5 perl libapache2-mod-perl2 libxml2 libxml2-dev openssl libcurl4-openssl-dev gettext libtool gcc g++ [CentOS]

yum install -y cpan autoconf automake bzip2 cpio curl curl-devel php phpdevel php-common php-cli php-gd php-pear php-mysql php-pdo php-pecl-json mysql mysql-server mysql-devel libxml2 libxml2-devel openssl openssl-devel gettext-devel libtool fileutils gccc++ httpd httpd-devel perl-YAML cpan perl 3. Normalize ASTPP (for debian only) sed -i "s#/var/log/httpd/astpp_access_log#/var/log/apache2/astpp_access_log#g" /usr/src/ASTPP/web_interface/apache/astpp.conf sed -i "s#/var/log/httpd/astpp_error_log#/var/log/apache2/astpp_error_log#g" /usr/src/ASTPP/web_interface/apache/astpp.conf touch /var/log/apache2/astpp_access_log touch /var/log/apache2/astpp_error_log 4. Install ASTPP Perl packages perl -MCPAN -e "install Bundle::CPAN,ExtUtils::CBuilder,DBI,DBD::mysql,YAML,Params::Validate,CGI,URI::Es cape,Time::DaysInMonth,DateTime, DateTime::TimeZone,DateTime::Locale,XML::Simple,Data::Dumper,Module::Build,Stora ble,Time::Zone,Date::Parse,Curses, POE,Sys::Syslog,FCGI,DateTime::Set,DateTime::Event::Recurrence,DateTime::Incompl ete,Date::Language,DateTime::Format::Strptime, DBI::Shell,JSON,CGI::Fast,Locale::gettext_pp,Text::Template,Mail::Sendmail,XML:: Simple"; cd /usr/src/ASTPP/modules/ASTPP && perl Makefile.PL && make && make install && cd ../../ 5. ASTPP using FreeSWITCH (if you want to use ASTPP with FreeSWITCH) mkdir mkdir mkdir mkdir -p -p -p -p /var/lib/astpp/ /var/log/astpp/ /usr/local/astpp/ /var/www/

[Debian] chown -Rf chown -Rf chown -Rf chown -Rf [CentOS] chown -Rf chown -Rf chown -Rf chown -Rf

www-data.www-data www-data.www-data www-data.www-data www-data.www-data

/var/lib/astpp/ /var/log/astpp/ /usr/local/astpp/ /var/www/

apache.apache apache.apache apache.apache apache.apache

/var/lib/astpp/ /var/log/astpp/ /usr/local/astpp/ /var/www/

cp -rf /usr/src/ASTPP/scripts/*.pl /usr/local/astpp// cp -rf /usr/src/ASTPP/freeswitch/astpp /var/www/cgi-bin/ chmod -Rf 777 /var/www/cgi-bin/astpp cp /usr/src/ASTPP/freeswitch/astpp-callingcards.pl /usr/local/freeswitch/scripts/astpp-callingcards.pl

cp -rf /usr/src/ASTPP/sounds/*.wav /usr/local/freeswitch/sounds/en/us/callie// chmod -Rf 777 /usr/local/freeswitch/sounds/en/us/callie/ 6. Install ASTPP web interface cp /usr/src/ASTPP/astpp_confs/sample.astpp-config.conf /var/lib/astpp//astpp-config.conf cp /usr/src/ASTPP/astpp_confs/sample.reseller-config.conf /var/lib/astpp//sample.reseller-config.conf mkdir -p /var/www//html/astpp cp -rf /usr/src/ASTPP/web_interface/astpp/* /var/www//html/astpp/ cp /usr/src/ASTPP/web_interface/astpp/htaccess /var/www//html/astpp/.htaccess [Debian] chown -Rf www-data.www-data /var/www//html/astpp cp /usr/src/ASTPP/web_interface/apache/astpp.conf /etc/apache2/conf.d/astpp.conf [CentOS] chown -Rf apache.apache /var/www//html/astpp cp /usr/src/ASTPP/web_interface/apache/astpp.conf /etc/httpd/conf.d/astpp.conf chmod -Rf 777 /var/www//html/astpp 7. Start Services 1. Apache [Debian] /etc/init.d/apache2 start [CentOS] /etc/init.d/httpd start 2. Mysql [Debian] /etc/init.d/mysql start [CentOS] /etc/init.d/mysqld start 3. Freeswitch /etc/init.d/freeswitch start 8. Install ASTPP Database Set Root Password mysqladmin -u root password '<SET YOUR PASSWORD>' Create astpp database Create new mysql for above databases GRANT ALL PRIVILEGES ON astpp.* TO astppuser@localhost IDENTIFIED BY '<SET YOUR PASSWORD>'; flush privileges; mysql -uroot -p<PASSWORD> astpp < /usr/src/ASTPP/sql/astpp-1.7.3-beta.sql

mysql -uroot -p<PASSWORD> astpp < /usr/src/ASTPP/sql/astpp-upgrade1.7.3.sql Enter appropriate values in prompt 9. Setup database credential in /var/lib/astpp/astpp-config.conf Note : Default we are running astpp on 8081 port.

You are done with GUI installation. Enjoy :) Visit the astpp admin page in your web browser. It can be found here: http://server_ip:8081/ Please change the ip address depending upon your box. The default password is " Passw0rd! ". you do not need to enter username. Note : In case of any issue please refer apache error log.
10. ASTPP Freeswitch Configuration cd /usr/src/ASTPP/freeswitch/conf cp autoload_configs/xml_curl.conf.xml /usr/local/freeswitch/conf/autoload_configs/ Note : Edit xml_curl.conf.xml file and change localhost to your ip or domain name. cp autoload_configs/xml_cdr.conf.xml /usr/local/freeswitch/conf/autoload_configs/ Note : Edit xml_cdr.conf.xml file and change localhost to your ip or domain name. cp autoload_configs/cdr_csv.conf.xml /usr/local/freeswitch/conf/autoload_configs/ cp dialplan/default/astpp_callingcards.xml /usr/local/freeswitch/conf/dialplan/default/ Note : Edit astpp_callingcards.xml file to change acccess number for calling card. Enable mod_xml_curl, mod_xml_cdr, mod_cdr_csv, mod_perl in /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml file. Once above setting are done, restart freeswitch and check if above modules are loaded or not. If not then please load it manually. 11. Setup cron # Generate Invoice 0 1 * * * cd /var/www/html/astpp/cron/ && php cron.php GenerateInvoice # Low balance notification 0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php LowBalance # Update currency rate @hourly /usr/local/astpp/astpp-currency-update.pl

What To Do Next
Jump to: navigation, search

What to do next?

Secure your server Change the default GUI password and perhaps install Fail2ban for example. Goto System Configuration >> Configuration and make the appropriate changes pertaining to your setup.

Note :
1. We already have added demo data in few modules. 2. Pricelist module name is changed to Rate Group 3. In Termination Rates and Origination Rates, no need to append ^ and .* manually.

Here is the steps to configure : [SIP Profile Configuration]


1. Change sip-ip and rtp-ip to the IP address of your server in default SIP profile. Routing -> SIP Profile

[Origination Configuration]
1. Create Rate Group. Routing -> Rate Group 2. Add Origination Rates. Routing -> Origination rates (Pattern example : 1, 235) Note : Please do not use ^ or .*

[Termination Configuration]
1. Create SIP Profile. Routing -> SIP Profile 2. Add Gateway under your sip profile. Routing -> Gateway 3. Add Provider. Global Accounts -> Provider List 4. Add your trunk. Routing -> Trunk 5. Add termination rates. Routing -> Termination rates (Pattern example : 1, 235) Note : Please do not use ^ or .*

Create new Customer or Reseller and assign your created rate group. For customer add SIP Device from View Account or Freeswitch SIP Devices. For reseller configuration, create new reseller. Login as reseller. Add Routes. Create customers and then make calls using that customer. Register it and make outbound calls.

Вам также может понравиться