2. Installation and Upgrade

2.1. Initial Installation

2.1.1. Prerequisites

For an initial installation of the 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, 1GB 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 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.1.2. Using the NGCP installer (recommended)

2.1.2.1. 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 sip:provider CE. Therefore, it is HIGHLY RECOMMENDED to use a clean Debian installation to simplify the installation process.

If you plan to install the sip:provider 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.

2.1.2.2. Installing the 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 several 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

2.1.3. Using a pre-installed virtual machine

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

2.1.3.1. 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:

tar xvf sip_provider_CE_2.6_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 (adjust your bridging interface in the virtual machine configuration) to avoid having the sip:provider 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.
2.1.3.2. 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.

2.2.1. Network Configuration

If you have only one network card inside your system, its device name is eth0, it’s configured and only IPV4 is important to you then there should be nothing to do for you at this stage. If multiple network cards are present, your network card does not use eth0 for its device name or you need IPv6 then 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 want to enable IPv6 as well, change the section networkinge6address accordingly, for example like this:

  e6address:
    enable: yes
    address: fdda:5cc1:23:4:0:0:0:1f
[Tip]

Always use a full IPv6 address with 8 octets, leaving out zero octets (e.g. fdda:5cc1:23:4::1f) is not allowed.

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

If your server is running behind near-end static NAT or in cloud environment such as Amazon EC2 you need to configure the mapped public IP address as advertised address for sip:provider CE.

To set the advertised address change the section networkingaaddress accordingly, for example like this:

  aaddress:
    enable: yes
    address: 7.7.7.7
[Warning]

It is HIGHLY recommended that you use a public IP for the system. If you can not get a real or mapped 1:1 public IP, all your subscribers and gateways must be in the same private network. The sip:provider CE handles gateways and subscribers behind dynamic NAT, but the sip:provider CE itself cannot be behind dynamic NAT.

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

2.2.3. Start 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 those credentials and change the password of this user by going to System AdministrationAdministrators and clicking edit.

2.2.4. 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.2.5. 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.5 to v2.6

The system upgrade from sip:provider CE v2.5 to 2.6 will perform a couple of tasks:

  1. Migrate configuration system to a rolling release schema
  2. Migrate database system to a rolling release schema
  3. Upgrade NGCP software packages
  4. Upgrade NGCP configuration templates
  5. Upgrade base system within Debian 6.0 to latest package versions

For upgrading the sip:provider CE from v2.5 to the latest 2.6 release, execute the following commands:

sed -i 's/2.5/2.6/' /etc/apt/sources.list
apt-get update
apt-get install ngcp-upgrade-2.6-ce

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 several 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 (sections will be rearranged 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.5 installation under /var/backup/ngcp-2.6-* (where * is a place holder for a timestamp) in case you need to roll back something at any time. A log file of the upgrade procedure is available at /var/backup/ngcp-2.6-*/upgrade.log.