0% found this document useful (0 votes)
347 views

Astpp

This document provides instructions for installing the ASTPP VoIP billing solution, including: 1. It offers both a quick installation method and a manual installation process for CentOS 7 and Debian 8. 2. The manual installation instructions walk through installing prerequisite packages like Nginx, PHP, MySQL and FreeSWITCH. It also covers compiling and configuring FreeSWITCH. 3. Instructions are provided for downloading the ASTPP source code from GitHub and normalizing the installation files and directories.

Uploaded by

Jean Dessal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
347 views

Astpp

This document provides instructions for installing the ASTPP VoIP billing solution, including: 1. It offers both a quick installation method and a manual installation process for CentOS 7 and Debian 8. 2. The manual installation instructions walk through installing prerequisite packages like Nginx, PHP, MySQL and FreeSWITCH. It also covers compiling and configuring FreeSWITCH. 3. Instructions are provided for downloading the ASTPP source code from GitHub and normalizing the installation files and directories.

Uploaded by

Jean Dessal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 101

ASTPP Documentation

Release latest

Dec 25, 2017


Contents

1 Introduction 3

2 Installation 7

3 Security 19

4 Service Monitoring 25

5 Modules 27

6 FAQ 93

7 Report a Bug 95

8 Get Support 97

i
ii
ASTPP Documentation, Release latest

ASTPP is an Open Source VoIP Billing Solution for Freeswitch. It supports pre-paid and post-paid billing with call
rating and credit control. It also provides many other features such as calling cards, least cost routing (LCR), did
management, resellers management etc.

Contents 1
ASTPP Documentation, Release latest

2 Contents
CHAPTER 1

Introduction

Related pages

3
ASTPP Documentation, Release latest

1.1 Features

1.2 Components

• Nginx (http://nginx.com/)
– NGINX accelerates content and application delivery, improves security, facilitates avail-
ability and scalability for the busiest web sites on the Internet.
• PHP (http://php.net/)
– PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source
general-purpose scripting language that is especially suited for web development and can
be embedded into HTML.
• Lua (http://lua.org/)
– Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports pro-
cedural programming, object-oriented programming, functional programming, data-driven
programming, and data description.
• MySQL (https://www.mysql.com/)
– MySQL is a freely available open source Relational Database Management System
(RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language
for adding, accessing and managing content in a database. It is most noted for its quick
processing, proven reliability, ease and flexibility of use.
• FreeSwitch (https://freeswitch.org/)

4 Chapter 1. Introduction
ASTPP Documentation, Release latest

– FreeSWITCH is a scalable open source cross-platform telephony platform designed to route


and interconnect popular communication protocols using audio, video, text or any other
form of media. It was created in 2006 to fill the void left by proprietary commercial solu-
tions.

1.3 System Requirement

Minimal System requirement


• 2GB RAM
• 40GB Hard drive
• 64 bit OS (Centos/ Debian latest version)
• Dedicated server ip
• 100 Mbps connection
VoIP Requirement
• Termination gateway to route outbound calls
• DIDs to receive incoming calls

Note: Promotion
If you’r carrier and would like to add your company name listed in ASTPP then please contact us at
[email protected].

1.4 How to Contribute

1.Become a tester and report bugs in bug tracker: Here is the link https://github.com/iNextrix/ASTPP/issues
2.Write or improve our project documentation : Which is me :)
3.Become a translator : If you have good command over other language then here is one more options for you to
become a translator for documentation or portal labels.
4.Suggest a feature : If you have an idea you feel could improve the project, you can suggest us.
5.Help with design : If you have a talent for design, why not offer to help design the project’s website or logo? If you
fancy a bigger challenge, you could volunteer to give the project’s user interface a makeover.
6.Donate by money : You can contribute to survive project, speed project development and to encourage team.
Donation paypal id is [email protected].
7.Build a community : As we are an open source, to survive it needs to become the center of a large, engaged
community. Community means more people to discover and report issues, suggest new features, and generally help
to spread the word. There’s lots of ways you can help to grow a project’s community, but a few popular methods are
writing blogs and tutorials, promoting the project on social networks, and becoming active on its mailing list and/or
forums, particularly when it involves answering questions newcomers have about the project.

1.3. System Requirement 5


ASTPP Documentation, Release latest

6 Chapter 1. Introduction
CHAPTER 2

Installation

ASTPP Installation Guide


Basic knowledge of Freeswitch and Linux is required in order to do installation. We provides two ways to do installa-
tion,
1. Quick Installation
2. Manual Installation
Related pages

2.1 Quick Installation

Quick installation will install ASTPP 3.5 in scratch system only.


Quick Installation

# wget --no-check-certificate http://bit.do/dHwVu -O install.sh


# chmod +x install.sh
# ./install.sh

2.2 Manual Installation

ASTPP Guide
we are using ASTPP version 3.5 and supporting only two OS for manual installation. You can opt any of
them from below links.

7
ASTPP Documentation, Release latest

2.2.1 Astpp Version 3.5

ASTPP Manual Installation Guide


Currently, we are supporting only two OS for manual installation. It’s CentOS 7 and Debian 8.You can opt any of
them from below links.

CentOs 7 Installation V3.5

Install base packages

yum update
yum groupinstall "Development tools" -y

#Enable epel and freeswitch repository


yum install epel-release
rpm -Uvh http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm
yum update

Install Freeswitch
1. Install Freeswitch pre-requisite packages

#Install dependencies for freeswitch


yum install -y wget git autoconf automake expat-devel yasm gnutls-devel libtiff-devel
˓→libX11-devel unixODBC-devel

python-devel zlib-devel alsa-lib-devel libogg-devel libvorbis-devel uuid-devel


˓→@development-tools gdbm-devel

db4-devel libjpeg libjpeg-deve compat-libtermcap ncurses ncurses-devel ntp screen


˓→sendmail sendmail-cf gcc-c++

@development-tools bison bzip2 curl curl-devel dmidecode git make mysql-connector-


˓→odbc openssl-devel unixODBC

zlib pcre-devel speex-devel sqlite-devel ldns-devel libedit-devel bc e2fsprogs-devel


˓→libcurl-devel libxml2-devel

libyuv-devel opus-devel libvpx-devel libvpx2* libdb4* libidn-devel unbou-nd devel


˓→libuuid-devel lua-devel libsndfile-devel

2. Download latest freeswitch version

cd /usr/local/src
git config --global pull.rebase true

#Clone freeswitch version 1.6.8 from git


git clone -b v1.6.19 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch
./bootstrap.sh -j

3. Edit modules.conf

#Enabling mod_xml_curl, mod_json_cdr, mod_db


sed -i "s#\#xml_int/mod_xml_curl#xml_int/mod_xml_curl#g" /usr/local/src/freeswitch/
˓→modules.conf

sed -i "s#\#mod_db#mod_db#g" /usr/local/src/freeswitch/modules.conf


sed -i "s#\#event_handlers/mod_json_cdr#event_handlers/mod_json_cdr#g" /usr/local/
˓→src/freeswitch/modules.conf

sed -i "s#\#applications/mod_voicemail#applications/mod_voicemail#g" /usr/local/src/


˓→freeswitch/modules.conf

8 Chapter 2. Installation
ASTPP Documentation, Release latest

Note: # add a module by removing ‘#’ comment character at the beginning of the line # remove a module by inserting
the ‘#’ comment character at the beginning of the line containing the name of the module to be skipped

4. Compile the Source


./configure -C

5. Install Freeswitch with sound files


make all install cd-sounds-install cd-moh-install
make && make install

6. Set right time in server


ntpdate pool.ntp.org
systemctl restart ntp
chkconfig ntp on

7. Create symbolic links for Freeswitch executables


ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

ASTPP Install
1. Download ASTPP
# Download ASTPP 3.5 source from git
cd /usr/src
git clone https://github.com/iNextrix/ASTPP

2. Change Apache working scenario


As we are using Nginx from now onwards from ASTPP 3.0, if you are using apache for
˓→any applicaion then-

either have to move it to Nginx and/or remove apache. You can also change default
˓→port for apache if want to use-

it continue and troubleshoot some installation issue if arise.

3. Install ASTPP pre-requisite packages


yum install -y autoconf automake bzip2 cpio curl nginx php-fpm php-mcrypt* unixODBC
˓→mysql-connector-odbc curl-devel php

php-devel php-common php-cli php-gd php-pear php-mysql php-mbstring sendmail sendmail-


˓→cf php-pdo php-pecl-json mysql

mariadb-server mysql-devel libxml2 libxml2-devel openssl openssl-devel gettext-devel


˓→fileutils gcc-c++

4. Normalize ASTPP
#Create access & error log files.
touch /var/log/nginx/astpp_access_log
touch /var/log/nginx/astpp_error_log
touch /var/log/nginx/fs_access_log
touch /var/log/nginx/fs_error_log
systemctl restart php-fpm
service nginx reload

2.2. Manual Installation 9


ASTPP Documentation, Release latest

ASTPP using FreeSWITCH (if you want to use ASTPP with FreeSWITCH)
1. Configure freeswitch startup script

cp /usr/src/latest/freeswitch/init/freeswitch.centos.init /etc/init.d/freeswitch
chmod 755 /etc/init.d/freeswitch
chmod +x /etc/init.d/freeswitch
chkconfig --add freeswitch
chkconfig --level 345 freeswitch on
mkdir /var/run/freeswitch

2. Configure ASTPP with freeswitch

#Create directory structure for ASTPP


mkdir -p /var/lib/astpp/
mkdir -p /var/log/astpp/
mkdir -p /usr/local/astpp/
mkdir -p /var/www/

#Setting permisssion
chown -Rf root.root /var/lib/astpp/
chown -Rf root.root /var/log/astpp/
chown -Rf root.root /usr/local/astpp/
chown -Rf root.root /var/www//

#Setting up Scripts and Sounds for fs


cp -rf /usr/src/ASTPP/freeswitch/scripts/* /usr/local/freeswitch/scripts/
cp -rf /usr/src/ASTPP/freeswitch/fs /var/www/html/
cp -rf /usr/src/ASTPP/freeswitch/sounds/*.wav /usr/local/freeswitch/sounds/en/us/
˓→callie/

chmod -Rf 777 /usr/local/freeswitch/sounds/en/us/callie/


rm -rf /usr/local/freeswitch/conf/dialplan/*
touch /usr/local/freeswitch/conf/dialplan/astpp.xml
rm -rf /usr/local/freeswitch/conf/directory/*
touch /usr/local/freeswitch/conf/directory/astpp.xml
rm -rf /usr/local/freeswitch/conf/sip_profiles/*
touch /usr/local/freeswitch/conf/sip_profiles/astpp.xml

Install ASTPP web interface

mkdir -p /var/lib/astpp
cp /usr/src/ASTPP/config/* /var/lib/astpp/

#Setup web interface for ASTPP


mkdir -p /var/www/html/astpp
cp -rf /usr/src/ASTPP/web_interface/astpp/* /var/www/html/astpp/
chown -Rf root.root /var/www/html/astpp
cp /usr/src/ASTPP/web_interface/nginx/cent_* /etc/nginx/conf.d/

#apply security policy


sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/sysconfig/selinux
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
/etc/init.d/iptables stop
chkconfig iptables off
setenforce 0

chmod -Rf 755 /var/www/html/astpp


touch /var/log/astpp/astpp.log

10 Chapter 2. Installation
ASTPP Documentation, Release latest

Install ASTPP Database

#Restart mysql service


systemctl start mariadb
mysql -uroot -e "UPDATE mysql.user SET password=PASSWORD('<MYSQL_ROOT_PASSWORD>')
˓→WHERE user='root'; FLUSH PRIVILEGES;"

#Create database astpp


mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "create database astpp;"
mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "CREATE USER 'astppuser'@'localhost'
˓→IDENTIFIED BY '<ASTPP_USER_PASSWORD>';"

mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "GRANT ALL PRIVILEGES ON \`astpp\` . * TO


˓→'astppuser'@'localhost' WITH

GRANT OPTION;FLUSH PRIVILEGES;"


mysql -uroot -p<MYSQL_ROOT_PASSWORD> astpp < /usr/src/ASTPP/database/astpp-3.0.sql
mysql -uroot -p<MYSQL_ROOT_PASSWORD> astpp < /usr/src/ASTPP/database/astpp-upgrade-3.
˓→5.sql

ASTPP Freeswitch Configuration

cp /usr/src/ASTPP/freeswitch/conf/autoload_configs/* /usr/local/freeswitch/conf/
˓→autoload_configs/

#Edit db password in autoload config files.


sed -i "s#dbpass = <PASSSWORD>#dbpass = <MYSQL_ROOT_PASSWORD>#g" /var/lib/astpp/astpp-
˓→config.conf

sed -i "s#DB_PASSWD=\"<PASSSWORD>\"#DB_PASSWD = \"<MYSQL_ROOT_PASSWORD>\"#g" /var/lib/


˓→astpp/astpp.lua

#Edit base URL in astpp-config


sed -i "s#base_url=http://localhost:8081/#base_url=http://<SERVER FQDN / IP ADDRESS>
˓→:8089/#g" /var/lib/astpp/

astpp-config.conf

Note:- Replace "<SERVER FQDN / IP ADDRESS>" with your server domain name or IPaddress

Finalize Installation & Start Services

#Open php short tag


sed -i "s#short_open_tag = Off#short_open_tag = On#g" /etc/php.ini

#Configure services for startup


systemctl disable httpd #If you are using it then change the port or update your
˓→configuration for nginx otherwise

your gui will not up


systemctl enable nginx
systemctl enable php-fpm
systemctl start mariadb
systemctl start freeswitch
systemctl stop firewalld
chkconfig --levels 345 mariadb on
chkconfig --levels 345 freeswitch on
chkconfig --levels 123456 firewalld off

Note:- If you want to use firewall then configure it to allow all port used in fs and
˓→ASTPP.

Setup cron

2.2. Manual Installation 11


ASTPP Documentation, Release latest

# Generate Invoice
0 1 * * * cd /var/www/html/astpp/cron/ && php cron.php GenerateInvoice

# Low balance notification


0 1 * * * cd /var/www/html/astpp/cron/ && php cron.php UpdateBalance

# Low balance notification


0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php LowBalance

# Update currency rate


0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php CurrencyUpdate

# Email Broadcasting
0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php BroadcastEmail

Finally Reboot it.


#You are almost done with your configuration so just reboot it and make sure
˓→everything is working fine.

reboot now

#Once server up and running again, check below service status.


systemctl status nginx
systemctl status mariadb
systemctl status freeswitch
systemctl status php-fpm

Note: You are done with GUI installation. Enjoy :) Visit the astpp admin page in your web browser. It can be
found here: http://server_ip:8089/ Please change the ip address depending upon your box. The default username and
password is “admin”.
Note : In case of any issue please refer apache error log.

Note: If you have any other question(s) then please contact us on [email protected] or post your questions(s) in
https://groups.google.com/forum/#!forum/astpp.

Debian 8 Installation

Install base packages


apt-get -o Acquire::Check-Valid-Until=false update
apt-get install -y git wget curl

Install Freeswitch
1. Install Freeswitch pre-requisite packages
#Add freeswitch source list
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key
˓→add -

echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/


˓→apt/sources.list.d/freeswitch.list

12 Chapter 2. Installation
ASTPP Documentation, Release latest

#Install dependencies
apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y --force-yes
˓→freeswitch-video-deps-

most apt-get install -y autoconf automake devscripts gawk chkconfig dnsutils sendmail-
˓→bin sensible-mda ntpdate ntp g++

git-core curl libjpeg62-turbo-dev libncurses5-dev make python-dev pkg-config libgdbm-


˓→dev libyuv-dev libdb-

dev libvpx2-dev gettext sudo lua5.1 php5 php5-dev php5-common php5-cli php5-gd php-
˓→pear php5-cli

php5-gd php-pear php5-cli php-apc php5-curl libxml2 libxml2-dev openssl libcurl4-


˓→openssl-dev gettext gcc libldns-dev

libpcre3-dev build-essential libssl-dev libspeex-dev libspeexdsp-dev libsqlite3-dev


˓→libedit-dev libldns-dev libpq-dev bc

#Install mysql server


apt-get install -y mysql-server php5-mysql

2. Download latest freeswitch version


cd /usr/local/src
git config --global pull.rebase true

#Clone freeswitch version 1.6 from git


git clone -b v1.6.19 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch
./bootstrap.sh -j

3. Edit modules.conf
#Enabling mod_xml_curl, mod_json_cdr, mod_db
sed -i "s#\#xml_int/mod_xml_curl#xml_int/mod_xml_curl#g" /usr/local/src/freeswitch/
˓→modules.conf

sed -i "s#\#mod_db#mod_db#g" /usr/local/src/freeswitch/modules.conf


sed -i "s#\#applications/mod_voicemail#applications/mod_voicemail#g" /usr/local/src/
˓→freeswitch/modules.conf

sed -i "s#\#event_handlers/mod_json_cdr#event_handlers/mod_json_cdr#g" /usr/local/src/


˓→freeswitch/modules.conf

Note: # add a module by removing ‘#’ comment character at the beginning of the line # remove a module by inserting
the ‘#’ comment character at the beginning of the line containing the name of the module to be skipped

4. Compile the Source


./configure -C

5. Install Freeswitch with sound files


make all install cd-sounds-install cd-moh-install
make && make install

6. Set right time in server


ntpdate pool.ntp.org
systemctl restart ntp
chkconfig ntp on

2.2. Manual Installation 13


ASTPP Documentation, Release latest

7. Create symbolic links for Freeswitch executables

ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

ASTPP Install
1. Download ASTPP

# Download ASTPP 3.5 source from git


cd /usr/src
git clone https://github.com/iNextrix/ASTPP

2. Change Apache working scenario

As we are using Nginx from now onwards in ASTPP 3.0, if you are using apache for any
˓→applicaion then-

either have to move it to Nginx and/or remove apache. You can also change default
˓→port for apache if want to use-

it continue and troubleshoot some installation issue if arise.

3. Install ASTPP pre-requisite packages

apt-get -o Acquire::Check-Valid-Until=false update

apt-get install -y curl libyuv-dev libvpx2-dev nginx php5-fpm php5 php5-mcrypt


˓→libmyodbc unixodbc-bin php5-dev

php5-common php5-cli php5-gd php-pear php5-cli php-apc php5-curl libxml2 libxml2-dev


˓→openssl libcurl4-openssl-

dev gettext gcc g++

4. Normalize ASTPP

#Create access & error log files.


touch /var/log/nginx/astpp_access_log
touch /var/log/nginx/astpp_error_log
touch /var/log/nginx/fs_access_log
touch /var/log/nginx/fs_error_log
php5enmod mcrypt
systemctl restart php5-fpm
service nginx reload

ASTPP using FreeSWITCH (if you want to use ASTPP with FreeSWITCH)
1. Configure freeswitch startup script

cp /usr/src/ASTPP/freeswitch/init/freeswitch.debian.init /etc/init.d/freeswitch

chmod 755 /etc/init.d/freeswitch


chmod +x /etc/init.d/freeswitch
update-rc.d freeswitch defaults
chkconfig --add freeswitch
chkconfig --level 345 freeswitch on

2. Configure ASTPP with freeswitch

#Create directory structure for ASTPP


mkdir -p /var/lib/astpp/
mkdir -p /var/log/astpp/

14 Chapter 2. Installation
ASTPP Documentation, Release latest

mkdir -p /usr/local/astpp/
mkdir -p /var/www/

#Setting permisssion
chown -Rf root.root /var/lib/astpp/
chown -Rf www-data.www-data /var/log/astpp/
chown -Rf root.root /usr/local/astpp/
chown -Rf www-data.www-data /var/www/

#Setting up Scripts and Sounds for fs


cp -rf /usr/src/ASTPP/freeswitch/scripts/* /usr/local/freeswitch/scripts/
cp -rf /usr/src/ASTPP/freeswitch/fs /var/www/html/
cp -rf /usr/src/ASTPP/freeswitch/sounds/*.wav /usr/local/freeswitch/sounds/en/us/
˓→callie/

chmod -Rf 777 /usr/local/freeswitch/sounds/en/us/callie/


rm -rf /usr/local/freeswitch/conf/dialplan/*
touch /usr/local/freeswitch/conf/dialplan/astpp.xml
rm -rf /usr/local/freeswitch/conf/directory/*
touch /usr/local/freeswitch/conf/directory/astpp.xml
rm -rf /usr/local/freeswitch/conf/sip_profiles/*
touch /usr/local/freeswitch/conf/sip_profiles/astpp.xml

Install ASTPP web interface

mkdir -p /var/lib/astpp
cp /usr/src/ASTPP/config/* /var/lib/astpp/

#Setup web interface for ASTPP


mkdir -p /var/www/html/astpp
cp -rf /usr/src/ASTPP/web_interface/astpp/* /var/www/html/astpp/
chown -Rf www-data.www-data /var/www/html/astpp
cp /usr/src/ASTPP/web_interface/nginx/deb_* /etc/nginx/conf.d/

chmod -Rf 755 /var/www/html/astpp


touch /var/log/astpp/astpp.log
chown -Rf www-data.www-data /var/log/astpp/astpp.log

Install ASTPP Database

#Restart mysql service


systemctl restart mysql
mysql -uroot -e "UPDATE mysql.user SET password=PASSWORD('<MYSQL_ROOT_PASSWORD>')
˓→WHERE user='root'; FLUSH PRIVILEGES;"

#Create database astpp


mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "create database astpp;"
mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "CREATE USER 'astppuser'@'localhost'
˓→IDENTIFIED BY '<ASTPP_USER_PASSWORD>';"

mysql -uroot -p<MYSQL_ROOT_PASSWORD> -e "GRANT ALL PRIVILEGES ON \`astpp\` . * TO


˓→'astppuser'@'localhost' WITH

GRANT OPTION;FLUSH PRIVILEGES;"


mysql -uroot -p<MYSQL_ROOT_PASSWORD> astpp < /usr/src/ASTPP/database/astpp-3.0.sql
mysql -uroot -p<MYSQL_ROOT_PASSWORD> astpp < /usr/src/ASTPP/database/astpp-upgrade-3.
˓→5.sql

#Setup ODBC Connection for mysql


cp /usr/src/ASTPP/misc/odbc/deb_odbc.ini /etc/odbc.ini

2.2. Manual Installation 15


ASTPP Documentation, Release latest

cp /usr/src/ASTPP/misc/odbc/deb_odbcinst.ini /etc/odbcinst.ini

#Update your mysql login information in odbc file


sed -i "s#PASSWORD = <PASSWORD>#PASSWORD = <MYSQL_ROOT_PASSWORD>#g" /etc/odbc.ini

Note:- Replace "<MYSQL_ROOT_PASSWORD>" with your mysql root login password and "
˓→<ASTPP_USER_PASSWORD>" is as per

your choice.

ASTPP Freeswitch Configuration


cp /usr/src/ASTPP/freeswitch/conf/autoload_configs/* /usr/local/freeswitch/conf/
˓→autoload_configs/

#Edit db password in autoload config files.


sed -i "s#dbpass = <PASSSWORD>#dbpass = <MYSQL_ROOT_PASSWORD>#g" /var/lib/astpp/astpp-
˓→config.conf

sed -i "s#DB_PASSWD=\"<PASSSWORD>\"#DB_PASSWD = \"<MYSQL_ROOT_PASSWORD>\"#g" /var/lib/


˓→astpp/astpp.lua

#Edit base URL in astpp-config


sed -i "s#base_url=http://localhost:8081/#base_url=http://<SERVER FQDN / IP ADDRESS>
˓→:8089/#g" /var/lib/astpp/

astpp-config.conf

Note:- Replace "<SERVER FQDN / IP ADDRESS>" with your server domain name or IPaddress

Finalize Installation & Start Services


#Open php short tag
sed -i "s#short_open_tag = Off#short_open_tag = On#g" /etc/php.ini

#Configure services for startup


systemctl disable apache2 #If you are using it then change the port or update your
˓→configuration for nginx

otherwise your gui will not up


systemctl enable nginx
systemctl enable php5-fpm
systemctl start mysql
systemctl start freeswitch
chkconfig --levels 345 mariadb on
chkconfig --levels 345 freeswitch on

Note:- If you want to use iptables then configure it to allow all port used in fs and
˓→ASTPP.

Setup cron
# Generate Invoice
0 1 * * * cd /var/www/html/astpp/cron/ && php cron.php GenerateInvoice

# Low balance notification


0 1 * * * cd /var/www/html/astpp/cron/ && php cron.php UpdateBalance

# Low balance notification


0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php LowBalance

# Update currency rate

16 Chapter 2. Installation
ASTPP Documentation, Release latest

0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php CurrencyUpdate

# Email Broadcasting
0 0 * * * cd /var/www/html/astpp/cron/ && php cron.php BroadcastEmail

Finally Reboot it.

#You are almost done with your configuration so just reboot it and make sure
˓→everything is working fine.

reboot now

#Once server up and running again, check below service status.


systemctl status nginx
systemctl status mysql
systemctl status freeswitch
systemctl status php5-fpm

Note: You are done with GUI installation. Enjoy :) Visit the astpp admin page in your web browser. It can be
found here: http://server_ip:8089/ Please change the ip address depending upon your box. The default username and
password is “admin”.
Note : In case of any issue please refer apache error log.

Note: If you have any other question(s) then please contact us on [email protected] or post your questions(s) in
https://groups.google.com/forum/#!forum/astpp.

2.3 Quick Start

Here are the steps to configure basic system:

[Origination Configuration]
1. Create Rate Group. Tariff -> Rate Group
2. Select Trunk in Rate Group
3. Add Origination Rates. Tariff -> Origination rates (Pattern example : 1, 235)

[Termination Configuration]
1. Add Gateway under your sip profile. Switch -> Gateways
2. Add Provider. Global Accounts -> Customers -> Create Provider
3. Add your trunk. Carriers -> Trunks
4. Add termination rates. Carriers -> Termination Rates(Pattern example : 1, 235)

Create new Customer or Reseller and assign your created rate group. For customer add SIP Device from View Account
or Freeswitch SIP Devices.

2.3. Quick Start 17


ASTPP Documentation, Release latest

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.

How to ASTPP Quick Start

18 Chapter 2. Installation
CHAPTER 3

Security

Fail2Ban is an intrusion prevention system that works by scanning log files and then taking action based on the entries
in those logs.
You can configure Fail2Ban in a way that will update iptables firewall rules, when an authentication failure threshold
is reached which helps in preventing SIP brute force attacks against FS instances.
Fail2Ban scans your freeswitch log file and bans IP that makes too many password failures. It updates firewall rules
to reject the IP address.
Fail2Ban is available at fail2ban.org as well as more documentation.
Related pages

3.1 Apache Authentication

Apache authentication can be configured to require web site visitors to login with a user and password.
We protect cgi-bin apache directory which contains important perl scripts for dialplan, configurations and directory.
Step # 1: Make sure Apache is configured to use .htaccess file
You need to have "AllowOverride AuthConfig" directive in apache configuration file in
˓→order for directives to have

any effect.

For CentOS
vim /etc/httpd/conf/httpd.conf
<Directory "/var/www/cgi-bin">
AllowOverride AuthConfig
Options None
Order allow,deny
Allow from all
</Directory>

Save the file and restart Apache

19
ASTPP Documentation, Release latest

# service httpd restart

For Debian
vim /etc/apache2/sites-available/default
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride AuthConfig
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

Save the file and restart Apache


# service apache2 restart

Step # 2: Create a password file with htpasswd

htpasswd command is used to create and update the flat-files (text file) used to
˓→store usernames and password for

basic authentication of Apache users.General syntax: htpasswd -c password-file


˓→username

Where,
-c : Create the password-file. If password-file already exists, it is
˓→rewritten and truncated.

username : The username to create or update in password-file. If


˓→username does not

exist in this file, an entry is added. If it does exist, the password is


˓→changed.

Create directory outside apache document root, so that only Apache can access
˓→password file. The password-file should

be placed somewhere not accessible from the web. This is so that people cannot
˓→download the password file:

# mkdir -p /home/secure/
Add new user called astpp
# htpasswd -c /home/secure/apasswords astpp
New password:
Re-type new password:
allow apache user apache to read password file:

For CentOS
# chown apache:apache /home/secure/apasswords
# chmod 0660 /home/secure/apasswords

For Debian
# chown www-data:www-data /home/secure/apasswords
# chmod 0660 /home/secure/apasswords

Now user astpp is added but you need to configure the Apache web server to request a
˓→password and tell the server

which users are allowed access.We have directory /var/www/cgi-bin and we would like
˓→to protect it with a password.

For CentOS
# cd /var/www/cgi-bin
# vim .htaccess
For Debian

20 Chapter 3. Security
ASTPP Documentation, Release latest

# cd /usr/lib/cgi-bin
# vim .htaccess
Add following text:
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/secure/apasswords
Require user astpp

Now add username and password to following files:


# vim /usr/local/freeswitch/conf/autoload_configs/xml_curl.conf.xml
<!-- set this to provide authentication credentials to the server →
<param name="gateway-credentials" value="astpp:your_password"/>

# vim /usr/local/freeswitch/conf/autoload_configs/xml_cdr.conf.xm
<!-- optional: credentials to send to web server -->
<param name="cred" value="astpp:your_paasword"/>

Now restart freeswitch


# service freeswitch restart

You can test it by running below url in browser


http://localhost/cgi-bin/astpp/astpp-fs-xml.cgi
You will be asked for username and password for authentication.

3.2 Secure Freeswitch

Change Event Socket credential


# vim /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml
<param name=”password” value=”your_password”/>
Restart freeswitch service #service freeswitch restart

Set FreeSwitch Event Socket credential in UI


1. Login to ASTPP portal and Open Switch -> Freeswitch Server page.
2. Edit configured FreeSwitch settings to new credential which you just configured in event socket file.

3.3 Secure Portal

Steps : 1. Login to ASTPP portal


2. Open Accounts -> Admins page
3. Set strong password for admin

Note: Always use strong passwords to keep system secure.

3.2. Secure Freeswitch 21


ASTPP Documentation, Release latest

3.4 Fail2ban

Fail2Ban is an intrusion prevention system that works by scanning log files and then taking action based on the entries
in those logs.
You can configure Fail2Ban in a way that will update iptables firewall rules, when an authentication failure threshold
is reached which helps in preventing SIP brute force attacks against FS instances.
Fail2Ban scans your freeswitch log file and bans IP that makes too many password failures. It updates firewall rules
to reject the IP address.
Fail2Ban is available at fail2ban.org as well as more documentation.
Installtion :

For CentOS
cd /usr/src
service iptables stop
wget -T 10 -t 1 http://sourceforge.net/projects/fail2ban/files/fail2ban-stable/
˓→fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2

tar -jxf fail2ban-0.8.4.tar.bz2


cd fail2ban-0.8.4

python setup.py install


cp /usr/src/fail2ban-0.8.4/files/redhat-initd /etc/init.d/fail2ban
chmod 755 /etc/init.d/fail2ban

For Debian
apt-get -y install fail2ban

Configurations:

touch /etc/fail2ban/filter.d/freeswitch.conf
cp /etc/fail2ban/filter.d/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.bak

# vim /etc/fail2ban/filter.d/freeswitch.conf

[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named host. The tag '<HOST>' can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex
= \[WARNING\] sofia_reg.c:\d+ SIP auth challenge \(REGISTER\) on sofia
profile \'[^']+\' for \[.*\] from ip <HOST>
\[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'[^']+\'
˓→for \[.*\] from ip <HOST>

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

22 Chapter 3. Security
ASTPP Documentation, Release latest

# vim /etc/fail2ban/filter.d/freeswitch-dos.conf

[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named host. The tag '<HOST>' can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex
= \[WARNING\] sofia_reg.c:\d+ SIP auth challenge \(REGISTER\) on sofia
profile \'[^']+\' for \[.*\] from ip <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.bak

# vim /etc/fail2ban/jail.local

[freeswitch]
enabled = true
port = 5060,5061,5080,5081
filter = freeswitch
logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 10
bantime = 10000000
findtime = 480
action = iptables-allports[name=freeswitch, protocol=all]
sendmail-whois[name=FreeSwitch, dest=, sender=fail2ban@]

[freeswitch-dos]
enabled = true
port = 5060,5061,5080,5081
filter = freeswitch-dos
logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-dos, protocol=all]
maxretry = 50
findtime = 30
bantime = 6000

/etc/init.d/iptables start

/etc/init.d/fail2ban start

chkconfig fail2ban on

3.4. Fail2ban 23
ASTPP Documentation, Release latest

24 Chapter 3. Security
CHAPTER 4

Service Monitoring

Monit is a small Open Source utility for managing and monitoring systems. Monit conducts automatic maintenance
and repair and can execute meaningful causal actions in error situations.
For ASTPP we can configure apache,freeswitch and mysql services to monitor.
Installation
For CentOS
yum install monit

For Debian
apt-get install monit

Configurations:
Enable Web Interface in Monit
Monit also provided an web interface to view services and processes status. To enable
˓→monit web interface,

edit configuration file ( For CentOS /etc/monit.conf & For Debian System /etc/monit/
˓→monitrc ) and modify following

lines as per your server information's

set httpd port 2812 and


use address localhost
allow localhost
allow admin:monit
allow @monit
allow @users readonly

Configure Monit To Monitor Services


1) Nginx:

25
ASTPP Documentation, Release latest

2) MySQL
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
group resources
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart

3) Freeswitch
check process freeswitch with pidfile /usr/local/freeswitch/run/freeswitch.pid
start program = "/etc/init.d/freeswitch start"
stop program = "/etc/init.d/freeswitch stop"
if 5 restarts within 5 cycles then timeout
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if totalmem > 2000.0 MB for 5 cycles then restart
if children > 2500 then restart

Configuration for email notification

# set mailserver mail.bar.baz, # primary mailserver


# backup.bar.baz port 10025, # backup mailserver on port 10025
# localhost # fallback relay

set mailserver localhost

# set alert [email protected] # receive all alerts


# set alert [email protected] only on { timeout } # receive just service-
# # timeout alert

set alert [email protected]

It will notify the status of services in email which are configured in configuration
˓→file.

Start service

Now start the monit service


# service monit start

26 Chapter 4. Service Monitoring


CHAPTER 5

Modules

5.1 Login

Login page for Customer, Reseller, Admin and Provider.


Enter Account number or email and password to login in to associate portal.

Signup up now Click on signup to become new user


Forgot Password If you forgot your password and want to reset then use this link

27
ASTPP Documentation, Release latest

5.2 Dashboard

ASTPP have nice dashboard page with Summary of total call graph, Top 10 accounts and Recent accounts information.
You can also change month and year from top right drop downs by default it show current month records in graph.

• Summary of total call Graph


– This graph includes current month calls statics including total number of calls, answered calls, failed
calls and profit.
• Top 10 accounts
– You can filter top 10 accounts by minutes utilized OR by calls. That way admin can identify their
potential clients easily.
• Recharge information
– This report will gives admin to monitor recently done recharges in system.

28 Chapter 5. Modules
ASTPP Documentation, Release latest

5.3 Accounts

ASTPP have different types accounts based on their roles and responsibility. They are as below,
• Customers / Providers
• We consider customers as (Originator) and providers as (Terminator + Originator) and will be able to do various
operations like as below,
1. Purchase DIDs & configure it
2. Recharge account
3. Create own SIP Devices
4. Manage own caller ids
5. Invoices
6. Check their CDRs
• Resellers
• ASTPP gives you freedom to create N level resellers and each reseller will be able to configure their own rates
and customers. Resellers will be able to do below operations in system,
1. Create customers & sub-resellers
2. Configure rate groups & rates
3. Purchase DIDs
4. Invoices
5. Check reports
6. Personalize invoices configurations
• Admin / Sub admins
• Admins are having full control over system whereas sub admins are having only reporting permissions.

You can navigate through different menus of ASTPP.


Eg. : To create new customer hover on Accounts, it will show sub menus like Customers, Admins, Resellers.Click on
Customers and then click on Create Create Customer.
Related pages

5.3.1 List Account

This page will list customers and providers accounts.

5.3. Accounts 29
ASTPP Documentation, Release latest

Top panel button of grid

To create New customer account.

To create Multiple customer account.

To create New provider account.

It will export accounts data.

Delete selected accounts.

Account column button of grid for account entity

It indicates customer accounts

It indicates provider accounts

It indicates admin accounts

It indicates subadmin accounts

30 Chapter 5. Modules
ASTPP Documentation, Release latest

Account column button of grid for account type

It indicates account type is prepaid

It indicates account type is postpaid

Action column in grid

Refill

Add Caller ID

Edit

Delete

5.3.2 Create Account

Once you click on Create Customer button, it will show you page to create new account like below screenshot. Enter
appropriate information in page and click on save button to create account successfully.
For creating resellers, admins and sub-admins, we have similar process.

5.3. Accounts 31
ASTPP Documentation, Release latest

Create Customer Account Form Fields Details:

32 Chapter 5. Modules
ASTPP Documentation, Release latest

Account Also referred as User Name,Card Number or ID is typically a 10 unique digits that identify an account
into the system.
Length of account number is configurable, admin can change it from global configuration.
Password The password that needs to be provided to the customer so he/she can log into portal.
Pin Calling Card Pin Important if customer is using calling card feature. Length of pin is configurable,
admin can change it from calling card configuration.
First- Customer First name
Name
Last- Customer Last name
Name
Company Customer Company name
Tele- Customer Telephone number
phone
Country Customer Country
Time- Customer Timezone
zone
Status Customer account status
Max Maximum allowed concurrent channels for outbound calls. 0=Unlimited
Channels
Number If you wish to translate number with some defined number for specific customer then use this feature.
Transla-
tion
First Customer account’s first used date and time. It will be updated when customer will do first call from
Used system.
Expiry Customer account’s expiry date. After that date, customer wouldn’t be able to make new calls.
Date
Valid Valid days for customer account.
Days
Create By selecting check-box sip device is automatically created for that new user account.
SIP
Device
Rate Rate group is an essential field for billing. Without rate group customer wouldn’t be able to make any
Group calls. You can create rate group by navigating to Tariff -> Rate group.
Billing Billing schedule for invoice generation.
Schedule
Billing If billing schedule is monthly then you will be able to define the day on which you want customer
Day invoice should be generated.
Currency Customer account’s currency. If customer currency is INR then all amounts will appear in INR in
customer portal.
Account Select customer account type. Prepaid OR Postpaid. For prepaid customers, system will generate
Type receipts as soon as any charges will be applied to them. For Postpaid, system will generate invoice on
defined Billing Day.
Credit Customer account’s credit limit. Credit limit is only used for the postpaid account.
Limit
Tax Select applicable taxes You can create taxes from Configuration -> Taxes.
Low Define low balance amount on which you want to send notification to customer.
Balance
Alert
Enable system will notify for Low credit if this option is set to Yes.
Email
Alerts?
Email E-mail address to get Low credit notification.
Address

5.3. Accounts 33
ASTPP Documentation, Release latest

How to create customer

5.3.3 Edit Account

Customer edit page contains settings tabs,

Here is left side menu information,

34 Chapter 5. Modules
ASTPP Documentation, Release latest

Customer Profile To edit customer’s personal details.


SIP Devices Create/update SIP Devices.
IP Settings Configure IP to allow calls from defined IPs.
Caller ID Set caller id for pinless authentication.
Speed Dial Set your favourite number as speed dial from here.
Block Codes Configure blocked prefixes for account.
DID Assign DID To account.
Subscription Assign subscription charges to account.
Invoices Shows list of invoices generated for this account.
Refill Report Show all refill histrory of specific account.
Charges History It shows all charges which apply to specific customer.
CDRS Customer accounts CDRs information.
Emails Here you can check email history of accounts.
Alert Threshold Here we can set low balance email notification.

Related pages

5.3. Accounts 35
ASTPP Documentation, Release latest

Account Details

36 Chapter 5. Modules
ASTPP Documentation, Release latest

Account Also referred as User Name,Card Number or ID is typically a 10 unique digits that identify an ac-
count into the system. Length of account number is configurable, admin can change it from global
configuration.
Password The password that needs to be provided to the customer so he/she can log into portal.
Pin Calling Card Pin Important if customer is using calling card feature. Length of pin is configurable,
admin can change it from calling card configuration.
First- Customer First name
Name
Last- Customer Last name
Name
Company Customer Company name
Tele- Customer Telephone number
phone
Country Customer Country
Time- Customer Timezone
zone
Status Customer account status
Max Maximum allowed concurrent channels for outbound calls. 0=Unlimited
Channels
Number If you wish to translate number with some defined number for specific customer then use this feature.
Transla-
tion
First Customer account’s first used date and time. It will be updated when customer will do first call from
Used system.
Expiry Customer account’s expiry date. After that date, customer wouldn’t be able to make new calls.
Date
Valid Valid days for customer account.
Days
Create By selecting check-box sip device is automatically created for that new user account.
SIP
Device
Rate Rate group is an essential field for billing. Without rate group customer wouldn’t be able to make any
Group calls. You can create rate group by navigating to Tariff -> Rate group.
Billing Billing schedule for invoice generation.
Schedule
Billing If billing schedule is monthly then you will be able to define the day on which you want customer
Day invoice should be generated.
Currency Customer account’s currency. If customer currency is INR then all amounts will appear in INR in
customer portal.
Account Select customer account type. Prepaid OR Postpaid. For prepaid customers, system will generate
Type receipts as soon as any charges will be applied to them. For Postpaid, system will generate invoice on
defined Billing Day.
Credit Customer account’s credit limit. Credit limit is only used for the postpaid account.
Limit
Tax Select applicable taxes You can create taxes from Configuration -> Taxes.
Low Define low balance amount on which you want to send notification to customer.
Balance
Alert
Enable system will notify for Low credit if this option is set to Yes.
Email
Alerts?
Email E-mail address to get Low credit notification.
Address

5.3. Accounts 37
ASTPP Documentation, Release latest

Customer SIP Devices

Create/update SIP Devices.

IP Settings

To enable IP Based authentication for customer. Define customer IP’s in below TAB and system will start accepting
calls from defined IPs.

Add/Edit IP Settings form fields description

Name Add a name for identification only, this can be the client OR server name if you wish.
IP Address Add the IP Address you want to authenticate with.
Prefix For additional validation over IP based authentication.

Caller ID

Set caller id for pinless authentication.

38 Chapter 5. Modules
ASTPP Documentation, Release latest

Speed Dial

Block Codes

If you wish to block certain prefixes for account then you can configure those prefixes from Block Codes TAB.

5.3. Accounts 39
ASTPP Documentation, Release latest

DID

Assign DID To account.

Subscription

Assign subscription charges to account.

40 Chapter 5. Modules
ASTPP Documentation, Release latest

Account Invoices

Shows list of invoices generated for this account.

5.3. Accounts 41
ASTPP Documentation, Release latest

Refill Report

Charges History

CDRs

Customer account CDR information. That will display incoming and outgoing calls.
This report will display only current day records only.

42 Chapter 5. Modules
ASTPP Documentation, Release latest

Emails

5.3. Accounts 43
ASTPP Documentation, Release latest

Alert Threshold

5.3.4 Email Mass

Email Mass Field Description

Rate Rate group is an essential field for billing. You can create rate group by navigating to Tariff -> Rate
Group group.
Account Type Select customer account type. Prepaid OR Postpaid.
Status Account status.
Entity Type Account entity type whether its customer or provider.
Email Template Select appropriate template from drop-down.

44 Chapter 5. Modules
ASTPP Documentation, Release latest

Compose Email

Compose Mail Field Description

From Specify sender’s email address here.


To Specify receiver’s email address here.
Subject Subject of email.
Message Content of email.
Attach Files You can attach maximum 4 files.

5.3. Accounts 45
ASTPP Documentation, Release latest

5.4 Accounting

Related pages

5.4.1 Invoices

This page will display list of Invoice & Receipt generated for customers and resellers.
Also admin & reseller can generate manual invoice for their customer.
You can download invoice in PDF format.

Action Column In Grid

46 Chapter 5. Modules
ASTPP Documentation, Release latest

Download Use to download Details.

Edit Use to edit invoice information

Delete Delete invoice from list

5.4.2 Subscription

Subscription is kinda package that will be applicable to customer upon invoice generation OR assignment.
Example : If admin would like to charge customers $100 for Equipment usage on monthly/Daily basis then they can
create such type of subscription packages from this module and assign it to entire rate group to individual customers.

Top panel Grid Button

To create new subscription

To delete multiple subscriptions

Create Subscription

Create new subscription package using below page,

5.4. Accounting 47
ASTPP Documentation, Release latest

Add/Edit subscription form fields description

Name Subscription name


Rate Group Select Rate group.Charges will be applicable to all customers who are using selected Rate Group
Amount Subscription charge
Prorate Enable it to apply prorate based charge to customer
Bill Cycle Daily OR Monthly bill cycle to apply charge on customer
Status Active OR Inactive subscription

How to create subscription

5.4.3 Refill Report

Report will display payment transaction information.

48 Chapter 5. Modules
ASTPP Documentation, Release latest

5.4.4 Charges History

This report will display all the charges information which apply to specific account.
By this report admin know the complete system transaction same way reseller can show their sub entity transactions.

5.4.5 Refill Coupon

Using refill coupon number user can refill their own account.
Only admin & reseller can create refill coupon.

5.4. Accounting 49
ASTPP Documentation, Release latest

5.4.6 Payment Report

Report will display payment transaction information.

5.5 DIDs

Manage DIDs (Direct Inward Dialing)


Manage your DIDs from this module. You can add number of DIDs, map it with accounts and route to appropriate
destination. ASTPP gives you various options like LOCAL, PSTN and OTHER to route incoming calls.

50 Chapter 5. Modules
ASTPP Documentation, Release latest

Top panel Grid Button

To Create New DID

To Delete multiple DIDs

To Import DID number from CSV file

To Export DID number in CSV file

Related pages

5.5.1 Create DIDs

You can create new DID using below page,

5.5. DIDs 51
ASTPP Documentation, Release latest

DIDs Add/Edit Field description


DID Information

DID Enter unique numeric DID number


Country Select country of DID
City DID City
Province/State DID State
Provider Select provider to whom this DID belongs to

DID Billing

Account Select account number you wish to assign DID


Increments Rate of increment to calculate call cost.
Example : 60 to charge every minute
Cost Cost per minute
Included Seconds Define seconds will be free from the call duration for each call
Setup Fee One time Setup fee
Monthly Fee Monthly recurring fee
Connection Fee Connection fee to charge customer minimum when their call will be connected

52 Chapter 5. Modules
ASTPP Documentation, Release latest

DID Setting

Call Type LOCAL : Wish to route call to Local extension


PSTN : Wish to route call to PSTN Number
OTHER : If you wish to route call to custom destination
Destination Set appropriate destination based on call Type.
Example :
LOCAL : 1001 (Local Extension number)
PSTN : 1800214018 (PSTN number)
OTHER : sofia/default/[email protected]
OR
sofia/gateway/gwname/121423232

Max Channels Maximum allowed concurrent channels for DID calls.


0=Unlimited

How to create DID

5.5.2 Import DIDs

Note: File must be in the following format(.csv): DID,Country,Account,Per Minute Cost(USD),Initial Incre-
ment,Increment,Setup Fee(USD), Monthly Fee(USD),Call Type,Destination,Status
535345345,India,2096034879,1,0,1,0,0,PSTN,1234567890,Active
65456456,Alaska,2096035512,0.5,0,1,0,1,DID-Local,1002,Active

Select provider, csv file of DID and click on Import button, It will display below sample output. You can confirm
format if its system recognize your imported file correctly.If all looks good then click on process and system will
import all your DIDs.

5.5. DIDs 53
ASTPP Documentation, Release latest

5.5.3 Export DIDs

Export your DIDs by clicking on Export button.


If you would like to export specific criteria DIDs then you can search those DIDs using search feature and then export.
Below is an example with search option,

Exported .csv file,

54 Chapter 5. Modules
ASTPP Documentation, Release latest

5.6 Tariff

Related pages

5.6.1 Rate Group

Rate group is an important module of ASTPP. This belongs to customer and rating.

5.6. Tariff 55
ASTPP Documentation, Release latest

Create Rate Group

Rate Group Add/Edit Field description

56 Chapter 5. Modules
ASTPP Documentation, Release latest

Name Name of Rate Group


Incre- Rate of increment to calculate call cost.
ment Example : 60 to charge every minute
This increment will be useful when increment is not defined in origination rate.
Markup(%)
Additional charges will be applicable on call cost.
Example : If 10% markup defined in rate group and customer made call of $1 then system
will charge customer 10% extra on $1 and that will be $1.1.
Trunks Select the trunks for LCR and routing.
If no trunks selected then customers who are having same rate group wouldn’t be able to make outbound
calls.
Status Select status of rate group

How to create rate group

5.6.2 Origination Rates

Origination rates belongs to Rate group.


We can consider origination rates as customer rates / sell rates as these rates will be applicable on customers.

Related pages

5.6. Tariff 57
ASTPP Documentation, Release latest

Create Origination Rate

Origination Rates Add Form Fields Description:

Rate Group Select the rate group for origination rate


Code Prefix of origination rate. Example: 91
Destination Description for rate. Example : India
Precedence Priority of rate
Connect Cost Connection fee to charge customer minimum
when their call will be connected
Included Seconds Define seconds will be free from the call duration
for each call
Per Minute Cost Cost per minute
Increment
Rate of increment to calculate call cost
Example : 60 to charge every minute
Force Trunk To force call to route using specific trunk.
Note : Leave it – Select – if you would like to
do LCR among trunks which are selected in rate
group

How to create origination rate

Import Origination Rate

58 Chapter 5. Modules
ASTPP Documentation, Release latest

Note: File must be in the following format(.csv): Code,Destination,Connect Cost,Included Seconds,Per Minute
Cost, Increment,Precedence.
1,USA,0.0000,0,1.0000,30,60
91,India,0.0000,0,0.5000,0,0

Select rate group, force trunk and csv file of origination rates and click on Import button, It will show below output to
confirm if rates format are correct. Once you confirm then click on process and it will import those rates in system

Export Origination Rate

Export your Origination rates by clicking on Export button. If you would like to export specific criteria rates then you
can search those rates using search feature and then export.
Below is an example with search option,

5.6. Tariff 59
ASTPP Documentation, Release latest

Exported .csv file,

5.6.3 Packages

Package feature allows you to prepare various free packages for specific destinations and offer to your customers.
Customers can take benefit of this and can make free calls to selected destinations.

Related pages

60 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Package

Package Details Add/Edit Form Fields Description

Name Package Name


Rate Group Select rate group. The customers who are having that rate group will get benefit of this
package.
Included Sec- Defined free seconds of package
onds

Package edit you will get two tabs

Package Details Allow to change package details


Package Patterns Form this tab you can select destinations

How to create package

Package Codes

This tab is useful to add destination for package.


If you have entered 91 and 1 destination in package then customer who are getting benefit of this package will be able
to make free calls to 91 and 1 destination.

5.6. Tariff 61
ASTPP Documentation, Release latest

Usage Report

Package usage report is shows the usage of the customer for specific package.

5.7 Carriers

Related pages

5.7.1 Trunk

Trunk is key module for LCR routing and associated with termination rates and provider account.

Top panel button

62 Chapter 5. Modules
ASTPP Documentation, Release latest

To add new trunk

To delete multiple trunks

Create Trunk

Trunk Add/Edit Form Fields Description:

Trunk Trunk name


name
Provider Select provider to whom this trunk belongs to
Gateway Select gateway on which call will be terminated
Failover Select failover gateway on which call will be terminated. If primary gateway failed in
Gateway establishing call then system will try call using failover gateway.
Max Number of Maximum concurrent call for this trunk
Channels
Number If you wish to translate number with some defined number for trunk then use this feature.
Transla- Ex: “011/2222” (You can define multiple translations like “011/2222”,”02/33”)
tion That means from called number 011 is replaced by 2222.
Codec Enter codecs if you want call to use specific codecs only
Prece- Priority of trunk
dence

5.7. Carriers 63
ASTPP Documentation, Release latest

How to create trunk

5.7.2 Termination Rates

Termination rates belongs to Trunk. We can consider termination rates as carrier rates / buy rates as these rates will be
applicable on providers.
Before dialing number to gateway, system will do LCR process in termination rates and find out best match and low
cost prefix and dial out using that.

Related pages

64 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Termination Rate

Trunk Select trunk for termination rate


Code Prefix of termination rate. Example: 91
Destination Description for rate. Example : India
Strip To remove any specific prefix from dialed number
Prepend To append any specific prefix in dialed number
Connect Connection fee to charge customer minimum when their call will be connected
Cost
Included Define seconds will be free from the call duration for each call
Seconds
Per Minute Cost per minute
Cost
Initial Here specify cost which you have to take when call is initiate
Increment
Increment Rate of increment to calculate call cost
Example : 60 to charge every minute
Precedence Priority of rate. If LCR found same prefix with same rate for different trunk then based on prece-
dence/priority level trunk will be selected.

How to create termination rate

Import Termination Rate

5.7. Carriers 65
ASTPP Documentation, Release latest

Note: File must be in the following format(.csv): Code,Destination,Connect Cost,Included Seconds,Per Minute
Cost,Increment, Precedence,Strip,Prepend.
1,UNITED STATES,0,10,0.5,60,0,0,0
91,India,0.1,15,0.25,60,0,0,0

Select trunk and csv file of termination rates and click on Import button, It will show below output to confirm if rates
format are correct. Once you confirm then click on process and it will import those rates in system.

Export Termination Rate

Export your Termination rates by clicking on Export button. If you would like to export specific criteria rates then you
can search those rates using search feature and then export.
Below is an example with search option,

66 Chapter 5. Modules
ASTPP Documentation, Release latest

Exported .csv file,

5.8 Switch

Related pages

5.8.1 Sip Devices

To navigate this Menu System Switch -> SIP Devices

5.8. Switch 67
ASTPP Documentation, Release latest

From here user can create sip devices for the customer to make call. To Create sip devices click on Add SIP Devices
and you will get popup form to create device. Assign this device to appropriate customer and suitable sip profile.

Create SIP Device

Device Information

Username Here specify the name of user


Password It is use to set password of user
Caller Name Write caller name here
Caller Number Write called number here
Account Select account of user
Status Device status should be active/inactive
Sip Profile Select sip profile

68 Chapter 5. Modules
ASTPP Documentation, Release latest

Voicemail Options

Enable From here set status of voice mail


Password Set your voice mail password here
Mail To Define your email address
Attach File If it set yes then you will get file in attachment otherwise not
Local After Email Write called number here
Send All Message If it set true then user will get all message

How to create SIP device

5.8.2 Gateways

5.8. Switch 69
ASTPP Documentation, Release latest

Create Gateway

Gateways Add/Edit Form Fields Description:


Basic Information

70 Chapter 5. Modules
ASTPP Documentation, Release latest

Name Username of gateway


SIP Profile Select appropriate sip profile
Username Same as gateway name
Password Password for authentication
Proxy Here specify the ip of proxy server
Outbound-Proxy Here specify the ip of outbound-proxy
Register True / False
Caller-Id-In-From True / False
Status Active / Inactive

Optional Information

From-Domain Domain url


From User From user : optional same as username
Realm
Extension Extensions to be registered with your voip provider
Expire Seconds Expire in seconds
Reg-Transport Which transport to use for register
Contact Params
Ping Send an options ping every x seconds, failure will unregister
and/or mark it down
Retry-Seconds How many seconds before a retry when a failure or timeout occurs
Register-Proxy Send register to this proxy: optional same as proxy
Channel
Dialplan Variable

How to create gateway

5.8.3 SIP Profiles

5.8. Switch 71
ASTPP Documentation, Release latest

Create SIP Profile

Sip Profile List Add/Edit Form Fields Description:

SIP Profile name Name of sip profile


sip-ip IP address to bind to for SIP traffic. DO NOT USE HOSTNAMES, ONLY IP ADDRESSES
sip-port Port to bind to for SIP traffic
Status Active / Inactive

How to create SIP profile

5.8.4 Freeswitch Server

Freeswitch Server is use to store freeswitch server details with host and location

Once is there any changes are done in Gateways or sip profiles at that time its need to reload Freeswitch servers that
time this information are useful to reload freeswitch.

72 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Freeswitch Server

Freeswitch Server Add/Edit Field description

Host Set the default domain to the host


Password Password of freeswitch server
Port Port of freeswitch

How to create freeswitch server

5.8.5 IP map(ACL)

5.8. Switch 73
ASTPP Documentation, Release latest

Create IP map(ACL)

IP Map Field Description

Account Select account number you wish to assign IP based authentication.


Name Give name of IP map.
IP Enter IP address.
Prefix Enter prefix value.

5.8.6 Caller ID List

74 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Caller ID

Caller ID Field Description

Account Select account number you wish to assign caller ID


Caller ID Enter ID of caller.

5.9 Call Reports

Related pages

5.9.1 Detail Reports

Related pages

Customer

You can find CDRs entry under reports menu. CDRs for different accounts

5.9. Call Reports 75


ASTPP Documentation, Release latest

Reseller

76 Chapter 5. Modules
ASTPP Documentation, Release latest

Provider

5.9.2 Summary Reports

Related pages

Customer Summary

5.9. Call Reports 77


ASTPP Documentation, Release latest

Reseller Summary

Provider Summary

Trunk Stats

78 Chapter 5. Modules
ASTPP Documentation, Release latest

5.9.3 Live Call Reports

5.9.4 Email History List

5.10 Configuration

Related pages

5.10.1 Invoice Configuration

Whatever information you configure in invoice configuration that will be shown in generated invoice.
Basic information should be filled in this for like company name, address , website and contact information.

5.10. Configuration 79
ASTPP Documentation, Release latest

To configure this go to Configuration -> Invoice Configuration.

How to do invoice configuration

5.10.2 Taxes

Taxes are meant to be charge some amount on invoices. After creating taxes you can assign it to any of customer by
clicking on Add Taxes button from customer list.

Taxes can assign to customer as well as resellers. You can specify tax in percentage (%) as well as specific amount to
be charge on invoice.
To create Taxes go to Accounting menu in ASTPP portal. From popup select Taxes it will show you the list of the
taxes. You can create new taxes by clicking on Create button.

80 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Tax

Add/Edit Taxes Form Fields Description

Priority Priority is the sequence to apply taxes on invoice-able amount.


Amount If there are tax amount is fixed for any usage then we can specified tax amount in this field.
Rate(%) If Taxes amount is based on % and it should be calculated based on usage then we can specify rate on
taxes in (%) in this field.
Descrip- Taxes Description for reference.
tion

How to create tax

5.10.3 Email Templates

To navigate this Menu System Configuration -> Email Template.

5.10. Configuration 81
ASTPP Documentation, Release latest

This menu contains email body for system generated emails.


There are many email template so user can modify that template accordingly their needs.

Edit Email Template

Email Add / Edit Field description

82 Chapter 5. Modules
ASTPP Documentation, Release latest

Template Name Here specify the name of template


Subject Email subject
Body Email content

5.10.4 Countries

Create Country

Countries Add/Edit Field description

5.10. Configuration 83
ASTPP Documentation, Release latest

Name Here write down the name of country

How to create country

5.10.5 Currencies

84 Chapter 5. Modules
ASTPP Documentation, Release latest

Create Currency

Currencies Add/Edit Field description

Name Name of currency


Code Code of currency
Rate Rate of currency

How to create currency

5.10.6 Database Restore

Action Column In Grid:

5.10. Configuration 85
ASTPP Documentation, Release latest

Restore database
Download database

Delete database

Create Database Backup

Backup Database Add Field description

Name Here specify the name of database


File Name Here describe file name of database and path of database

How to take database backup

86 Chapter 5. Modules
ASTPP Documentation, Release latest

Import Database

Import Database Field description

Name Here specify the name of database.


Select File Select your database file from your system.

5.10.7 Settings

Global-Settings

5.10. Configuration 87
ASTPP Documentation, Release latest

Global - Settings Field Description

Company Website Company Website


Company Name The name of your company. Used in emails.
Call Debug Enable debugging output? 0=no 1=yes.
Decimal Points How many decimal points do we bill to?
Max Free Length What is the maximum length (in minutes) of calls that are at no charge?
Call Max Length What is the maximum length (in ms) of a LCR call?
Base Currency Base Currency of System.
Default Timezone System timezone.
Default Country Default country.
Version ASTPP Version.
Did Global Translation Global number translation for DID.
Playback Audio Notification Global audio notification.
Outbound Fax Set enable to allow outbound fax in call.
Inbound Fax Set enable to allow inbound fax in call.
Refill Coupon Length Set refill coupon generation lenght.
Minimum Fund Transfer Set minimum amount for fund transfer.
Balance Announcement To enable balance playback in call.
Minutes Announcement To enable minute playback in call.
Voicemail Number Voicemail listen number.

Email-Settings

Email - Settings Field Description

Email Send out email? 0=no 1=yes.


SMTP Send out email using SMTP? 0=no 1=yes.
SMTP host Host name for SMTP connection.
SMTP port Port name for SMTP connection.
SMTP user User name for SMTP connection.
SMTP pass Password name for SMTP connection.

88 Chapter 5. Modules
ASTPP Documentation, Release latest

Calling Cards

Callingcard - Settings Field Description

Starting Digit The digit that all calling cards must start with. 0=disabled.
Card Length Number of digits in calling cards and cc codes.
Pin Length For those calling cards that are using pins this is the number of digits it will have.
Card Retries How many retries do we allow for calling card numbers?
Pin Retries How many retries do we allow for pins?
Rate Announce Do we want the calling cards script to announce the rate on calls?
Time Limit Announce Do we want the calling cards script to announce the time-limit on calls?
Pin Input Timeout How long do we wait when entering the calling card pin? Specified in MS.
Card Input Timeout How long do we wait when entering the calling card number? Specified in MS.
Dial Input Timeout How long do we wait when entering the destination number in calling cards? Specified
in MS.
General Input Time- How long do we wait for input in general menus? Specified in MS.
out
Welcome File What do we play for a welcome file?
ANI Authentication Calling card ANI authentication. 0 for disable and 1 for enable.
IVR count IVR playback loop count.
Balance Announce- Do we want the calling cards script to announce the balance of account?
ment
CC Access Numbers Add calling card access numbers with comma separation. Ex : 12345678,3581629

5.10. Configuration 89
ASTPP Documentation, Release latest

Opensips-Settings

Opensips - Settings Field Description

Opensips dbengine For now this must be MySQL.


Opensips Use Opensips? 1 for Enable or 0 for Disable.
Opensips dbname Opensips Database Name.
Opensips dbuser Opensips Database User.
Opensips dbhost Opensips Database Host.
Opensips dbpass Opensips Database Password.
Opensips domain Opensips Domain.

Paypal-Settings

Paypal - Settings Field Description

Paypal status 0=enable paypal module 1=disable paypal module.


Paypal url Paypal live url.
Paypal sandbox url Paypal Sandbox url for testing.
Paypal id Paypal Live account id.
Paypal sandbox id Paypal sandbox accountid for testing.
Paypal mode 0=paypal Live mode 1= paypal Sandbox mode.
Paypal fee 0=paypal mc fee paid by admin 1= paypal mc fee paid by customer.
Paypal tax Paypal tax rate (in percentage) apply to recharge amount.

90 Chapter 5. Modules
ASTPP Documentation, Release latest

Signup-Settings

Signup- Settings Field Description

Default Rategroup Set default rategroup for new signup account.


Enable Signup From here we can set enable/disable signup process.
Create SIP Device If you select Enable then it create automatic sip device for new account.
Default Balance From here we can set default balance.

5.11 Forgot Password

From here you can reset your password.


You can enter your register email address or account number after that you will get email to reset your password.

5.12 Signup Now!

From this page you can signup as customer into astpp.


By fill-up all complete detail you will get success message and activation mail in your email account.

5.11. Forgot Password 91


ASTPP Documentation, Release latest

92 Chapter 5. Modules
CHAPTER 6

FAQ

Related Page

6.1 Questions

Two Types Of Questions:


1.General Questions
2.Technical Questions
General Questions
1. Is this solution completely open source? Yeah.
2. What kind of license does it have? GNU AGPL3 More info : https://www.gnu.org/licenses/agpl-3.0.en.html
3. Is there any limitation of using ASTPP? Nope. There is no limitation of using ASTPP. You can use it any-
where.
4. Where ASTPP can be used? It can be used in small scale as well as large scale carrier setup.
5. What do i need to setup ASTPP on my system? You just need to have system with above defined OS and
then you will be able to setup ASTPP on that.
6. Which OS are preferable for ASTPP? It is strongly recommended that ASTPP be deployed on the Linux
distribution CentOS version 7.x or Debian version 8.x
7. What is the minimum hardware requirement? CentOS 7.X OR Debian 8.x, 4GB RAM (8 or 16gb is highly
recommended for better performance), 40gb Hard Drive, We recommend to use high configuration hard-
ware to get better performance.
8. Does ASTPP work on Virtual servers? Yeah, It can work on Virtual servers.
9. How many concurrent calls ASTPP can handle? That is purely depends on hardware which you will use.
More Hardware resource can give more concurrent calls.

93
ASTPP Documentation, Release latest

10. How can I contribute code or donate money to support project? You can simply send your code to us
for review and we will include it in open source version. You can donate us at paypal account
[email protected]
11. Do you offer support? Yeah we do offer installation, configuration, on demand support, recurring support &
custom development. You can check our pricing from http://astpp.inextrix.com/cart.php. For custom
development, you can drop an email to us at [email protected] OR use http://astpp.inextrix.com/contact.
php
Technical Questions
1. What databases are supported in ASTPP ? It supports only MySQL (PostgreSQL support will be added in
future release).
2. What payment gateways are supported in ASTPP ? Paypal only for now. In future we have plan to add
authorize.net payment gateway.
3. Does ASTPP support Multi-language ? No
4. Does ASTPP current version support callshop? No. It will be included in future releases. To get more infor-
mation you can contact us at [email protected].
5. How can I update my source from to keep it update to date? ASTPP provides update.sh script with its
source just run that script to update your source.
6. When I go to login page, rather WEBUI I get long list of php contents. Enable short_open_tag in php.ini
and then restart apache.
7. Why I am not able to register extensions after installation? Make sure you have configured your IP in Sip
Profile and your registration request is reaching to server.
8. How to verify if ASTPP and FreeSWITCH communicating properly? Default sip profile must be loaded in
FreeSWITCH
9. While login I am getting “Unable to connect to your database server using the provided settings” error.
Please check your database credentials. ASTPP uses /var/lib/astpp/astpp-config.conf file for database
connection.
10. How can I do IP Authentication for my customers? Configure your customer IP under Customers -> IP Set-
tings
11. Does CDRs report will show all data ? No, CDRs report will only record of current day. If you want to see
record of previous days record then you need to search.

94 Chapter 6. FAQ
CHAPTER 7

Report a Bug

Please feel free to report in our bug tracker below in case of any issues you find:
https://github.com/iNextrix/ASTPP/issues
Or post your questions on:-
https://groups.google.com/forum/#!forum/astpp

Note: To avoid duplicate bug posts, we would suggest you to refer existing bugs list and google groups first.

95
ASTPP Documentation, Release latest

96 Chapter 7. Report a Bug


CHAPTER 8

Get Support

We have provided installation and operation instructions with online help to assist you to install and manage your own
ASTPP Platform. However from time to time you may need some clarification or support. There are a number of
options available described below.
Paid Support : Paid support is available from ASTPP.
managed Installation : Stable and secure installations can be performed by us with training and optionally,ongoing
support.

97

You might also like