2. Installation and Upgrade

2.1. Initial Installation

Prerequisites

For an initial installation of the NGCP sip:provider CE v2.2, 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 Squeeze (6.0) 64-bit

Internet Connection

  • Hardware needs connection to the Internet
[Important]

Only Debian Squeeze (6.0) 64-bit is currently supported as a host system for the NGCP sip:provider CE v2.2.

[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.

Using the NGCP installer (recommended)

Installing the Operating System

You need to install Debian Squeeze (6.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 (md5sum) 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

Preinstalled virtualization images for VMWare and VirtualBox will be provided in the next days.

For quick test deployments, preinstalled virtualization images are provided. These images are intended to be used for quick test, not recommended for production use.

VirtualBox image

You can download a VirtualBox image from here (checksums: sha1, md5). 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 is 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:

unzip sip_provider_CE_2.2_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 zip 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 (adjust your bridging interface in the virtual machine configuration) to avoid having the CE behind NAT.
  • You’ll need to adjust your timezone and keyboard layout.
  • The network configuration is set to DHCP. You’ll need to change it to the appropriate 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 (checksums: sha1, md5). Once you have downloaded the file just extract the zip file and copy its content to your virtual machines folder.

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 keyboard layout.
  • The network configuration is set to DHCP. You’ll need to change it to the appropriate 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.2. 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.

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.

2.3. Upgrade from v2.1

The system upgrade from SPCE v2.1 to v2.2 will perform a couple of fundamental tasks:

  1. Upgrade Debian from Lenny (5.0) to Squeeze (6.0)
  2. Change the SIP routing architecture to use dedicated load-balancing, proxy and b2bua processes.
  3. Use a new kernel and a kernel-based RTP proxy.

For upgrading the SPCE from v2.1 to the latest v2.2 release, execute the following commands:

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

Run the upgrade script as root like this:

ngcp-upgrade

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

The upgrade process will take a couple of minutes, depending on your network connection and server performance. If everything goes well, it will finally ask you to reboot your system. Confirm to let the system reboot (it will boot with an updated kernel).

Once up again, double-check your config file /etc/ngcp-config/config.yml (it will look quite different now and will contain more parameters) and your domain/subscriber/peer configuration and test the setup. You can find a backup of some important configuration files of your existing 2.1 installation under /var/backup/ngcp-2.1/ in case you need to roll back something at any time.