ASTPP
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.
Introduction
ASTPP is a Open Source VoIP Billing Solution for Freeswitch. It supports
prepaid and postpaid billing with call rating and credit control. It also
provides many other features such as,
Calling cards
Least cost routing (LCR),
DID management,
Multi level Reseller management
Customer management
IP & SIP Termination
Rates management
Reports
and many more
Related pages
Features
Calling cards
Manage calling cards easily with card number & pin
Bulk calling card generation
Export calling cards in CSV
Configure your own calling card access numbers
Pinless authentication
Call Detail report
Configurable introduction prompt
Various options to enable/disable playback options
Rate groups / Tariff
Manage rates with ease
Configure own rate group and assign to customers / resellers (For admin and resellers only)
Allocate free packages
Carrier/trunk selection for outbound call routing for LCR
Allow rate group based subscription
DIDs
Handle incoming calls with various options
DID purchase/release option
Options to configure setup, monthly fees for DID
DID allocation option for admin/reseller
Multiple types of routing types
DID Billing
Configuration / Settings
Settings
Global parameters to manage system
Default country, base currency, timezone etc
Payment gateway configuration
Calling card parameters
Invoice configuration
One time tax configuration
Email template
Accounts management
Admin
Can manage entire system
Able to manage multiple admins and subadmins
Reseller
Multi-layer reseller support (Unlimited)
Own customer management
Rates management
Invoice management
Reports
Reseller portal
Customer / Provider
Postpaid/prepaid customers
IP based authentications
SIP Device management
Invoices
My Rates Reports
Customer portal
Invoices / Billing
Invoice & Receipt management
Personalize invoicing info rmation for reseller
Can configure his own comp any name & address which will be included in invoice pdf
One time Tax Configuration
Includes CDR charges, Subs cription fees, DID charges and other type of post charges or package charges.
Configurable invoice date for each customer
Send email upon invoice generation
Rates and LCR
Least cost routing on carrier/termination rates
Option to define connect cost
Import feature
Batch update for easy bulk rates updation
Force routing configuration in origination rates
Carrier failover
Reports
Call detail reports
Summary reports (display usage of prefix, ACD, MCD, profit, Billable seconds)
Trunk stats
Live call report
Payment report
Export to csv
Paypal payment gateway
Configure your own paypal id to receive payments
Top Up/Recharge accounts quickly and get balance in real time
Components
- Nginx (http://nginx.com/)
- NGINX accelerates content and application delivery, improves security, facilitates availability 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 procedural 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/)
- 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 solutions.
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
sales@inextrix.com.
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 billing@inextrix.com.
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.
Installation
ASTPP Installation Guide
Basic knowledge of Freeswitch and Linux is required in order to do installation.
We provides two ways to do installation,
- Quick Installation
- Manual Installation
Related pages
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
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.
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
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
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
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
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
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
# 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.
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
#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
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 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/
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
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
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.
Quick Start
Here are the steps to configure basic system:
[Origination Configuration] |
- Create Rate Group. Tariff -> Rate Group
- Select Trunk in Rate Group
- Add Origination Rates. Tariff -> Origination rates (Pattern example : 1, 235)
|
[Termination Configuration] |
- Add Gateway under your sip profile. Switch -> Gateways
- Add Provider. Global Accounts -> Customers -> Create Provider
- Add your trunk. Carriers -> Trunks
- 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.
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
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
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
# 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
# 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.
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 |
- Login to ASTPP portal and Open Switch -> Freeswitch Server page.
- Edit configured FreeSwitch settings to new credential which
you just configured in event socket file.
|
Secure Portal
Steps :
1. Login to ASTPP portal
- Open Accounts -> Admins page
- Set strong password for admin
Note
Always use strong passwords to keep system secure.
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 =
# 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
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:
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 sysadm@foo.bar # receive all alerts
# set alert manager@foo.bar only on { timeout } # receive just service-
# # timeout alert
set alert your@email.com
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
Modules
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 |
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.
Accounts
ASTPP have different types accounts based on their roles and responsibility. They are as below,
- 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
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.
Create Customer Account Form Fields Details:
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. |
FirstName |
Customer First name |
LastName |
Customer Last name |
Company |
Customer Company name |
Telephone |
Customer Telephone number |
Country |
Customer Country |
Timezone |
Customer Timezone |
Status |
Customer account status |
Max Channels |
Maximum allowed concurrent channels for outbound calls. 0=Unlimited |
Number Translation |
If you wish to translate number with some defined number for specific customer then use
this feature. |
First Used |
Customer account’s first used date and time. It will be updated when customer will do first
call from system. |
Expiry Date |
Customer account’s expiry date. After that date, customer wouldn’t be able to make new calls. |
Valid Days |
Valid days for customer account. |
Create SIP Device |
By selecting check-box sip device is automatically created for that new user account. |
Rate Group |
Rate group is an essential field for billing. Without rate group customer wouldn’t be able
to make any calls.
You can create rate group by navigating to Tariff -> Rate group. |
Billing Schedule |
Billing schedule for invoice generation. |
Billing Day |
If billing schedule is monthly then you will be able to define the day on which you want
customer 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 Type |
Select customer account type. Prepaid OR Postpaid.
For prepaid customers, system will generate receipts as soon as any charges will be applied
to them.
For Postpaid, system will generate invoice on defined Billing Day. |
Credit Limit |
Customer account’s credit limit. Credit limit is only used for the postpaid account. |
Tax |
Select applicable taxes
You can create taxes from Configuration -> Taxes. |
Low Balance Alert |
Define low balance amount on which you want to send notification to customer. |
Enable Email Alerts? |
system will notify for Low credit if this option is set to Yes. |
Email Address |
E-mail address to get Low credit notification. |
How to create customer
Edit Account
Customer edit page contains settings tabs,
Here is left side menu information,
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
Account Details
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. |
FirstName |
Customer First name |
LastName |
Customer Last name |
Company |
Customer Company name |
Telephone |
Customer Telephone number |
Country |
Customer Country |
Timezone |
Customer Timezone |
Status |
Customer account status |
Max Channels |
Maximum allowed concurrent channels for outbound calls. 0=Unlimited |
Number Translation |
If you wish to translate number with some defined number for specific customer then use
this feature. |
First Used |
Customer account’s first used date and time. It will be updated when customer will do first
call from system. |
Expiry Date |
Customer account’s expiry date. After that date, customer wouldn’t be able to make new calls. |
Valid Days |
Valid days for customer account. |
Create SIP Device |
By selecting check-box sip device is automatically created for that new user account. |
Rate Group |
Rate group is an essential field for billing. Without rate group customer wouldn’t be able
to make any calls.
You can create rate group by navigating to Tariff -> Rate group. |
Billing Schedule |
Billing schedule for invoice generation. |
Billing Day |
If billing schedule is monthly then you will be able to define the day on which you want
customer 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 Type |
Select customer account type. Prepaid OR Postpaid.
For prepaid customers, system will generate receipts as soon as any charges will be applied
to them.
For Postpaid, system will generate invoice on defined Billing Day. |
Credit Limit |
Customer account’s credit limit. Credit limit is only used for the postpaid account. |
Tax |
Select applicable taxes
You can create taxes from Configuration -> Taxes. |
Low Balance Alert |
Define low balance amount on which you want to send notification to customer. |
Enable Email Alerts? |
system will notify for Low credit if this option is set to Yes. |
Email Address |
E-mail address to get Low credit notification. |
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.
Speed Dial
Block Codes
If you wish to block certain prefixes for account then you can configure those prefixes from Block Codes TAB.
DID
Assign DID To account.
Subscription
Assign subscription charges to account.
Account Invoices
Shows list of invoices generated for this account.
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.
Emails
Alert Threshold
Email Mass
Email Mass Field Description
Rate Group |
Rate group is an essential field for billing. You can create rate group by navigating
to Tariff -> Rate 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. |
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. |
Accounting
Related pages
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
|
Download |
Use to download Details. |
|
Edit |
Use to edit invoice information |
|
Delete |
Delete invoice from list |
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,
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
Refill Report
Report will display payment transaction information.
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.
Refill Coupon
Using refill coupon number user can refill their own account.
Only admin & reseller can create refill coupon.
Payment Report
Report will display payment transaction information.
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.
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
Create DIDs
You can create new DID using below page,
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 |
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/1234567890@192.168.1.3
OR
sofia/gateway/gwname/121423232
|
Max Channels |
Maximum allowed concurrent channels for DID calls. 0=Unlimited |
How to create DID
Import DIDs
Note
File must be in the following format(.csv):
DID,Country,Account,Per Minute Cost(USD),Initial Increment,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.
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,
Tariff
Related pages
Rate Group
Rate group is an important module of ASTPP. This belongs to customer and rating.
Create Rate Group
Rate Group Add/Edit Field description
Name |
Name of Rate Group |
Increment |
Rate of increment to calculate call cost.
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
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
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
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,
Exported .csv file,
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
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 Seconds |
Defined free seconds of package |
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.
Usage Report
Package usage report is shows the usage of the customer for specific package.
Carriers
Related pages
Trunk
Trunk is key module for LCR routing and associated with termination rates and provider account.
Top panel button
|
To add new trunk |
|
To delete multiple trunks |
Create Trunk
Trunk Add/Edit Form Fields Description:
Trunk name |
Trunk 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 Channels |
Number of Maximum concurrent call for this trunk |
Number |
If you wish to translate number with some defined number for trunk then use this feature. |
Translation |
Ex: “011/2222” (You can define multiple translations like “011/2222”,”02/33”)
That means from called number 011 is replaced by 2222.
|
Codec |
Enter codecs if you want call to use specific codecs only |
Precedence |
Priority of trunk |
How to create trunk
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
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 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 |
Initial Increment |
Here specify cost which you have to take when call is initiate |
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 precedence/priority level trunk will be selected. |
How to create termination rate
Import Termination Rate
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,
Exported .csv file,
Switch
Related pages
Sip Devices
To navigate this Menu System Switch -> SIP Devices
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 |
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
Gateways
Create Gateway
Gateways Add/Edit Form Fields Description:
Basic Information
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
SIP Profiles
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
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.
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
IP map(ACL)
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. |
Caller ID List
Create Caller ID
Caller ID Field Description
Account |
Select account number you wish to assign caller ID |
Caller ID |
Enter ID of caller. |
Call Reports
Related pages
Detail Reports
Related pages
Live Call Reports
Email History List
Configuration
Related pages
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.
To configure this go to Configuration -> Invoice Configuration.
How to do invoice configuration
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.
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.
|
Description |
Taxes Description for reference. |
How to create tax
Email Templates
To navigate this Menu System Configuration -> Email Template.
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
Template Name |
Here specify the name of template |
Subject |
Email subject |
Body |
Email content |
Countries
Create Country
Countries Add/Edit Field description
Name |
Here write down the name of country |
How to create country
Currencies
Create Currency
Currencies Add/Edit Field description
Name |
Name of currency |
Code |
Code of currency |
Rate |
Rate of currency |
How to create currency
Settings
Global-Settings
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. |
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 Timeout |
How long do we wait for input in general menus? Specified in MS. |
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 Announcement |
Do we want the calling cards script to announce the balance of account? |
CC Access Numbers |
Add calling card access numbers with comma separation. Ex : 12345678,3581629 |
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. |
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. |
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.
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.
FAQ
Related Page
Questions
Two Types Of Questions:
1.General Questions
2.Technical Questions
General Questions
- Is this solution completely open source?
- Yeah.
- What kind of license does it have?
- GNU AGPL3 More info : https://www.gnu.org/licenses/agpl-3.0.en.html
- Is there any limitation of using ASTPP?
- Nope. There is no limitation of using ASTPP. You can use it anywhere.
- Where ASTPP can be used?
- It can be used in small scale as well as large scale carrier setup.
- 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.
- 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
- 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 hardware to get better performance.
- Does ASTPP work on Virtual servers?
- Yeah, It can work on Virtual servers.
- 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.
- 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 billing@inextrix.com
- 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 sales@inextrix.com OR use http://astpp.inextrix.com/contact.php
Technical Questions
- What databases are supported in ASTPP ?
- It supports only MySQL (PostgreSQL support will be added in future release).
- What payment gateways are supported in ASTPP ?
- Paypal only for now. In future we have plan to add authorize.net payment gateway.
- Does ASTPP support Multi-language ?
- No
- Does ASTPP current version support callshop?
- No. It will be included in future releases. To get more information you can contact us at sales@inextrix.com.
- 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.
- 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.
- 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.
- How to verify if ASTPP and FreeSWITCH communicating properly?
- Default sip profile must be loaded in FreeSWITCH
- 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.
- How can I do IP Authentication for my customers?
- Configure your customer IP under Customers -> IP Settings
- 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.
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.