2. Installation

2.1. Prerequisites

For NGCP sip:provider CE, it is mandatory that your production environment meets the following criteria:

Hardware Requirements

  • Recommended: Dual-core, x86_64 compatible, 3GHz, 4GB RAM, 128GB HDD
  • Minimum: Single-core, x86_64 compatible, 1GHz, 512MB RAM, 16GB HDD

Supported Operating Systems

  • Debian Lenny (5.0) 64-bit

Internet Connection

  • Hardware needs connection to the Internet
[Important]

Only Debian Lenny (5.0) 64-bit is currently supported as a host system for NGCP sip:provider CE.

[Important]

It is HIGHLY recommended that you use a dedicated server (either a physical or a virtual one) for sip:provider CE, because the installation process will wipe out existing MySQL databases and modify several system configurations.

2.2. Software Installation

Using the NGCP installer (recommended)

Installing the Operating System

You need to install Debian Lenny (5.0) 64-bit on the server. A basic installation without any additional task selection (like Desktop System, Web Server etc.) is sufficient.

[Tip]

Sipwise recommends using the Netinstall ISO as installation medium.

[Important]

If you use other kinds of installation media (e.g. provided by your hosting provider), prepare for some issues that might come up during installation. For example, you might be forced to manually resolve package dependencies in order to install the CE. Therefore, it is HIGHLY RECOMMENDED to use a clean Debian installation to simplify the installation process.

If you plan to install the CE on Virtual Hosting Providers like Dreamhost with their provided Debian installer, you might need to manually prepare the system for the NGCP installation, otherwise the installer will fail installing certain package versions required to function properly.

Using Dreamhost Virtual Private Server

A Dreamhost virtual server uses apt-pinning and installs specific versions of MySQL and apache, so you need to clean this up beforehand.

apt-get remove --purge mysql-common ndn-apache22
mv /etc/apt/preferences /etc/apt/preferences.bak
apt-get update
apt-get dist-upgrade
[Warning]

Be aware that this step will break your web-based system administration provided by Dreamhost. Only do it if you are certain that you won’t need it.

Installing the NGCP sip:provider CE

The sip:provider CE is based on the Sipwise NGCP, so download and install the Sipwise NGCP installer package:

PKG=ngcp-installer-latest.deb
wget http://deb.sipwise.com/spce/${PKG}
dpkg -i ${PKG}

Run the installer as root user:

ngcp-installer

The installer will ask you to confirm that you want to start the installation. Read the given information carefully, and if you agree, proceed with y.

The installation process will take a couple of minutes, depending on your network connection and server performance. If everything goes well, the installer will (depending on the language you use), show something like this:

Installation finished. Thanks for choosing NGCP sip:provider Community Edition.

During the installation, you can watch the background processing by executing the following command on a separate console:

tail -f /tmp/ngcp-installer.log

Using a preinstalled virtual machine

For quick test deployments, preinstalled virtualization images are provided. These images are intended to be used for quick test, not recommended for production use. At this moment, only virtualbox images are provided. We’ll add more images compatible with the most popular virtualization solutions soon.

Virtualbox image

You can download a Virtualbox image from here. Once you have downloaded the file you can import it to Virtualbox via its import utility.

The format of the image is ova. If you have virtualbox 3.x running, which not compatible with ova format, you need to extract the file with any tar compatible software and import the ovf file which is inside the archive.

On Linux, you can do it like this:

tar -xvf sip_provider_2.x_virtualbox.ova

On Windows, right-click on the ova file, choose Open with and select WinZIP or WinRAR or any other application able to extract tar archives. Extract the files to any place and import the resulting ovf file in virtualbox.

Considerations when using this virtual machine:

  • You will need a 64bit guest capable virtualbox setup.
  • The root password is sipwise
  • There’s a user sipwise with password sipwise
  • You should use bridge mode networking (adecuate your bridging iface in the virtual machine configuration) to avoid having the CE behind NAT.
  • You’ll need to adjust your timezone and keybord layout.
  • The network configuration is set to dhcp. You’ll need to change it to the apropiate static configuration.
  • As the virtual image is a static file, it won’t contain the most updated versions of our software. Please upgrade the system via apt as soon as you boot it for the first time.
VMware image

You can download a VMware image from here. Once you have downloaded the file you can just extract the folder inside the .tgz file and copy it to your virtual machines folder.

The format of the image is tgz. You need to extract the file with any tgz compatible software.

On Linux, you can do it like this:

tar -xvzf sip_provider_2.x_vmware.tgz

On Windows, if the file extension is not binded to any program, just right-click on the tgz file, choose Open with and select WinZIP or WinRAR or any other application able to extract tgz archives.

Considerations when using this virtual machine:

  • You will need a 64bit guest capable vmware setup.
  • The root password is sipwise
  • There’s a user sipwise with password sipwise
  • You’ll need to adjust your timezone and keybord layout.
  • The network configuration is set to dhcp. You’ll need to change it to the apropiate static configuration.
  • As the virtual image is a static file, it won’t contain the most updated versions of our software. Please upgrade the system via apt as soon as you boot it for the first time.

2.3. Initial System Configuration

After the installation went through successfully, you are ready to adapt the system parameters to your needs to make the system work properly.

Network Configuration

The only parameter you need to change at this moment is the listening address for your SIP services. To do this, modify the parameter networkingeaddress in /etc/ngcp-config/config.yml, which by default is set to 127.0.0.1:

vim /etc/ngcp-config/config.yml

Look for the following section on top of the file:

networking:
  eaddress: 127.0.0.1

[...]

Change this parameter to the IP address configured during install time of the Debian operating system. If you haven’t fully configured your network interfaces, do this by adapting also the file /etc/network/interfaces:

vim /etc/network/interfaces

Add or adapt your interface configuration accordingly. For example, if you just want to use the system in your internal network 192.168.0.0/24, it could look something like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 1.2.3.4
        netmask 255.255.255.0
        gateway 1.2.3.1
        dns-nameservers 8.8.8.8
        dns-search yourdomain.com
/etc/init.d/networking restart
[Warning]

It is HIGHLY recommended that you use a public ip for the system. If you use a private ip, all your subscribers and gateways must be in the same private network. The CE handles gateways and subscribers behind NAT, but the CE itself cannot be behind NAT.

Apply Configuration Changes

In order to apply the changes you made to /etc/ngcp-config/config.yml, you need to execute the following command to re-generate your configuration files and to automatically restart the services:

ngcpcfg apply
[Tip]

At this point, your system is ready to serve.

Securing your Server

During installation, the system user cdrexport is created. This jailed system account is supposed to be used to export CDR files via sftp/scp. Set a password for this user by executing the following command:

passwd cdrexport

The installer has set up a MySQL database on your server. You need to set a password for the MySQL root user to protect it from unauthorized access by executing this command:

mysqladmin password <your mysql root password>

For the Administrative Web Panel located at https://<your-server-ip>:1443/, a default user administrator with password administrator has been created. Connect to the panel (accept the SSL certificate for now) using this credentials and change the password of this user by going to System AdministrationAdministrators and clicking edit.

Configuring the Email Server

The NGCP installer will install mailx (which has Exim4 as MTA as a default dependency) on the system, however the MTA is not configured by the installer. If you want to use the Voicemail-to-Email feature of the Voicebox, you need to configure your MTA properly. If you are fine to use the default MTA Exim4, execute the following command:

dpkg-reconfigure exim4-config

Depending on your mail setup in your environment (whether to use a smarthost or not), configure Exim accordingly. In the most simple setup, apply the following options when prompted for it:

  • General type of mail configuration: internet site; mail is sent and received directly using SMTP
  • System mail name: the FQDN of your server, e.g. ce.yourdomain.com
  • IP-addresses to listen on for incoming SMTP connections: 127.0.0.1
  • Other destinations for which mail is accepted: the FQDN of your server, e.g. ce.yourdomain.com
  • Domains to relay mail for: leave empty
  • Machines to relay mail for: leave empty
  • Keep number of DNS-queries minimal (Dial-on-Demand)? No
  • Delivery method for local mail: mbox format in /var/mail/
  • Split configuration into small files? No
[Important]

You are free to install and configure any other MTA (e.g. postfix) on the system, if you are more comfortable with that.

2.4. What’s next?

To test and use your installation, you need to follow these steps now:

  1. Create a SIP domain
  2. Create some SIP subscribers
  3. Register SIP endpoints to the system
  4. Make local calls and test subscriber features
  5. Establish a SIP peering to make PSTN calls

Please read the next chapter for instructions on how to do this.