SEMS 0.10.0 voicemail server howto


HOWTO set up a voicemail server with SEMSi 0.10.0.


General

This document describes how to set up a voicemail server using SEMSi 0.10.0 release.
From previous versions the installation process has been simplified a lot for SEMS 0.10.0.
If you want to use SEMS 0.10.0 rc2 or SEMS 0.10.0 rc1, please have a look at the tutorial for rc2 or tutorial for rc1.

We will be using SERi 0.9.6-semsi as the SIP stack for SEMS. The SER 0.9.6-sems comes bundled with the SEMS 0.10.0 release, which makes installation pretty easy. Installation of SER 0.9.6-sems will be in a separate directory (/opt/seri-sems/) such that it can be living on the same host together with different SER versions.

In this tutorial I assume the voicemail server has the name sems-vmserver and an interface eth0 with the IP address 10.1.0.236.

Our voicemail server will listen for SIP requests on port 5070.

The voicemail server needs to be told that from the many possible applications that are available for SEMS, the voicemail should be run. Therefore, we append a header P-App-Name: voicemail to the INVITE.It also needs an email address to send the mail to, this is to be placed in the parameters header for the application, e.g.: P-App-Param: Email-Address=user@gmail.com. So before t_relaying the INVITE to vmserver:5070 add the two headers, P-App-Name and P-App-Param, with the application name and the email address of the callee To the INVITE.

ser.cfg to test this:

  append_hf("P-App-Name: voicemail\r\n");
  append_hf("P-App-Param: Email-Address=user@gmail.com\r\n");
  t_relay_to_udp("127.0.0.1","5070");
  break;

For further ser configuration example see the Configure-SEMS-Ser-HOWTO.

This howto assumes we have Linux debian sarge, but it will work fine on any other Linux distribution.

Step 1: Prerequisites

For SEMS we need make and g++>=3.4, we can install it with

#apt-get install make g++-3.4 && ln -s /usr/bin/g++-3.4 /usr/bin/g++ && ln -s /usr/bin/gcc-3.4 /usr/bin/gcc

For SER we need gcc, make, bison, flex, libc6-dev. As we already have installed gcc-3.4 for SEMS, we can install the remaining with

apt-get install make bison libc6-dev flex

Step 2: Getting SEMS 0.10.0

We will get the source in /usr/local/src/:

cd /usr/local/src
wget http://ftp.iptel.org/pub/sems/sems-0.10.0-bundle.tar.gz
tar xzvf sems-0.10.0-bundle.tar.gz

Step 3: Installing SEMS 0.10.0

We can install SEMS with all applications, or just install the core and the voicemail application.

Step 3a: Install everything

To install SEMS with all applications, we can simply do the following:

make -C sems-0.10.0 all
sudo make -C sems-0.10.0 install

This installs SEMS with all applications. Additionally, ser-0.9.6-sems is installed in /opt/ser-sems.

Step 3b: Install only voicemail application

We build ser and install it into /opt/ser-sems:

make -C sems-0.10.0/ser-0.9.6-sems all
sudo make -C sems-0.10.0/ser-0.9.6-sems install PREFIX=/opt/ser-sems

We install a ser-sems.cfg config file:

sudo make -C sems-0.10.0/ install-ser-cfg SERPREFIX=/opt/ser-sems

This will install a customized ser configuration file that instructs ser to send requests directly to SEMS,
including the P-App-Name and P-App-Param headers. If you want the voicemail server be reachable via SIP only
on one special interface, edit /opt/ser-sems/etc/ser/ser-sems.cfg and change the listen= directive there.

Of SEMS itself, we install the core:

make -C sems-0.10.0/core all
sudo make -C sems-0.10.0/core install

the voicemail application:

make -C sems-0.10.0/apps/voicemail all
sudo make -C sems-0.10.0/apps/voicemail install

and the configuration for the voicemail application:

sudo make -C sems-0.10.0/apps/voicemail install-cfg

Step 4: Adapting configuration for sems:

We need to configure some parameters in the sems configuration, which is located at /usr/local/etc/sems/sems.conf

At least we need to set the hostname of the SMTPi server in this file

# optional parameter: smtp_server=<hostname>
#
# - sets address of smtp server
smtp_server=mail

In /usr/local/etc/sems/etc/voicemail.conf we find the path of the announcement which is played and the path to the email template:

#CFGOPTION_SEMS_ANNOUNCEPATH
announce_path=/usr/local/lib/sems/audio/
#ENDCFGOPTION
#CFGOPTION_SEMS_TEMPLATEDIR
email_template_path=/usr/local/etc/sems/
#ENDCFGOPTION

Editing the email template

The email template in /usr/local/etc/sems/default.template can be adapted.

The default looks like this:

subject: Voice message from: %from%
from: voicemail@%domain%
to: %email%
Hello %user%@%domain%,
%from% left a voice message for you.
Thank you for using <your domain>'s Voicemail.
Your voicemail system.
-------------------------------------------------------------
This message was created by <your domain>'s voicemail system.
Please review www.<your domain> for more information.
-------------------------------------------------------------

Step 5: Starting SER

/opt/ser-sems/sbin/ser -f /opt/ser-sems/etc/ser/ser-sems.cfg

Step 6: Testing (Starting SEMS in debug mode)

/usr/local/sbin/sems -D 3 -E

Now we can place a call to voicemail, and see how the call is received and the voicemail is sent.

Step 7: Starting SEMS

/usr/local/sbin/sems

Step 8: Monitoring

tbd

Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login