SipX on Ubuntu

From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia

Jump to: navigation, search
Important note: Installing sipX on Ubuntu is essentially the same as with Debian. Please refer to HowTo install sipX 3.0 on Debian Sarge and HowTo install sipX 3.2 on Debian Sarge for more information. A few issues remain: Postgres release needs to be upgraded, some permission errors remain, and the certifiate creation does not yet work.

Contents

Installing sipX Release 3.0.1 / 3.2 on Ubuntu / Kubuntu Dapper Drake

Below is a step-by-step guide on how to install Ubuntu as well as sipX Release 3.0.1 and Release 3.2. sipX Runtime and Build Dependencies.

The SIPfoundry site provides a list of features, sipX roadmap, screenshots, as well as an architecture discussion.

Note: Release 3.0.1 is the latest stable release. Release 3.2 is an ALPHA release. You are encouraged to report bugs to the project's Jira Tracker.

For up-to-date information on new releases subscribe here.

Redundant High-Availability Installation (3.2 only)

Release 3.2 of the sipX PBX system implements a distributed system offering high-availability and fail-over redundancy for the entire sipX call control system. In release 3.2 a single instance of the Configuration Server (sipXconfig) manages two sipX servers. Under normal operating conditions the two servers load-balance using DNS SRV records, which doubles overall system performance. The registration and other state information is replicated and synchronized with the other server in real-time, so that from a user perspective the two servers look like one big system.

Installation & configuration of a redundant system still requires some manual steps in release 3.2. We expect this to be fully automated and integrated into Config Server by the next release. Please consult the high-availability install & configuration guide if you want to use the high-availability / redundancy capabilities of sipX. A High-Availability Failure and Recovery Analysis is available too.

The Design Documentation provides additional information about how high-availability was implemented. Please post feedback and suggestions to the sipx-dev mailing list at sipx-dev@list.sipfoundry.org.

HW Requirements

For a reasonably performing system we recommend the following minimum configuration. This is a rough guide line for a production system. sipX can be installed on significantly older HW provided there is enough system memory available (>384MB). Media server performance profits from a dual CPU system.

  • Pentium 4 or Xeon processor @ 1.8 GHz or higher (For a test system even a P III will work fine)
  • Minimum of 512 MB of memory with sufficient swap space (1 GB RAM preferred)
  • 18 GB to 36 GB disk recommended (dependent on required voicemail storage)

Installing Ubuntu

We chose to install Ubuntu Dapper Drake as a Server and therefore without a graphical desktop. By default Ubuntu is installed with DHCP. That tends to not work great with sipX and it is recommended to switch to a fixed IP address. More information on assigning a fixed IP address.

Note: Ubuntu does not create a root account. Login using the user account created during the install and use sudo for gain root privileges.

Important note: For production systems it is recommended to use a separate partion for /var. This is to prevent system crashes should the /var partition get filled up either because the logs run over or the voicemail store grows too big.

The Ubuntu server installation does not install the SSH server by default. If you need this for remote login, do the following:

sudo apt-get install ssh
/etc/init.d/ssh start

Commenting out the line "#deb cdrom:[Ubuntu 6.04 _Dapper Drake_ - Alpha i386 (20060310)]/ dapper main restricted" in the file /etc/apt/sources.list will cause Ubuntu to install over the network as opposed to from the cdrom.

Setup Ubuntu apt Package Management

sudo nano /etc/apt/sources.list
File: /etc/apt/sources.list
# Comment out the line that uses the cdrom as a repository
# deb cdrom:[......

# required for libcgicc1 - enable Universe repository (uncomment it)
deb http://archive.ubuntu.com/ubuntu dapper universe
#Add the Calivia Ubuntu repositories for sipX and dependencies
deb http://scm.calivia.com/pub/sipx/ubuntu stable main
deb http://scm.calivia.com/pub/sipx/ubuntu unstable main

Note: libcgicc1 is in universe, configure apt as shown above.

Note: mod_cplusplus is not available in Dapper Drake. The one provided with from the Calivia Repository will be installed automatically. Note: The Debian build scripts are available from the Calivia repository.

Code: Update apt repository
sudo apt-get update

Install sipX

The required .deb packages are available from the Calivia Repository. All necessary run-time dependencies are installed automatically. The sipX packages are not signed and apt-get therefore will ask for permission to install them anyway.

Code: Install sipX packages
# Install 3.0.1 stable
sudo apt-get install -t stable sipxpbx
# Install 3.2 testing
sudo apt-get install -t unstable sipxpbx
Important note: Even though during the configuration phase a certificate is created, this step does not currently work and the cert needs to be manually created after the installation completes.

Package Configuration

SSL self-signed certificate configuration (libsipxcommserver1):

  • Enter data required to generate a self-signed certificate used by sipX. Manual creation of a self-signed certificate is no longer required. Run 'dpkg-reconfigure libsipxcommserver1' to re-create a self-signed certificate.

Java configuration (sipxconfig):

  • Enter JAVA_PATH. On a stock Debian Sarge with Sun JRE 1.5, this is /usr/lib/j2re1.5-sun

Postgresql: Obsolete major version 7.4:

  • Accept (OK)

Apache configuration (sipxpbx):

  • Apache configuration file: /etc/apache2/httpd.conf - Accept package maintainer's version and answer "Y"

Note: If you see this error "psql: FATAL: IDENT authentication failed for user "postgres"" during setup of sipxconfig, ignore it. This is a bug in the config script.

Fixes for the Current ALPHA Ubuntu Post-Install Scripts

Stopping sipxpbx

sudo /etc/init.d/sipxpbx stop

Generate a valid SSL certificate

ALPHA 3.2: The certificate that is generated during the install process fails to install properly. The script that generates the cert changed between release 3.0.1 and 3.2. You can generate it manually as follows:

Code: Generate valid SSL certificate
mkdir $HOME/sslkeys
cd $HOME/sslkeys
/usr/bin/ssl-cert/gen-ssl-keys.sh 
  enter the data as requested (anything works):
     - CA Common Name (DNS name for CA): Enter anything but NOT the DNS name of your server
     - SIP domain name: The domain name of your installation
     - Full DNS name for the server: Enter fully qualified hostname of your sipX server
sudo /usr/bin/ssl-cert/install-cert.sh

Postgres Database Initialization

cd /etc/init.d
sudo ln -s postgresql-7.4 postgresql
cd /var/lib
sudo ln -s postgresql pgsql 
cd /var/lib/pgsql
sudo ln -s /var/lib/postgresql/7.4/main/ data
sudo /usr/bin/sipxconfig.sh --setup

Note: If you see this error "psql: FATAL: IDENT authentication failed for user "postgres"" during setup of sipxconfig, ignore it. This is a bug in the config script.

Start sipxpbx

Note: sipXpbx is started automatically after the installation completes

Start sipX manually (as root):

Code: Start sipxpbx
sudo /etc/init.d/sipxpbx start

The post install script adds sipxpbx to the default run level. Therefore, sipxpbx will be started automatically at boot time. Make sure postgresql and tftpd are configured for automatic startup as well.

Login to the sipX Configuration Server Web Interface

Use your favorite browser from a different system with access to the sipX server and go to (after starting sipxpbx wait for up to 30 seconds for all deamons to start properly before trying to login, check for listening TCP port 8443 with 'netstat -lnt'):

http://sipx.domain.com

First, you are asked to define a password for the superadmin user. Once entered successfully, you should then login as user superadmin.

Image:StartScreen.png

You are all done!

Personal tools