FreeSWITCH for Ubuntu 14.04

Similar documents
Please also review the entries for Debian and Ubuntu under Installation#Debian for some more information before proceeding.

CROWDCOIN MASTERNODE SETUP COLD WALLET ON WINDOWS WITH LINUX VPS

COLD WALLET + MASTERNODE SETUP ON LINUX

Managing Virtual Machines on Ubuntu KVM

Windows cold wallet managing Linux VPS connected Masternode

Debian 8 Jessie. About. Commit Log. Please NOTE that Debian 9 Stretch is now officially supported by FreeSWITCH.

BitcoinMonster Masternode Linux VPS Tutorial - Vultr VPS Created By : Samshak Donet Mon: MKX8PFz1uvBkwNDTXtUuj6KinudhsKZh1K

KINGSTON COIN VPS MASTERNODE SETUP GUIDE

Building the Laika AMI

Masternode Setup Guide

SAROS MasterNode Guide V1.1

Beetle Coin Masternodes Guide

Setting up a Chaincoin Masternode

MASTERNODE SETUP GUIDE

MASTERNODE Setup Guide

Masternode Setup Guide

Masternode Guide #1. Single masternode on Linux VPS (Ubuntu)+ control wallet on local PC (Windows)

Installing FreePBX 2.11 on Ubuntu Server (Precise Pangolin)

ruby-on-rails-4 #ruby-onrails-4

SUB1X Masternode Setup Guide: LINUX Version

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on a fresh installations of

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on fresh installations of. ubuntu desktop-amd64.

CazCoin VPS Masternode Setup December 2018

WHAT YOU WILL NEED FOR THIS GUIDE:

Remote GUI access to a Linux computer using Tightvnc

BitcoinGenX Masternode Setup Tutorial

SCRIV NETWORK COLD WALLET MASTERNODE SETUP GUIDE DETAILED

User-friendly Cross-platform Industry 4.0 Web Viewer Smartphone-App Free Hotline

Contents. Crave Masternode Setup Guides. Single / Multiple Local Masternode(s) Single Masternode using a VPS. Multiple Masternodes using a VPS

Masternode Setup Guide Local Wallet with VPS Server

ASTPP. Release 3.6. inextrix Technologies Pvt. Ltd

pfsense Boot failure after upgrade to 2.4.0

COLD WALLET STEP BY STEP SETUP TUTORIAL FOR BEGINNERS

Rover Coin. Hot Cold Wallet Masternode VPS setup Guide

swiftenv Documentation

Infoblox Kubernetes1.0.0 IPAM Plugin

CazCoin VPS Masternode Setup May 2018

Integration of UNICORE Components into Linux Systems

Zephyr Kernel Installation & Setup Manual

Installing FreePBX 13 on Debian 8.1

This guide assumes that you are setting up a masternode for the first time. You will need:

GNU/Linux: An Essential Guide for Students Undertaking BLOSSOM

Masternode&Sentinel Setup Guide

TEAMWORK SYSTEM. version user guide

Tizen TCT User Guide

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

WES 237A Project Part 1 Guide

ASTPP. Release 3.5. inextrix Technologies Pvt. Ltd

NAV Coin NavTech Server Installation and setup instructions

Installation of Apache OpenMeetings on Mac El Capitan OS X

RTC 502 and its Git adapter, Git and its prerequisite

Complete Guide to Setting Up Linda on Ubuntu 16 For Staking

Installing Open Project on Ubuntu AWS with Apache and Postgesql

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

TrinityCore Documentation

GET YOUR DRAGONBOARD UP TO DATE

halef Documentation ETS

Network softwarization Lab session 2: OS Virtualization Networking

Project 1 Setup. Some relevant details are the output of: 1. uname -a 2. cat /etc/*release 3. whereis java 4. java -version 5.

Installation of Apache OpenMeetings on macos Mojave 10.14

TZC WALLET + HEADLESS WALLET ON LINUX. Local Wallet + PoS Headless Wallet on VPS (Ubuntu 16.04)

Building Tizen Development Environment

Configuring the Raspberry Pi for the UPS

Nyerium Hot Cold Masternode Guide

How to run NoMachine server inside Docker

Linux Kung-Fu. James Droste UBNetDef Fall 2016

Tensorflow v0.10 installed from scratch on Ubuntu 16.04, CUDA 8.0RC+Patch, cudnn v5.1 with a 1080GTX

Singularity: container formats

7.3 Install on Linux and Initial Configurations

Linux Essentials Objectives Topics:

Installation of Apache OpenMeetings on Mac El Capitan OS X

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

Installation of Apache OpenMeetings on Debian 9. This tutorial is made based on a fresh installations of. debian amd64-dvd-1.

Introduction to the UNIX command line

Alarm Counter. A Ceilometer OpenStack Application

Prerequisito indispensabile per completare con successo la migrazione è che:

Linux Systems Administration Getting Started with Linux

OCTVQE Zaptel Echo Canceller (PRELIMINARY)

T.A.D / ABS - Installation

Support for Vanilla Universe Checkpointing. Thomas Downes University of Wisconsin-Milwaukee (LIGO)

TangeloHub Documentation

Getting Started with MySQL

Dixicoin (DXC) Masternode Guide for VPS

Working with Basic Linux. Daniel Balagué

Apache Tomcat Installation Guide [ Application : IVMS Base, Rich and Core Version ] [ Platform : 64 Bit Linux ] Tomcat Version: 6.0.

COUCHDB - INSTALLATION

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

DEVELOPMENT GUIDE VAB-630. Linux BSP v

coxtactoe Documentation

Nagios User Guide. You can use apt-get to install these packages by running the following commands:

LOCAL WALLET (COLD WALLET):

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on fresh installations of. ubuntu desktop-amd64.

How to force automatic removal of deleted files in nextcloud

Design News Gadget Freak. AutoNag reminder system. Background: Server OS Installation:

Orchid Core VMS Installation Guide

SAS Event Stream Processing for Edge Computing 4.3: Deployment Guide

Software Install Guides. Release 2.6.0

MarketC - Masternode Setup Guide

Administration Dashboard Installation Guide SQream Technologies

Vaango Installation Guide

Transcription:

FreeSWITCH for Ubuntu 14.04 Freeswitch is an open-source alternative to Asterisk to build a voip telephony server. It was launched by a member of the Asterisk development team who wanted to rewrite the whole thing from scratch to cleanly separate the switching part from the PBX part. 1. Add repository Add freeswitch repository. curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub sudo apt-key add echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" sudo tee /etc/apt/sources.list.d/freeswitch.list sudo apt-get update 2. Install dependencies Install all the dependencies needed by freeswitch. sudo apt-get install -y libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev libjpeg62turbo-dev' libncurses5-dev 'libtool-bin libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdspdev libsqlite3-dev libedit-dev libldns-dev libpq-dev yasm 3. Download freeswitch Create the source folder of your choice and download freeswitch in this location mkdir /root/sources && mkdir /usr/local/switch && cd /root/sources git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git

4. Compile/Install freeswitch To compile freeswitch, navigate to the freeswitch source directory. Now invoke bootstrap script followed by configure script. We will enable with-java option and the installation directory will be /usr/local/switch cd /root/sources/freeswitch./bootstrap.sh -j./configure --enable-core-pgsql-support -prefix="/usr/local/switch/" --with-java=/usr/lib/jvm/java-8oracle/include/ Once the configuration is complete, you will see the information about freeswitch configuration.

Now install freeswitch using following command. make && make install Once installation is complete, you will see the following screen. Lastly install few sound files. These will be installed in /usr/local/switch/share/freeswitch/sounds/ make cd-sounds-install cd-moh-install Freeswitch is now installed in /usr/local/switch. Start freeswitch with following command. cd /usr/local/switch/bin./freeswitch Once freeswitch has started, you will get a confirmation message.

Edit PATH information in /etc/profile to include path of Freeswitch binaries. nano /etc/profile Now add the following line export PATH=$PATH:/usr/local/switch/bin Reload updated profile source /etc/profile 5. Freeswitch startup script Add freeswitch user to your system, and change the required permissions for the directory. adduser --disabled-password --quiet --system --home /usr/local/switch --gecos "FreeSWITCH Voice Platform" --ingroup daemon freeswitch chown -R freeswitch:daemon /usr/local/switch/ chmod -R o-rwx /usr/local/switch/ Create the file /etc/init.d/freeswitch with the following code written by Matthew Williams but before that create the location for PID file and grant permission for freeswitch. mkdir /usr/local/switch/run chown -R freeswitch:daemon /usr/local/switch/run nano /etc/init.d/freeswitch Using your favorite editor add the following in /etc/init.d/freeswitch and save the file.!/bin/bash BEGIN INIT INFO Provides: Required-Start: Required-Stop: Default-Start: Default-Stop: Description: Author: END INIT INFO Do NOT "set -e" freeswitch $local_fs $remote_fs $local_fs $remote_fs 2 3 4 5 0 1 6 Freeswitch debian init script. Matthew Williams

PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin DESC="Freeswitch" NAME=freeswitch DAEMON=/usr/local/switch/bin/$NAME DAEMON_ARGS="-nc" PIDFILE=/usr/local/switch/var/run/freeswitch/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME FS_USER=freeswitch FS_GROUP=daemon Exit if the package is not installed [ -x "$DAEMON" ] exit 0 Read configuration variable file if it is present [ -r /etc/default/$name ] &&. /etc/default/$name Load the VERBOSE setting and other rcs variables. /lib/init/vars.sh Define LSB log_* functions. Depend on lsb-base (>= 3.0-6) to ensure that this file is present.. /lib/lsb/init-functions Function that sets ulimit values for the daemon do_setlimits() { ulimit -c unlimited ulimit -d unlimited ulimit -f unlimited ulimit -i unlimited ulimit -n 999999 ulimit -q unlimited ulimit -u unlimited ulimit -v unlimited ulimit -x unlimited ulimit -s 240 ulimit -l unlimited return 0 }

Function that starts the daemon/service do_start() { Set user to run as if [ $FS_USER ] ; then DAEMON_ARGS="`echo $DAEMON_ARGS` -u $FS_USER" fi Set group to run as if [ $FS_GROUP ] ; then DAEMON_ARGS="`echo $DAEMON_ARGS` -g $FS_GROUP" fi Return 0 if daemon has been started 1 if daemon was already running 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null -- \ return 1 do_setlimits start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background -- \ return 2 Add code here, if necessary, that waits for the process to be ready to handle requests from services started subsequently which depend on this one. As a last resort, sleep for some time. } Function that stops the daemon/service do_stop() { Return 0 if daemon has been stopped 1 if daemon was already stopped 2 if daemon could not be stopped other if a failure occurred start-stop-daemon --stop --quiet --retry=term/30/kill/5 -pidfile $PIDFILE --name $NAME

RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 Wait for children to finish too if this is a daemon that forks and if the daemon is only ever run from this initscript. If the above conditions are not satisfied then add some other code that waits for the process to drop all resources that could be needed by services started subsequently. A last resort is to sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/kill/5 --exec $DAEMON [ "$?" = 2 ] && return 2 Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } Function that sends a SIGHUP to the daemon/service do_reload() { If the daemon can reload its configuration without restarting (for example, when it is sent a SIGHUP), then implement that here. start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE"!= no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0 1) [ "$VERBOSE"!= no ] && log_end_msg 0 ;; 2) [ "$VERBOSE"!= no ] && log_end_msg 1 ;; esac ;;

stop) [ "$VERBOSE"!= no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0 1) [ "$VERBOSE"!= no ] && log_end_msg 0 ;; 2) [ "$VERBOSE"!= no ] && log_end_msg 1 ;; esac ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 exit $? ;; reload force-reload) If do_reload() is not implemented then leave this commented out and leave 'force-reload' as an alias for 'restart'. log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart force-reload) If the "reload" option is implemented then remove the 'force-reload' alias log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0 1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; Old process is still running *) log_end_msg 1 ;; Failed to start esac ;; *) Failed to stop log_end_msg 1 ;; esac

;; *) echo "Usage: $SCRIPTNAME {start stop restart reload forcereload}" >&2 echo "Usage: $SCRIPTNAME {start stop restart force-reload}" >&2 exit 3 ;; esac exit 0 Make the script executable and make it auto start on system boot: chmod +x /etc/init.d/freeswitch update-rc.d freeswitch defaults Freeswitch is now installed in your system. 6. Add Freeswitch users To add a freeswitch user, navigate to /usr/local/switch/etc/freeswitch/directory/default directory and create a file by the name 1000.xml and add the following. cd /etc/freeswitch/directory/default vi 1000.xml <include> <user id= 1000 > <params> <param name= password value= default.123 /> <param name= vm-password value= 1000 /> </params> <variables> <variable name= toll_allow value= domestic,international,local /> <variable name= accountcode value= 1000 /> <variable name= user_context value= default /> <variable name= effective_caller_id_name value= Extension 1000 /> <variable name= effective_caller_id_number value= 1000 /> <variable name= outbound_caller_id_name value= $${outbound_caller_name} /> <variable name= outbound_caller_id_number

value= $${outbound_caller_id} /> <variable name= callgroup value= techsupport /> </variables> </user> </include> Change the ownership. chown freeswitch:daemon 1000.xml Similarly, create another user in 1001.xml. Replace all occurrences of 1000 with 1001 in the above file and change the password for user 1001. <include> <user id= 1001 > <params> <param name= password value= edmund1001 /> <param name= vm-password value= 1001 /> </params> <variables> <variable name= toll_allow value= domestic,international,local /> <variable name= accountcode value= 1001 /> <variable name= user_context value= default /> <variable name= effective_caller_id_name value= Extension 1001 /> <variable name= effective_caller_id_number value= 1001 /> <variable name= outbound_caller_id_name value= $${outbound_caller_name} /> <variable name= outbound_caller_id_number value= $${outbound_caller_id} />

<variable name= callgroup value= techsupport /> </variables> </user> </include> Change the ownership. chown freeswitch:daemon 1001.xml Now open the file /usr/local/switch/etc/freeswitch/dialplan/default.xml using any editor and modify the destination_number and application= bridge part under extension section Local Extension around line 266. If you have already configured the domain name then you don t have to add IP address part in bridge parameter. Just Keep it like below. <action application= bridge data= user/${dialed_extension}@${your_domain_name} /> Since we have a domain name, our action tags bridge s data will be user/${dialed_extension}@demohost.hostingwikipedia.com...... <extension name= Local_Extension > <condition field= destination_number expression= ^(1[0-9]{3})$ >...... <action application= bridge data= user/${dialed_extension}@demohost.hostingwikipedia.com />

<action application= answer /> <action application= sleep data= 1000 />...... Reload new configuration for freeswitch. freeswitch@your-host> reloadxml 7. Install Zoiper VOIP client We have created two freeswitch users in the last step. Download and install zoiper in two separate client system from https://www.zoiper.com/en/voip-softphone/download/zoiper3. Extract the downloaded zoiper directory and run the installer according to your client s architecture../zoiper_3.3_linux_free_32bit.run OR./Zoiper_3.3_Linux_Free_64Bit.run

Click Forward Accept the license. Select Components

Choose installation directory

Click Forward Click Finish

Choose Yes or No 8. Configure Zoiper Run the zoiper and click settings-> Audio wizard and configure speaker and microphone.

Once you have finished testing microphone and speakers, click settings ->create a new account. Choose SIP and click next.

Enter freeswitch user/password that we have created earlier along with domain. If you have already configured the domain then you don t have to put IP address.

Click Next

Give a name of the account. Click Next, your account will be added to the list.

If you now click Settings -> Preferences and then General and advance tab, it will look like below.

Repeat the same process for user 1001 in another system. Now as a user 1000 dial the user 1001 or vice-versa, you will get a screen like below stating its status as ringing. Once the user 1001 accept your call, you will get connected with the user 1001. Now you have a basic PBX which allows the SIP users to register and place and receive VOIP calls.