How to set up a voicemail server with SEMS


This Howto desribes step by step how to set up a voicemail2email server using SEMSi (0.10.0-rc1).


General

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

We will be using SEMS 0.10.0-rc1 and SERi 0.9.6-semsi as it's SIP stack. Installation of SER 0.9.6-sems will be in a separate directory 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, and only do voicemail. This means that every request will be passed to SEMS' voicemail application.

The voicemail server needs an email address where the email should be sent to. It gets this address from a header
P-Email-Address in the INVITE. So before t_relaying the INVITE to vmserver:5070 add the header with the email address of the callee To the INVITE.

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 and SER

We will get SEMS and SER sources in /usr/local/src/:

cd /usr/local/src
wget ftp://ftp.iptel.org/pub/sems/sems-0.10.0_rc1.tar.gz
wget http://ftp.iptel.org/pub/sems/seri-0.9.6-sems_src.tar.gz
tar xzvf ser-0.9.6-sems_src.tar.gz
tar xzvf sems-0.10.0_rc1.tar.gz

Step 3: Making SEMS and SER

For SEMS we only need the core and the voicemail module to be built (codec modules are built with the core).

cd /usr/local/src/sems-0.10.0_rc1
make -C core
make -C apps/voicemail

Now we should have the sems binary core/sems and the plugins
echo, gsm, ilbc, session_timer, stats, voicemail, wav:

sems-vmserver:/usr/local/src/sems-0.10.0_rc1# ls -l core/sems core/lib
-rwxr-xr-x 1 root root 4583960 Feb 28 20:39 core/sems
core/lib:
total 1369
-rwxr-xr-x 1 root root 214392 Feb 28 20:39 echo.so
-rwxr-xr-x 1 root root 51321 Feb 28 20:40 gsm.so
-rwxr-xr-x 1 root root 73877 Feb 28 20:40 ilbc.so
-rwxr-xr-x 1 root root 329312 Feb 28 20:39 session_timer.so
-rwxr-xr-x 1 root root 260309 Feb 28 20:39 stats.so
-rwxr-xr-x 1 root root 416795 Feb 28 20:40 voicemail.so
-rwxr-xr-x 1 root root 39796 Feb 28 20:40 wav.so
sems-vmserver:/usr/local/src/sems-0.10.0_rc1#

We build ser and its modules:

cd /usr/local/src/ser-0.9.6-sems
make && make modules

Step 4: Installing SEMS and SER binaries

We will install SEMS and SER in /opt/sems-vm

cd /usr/local/src/sems-0.10.0_rc1
make -C core/ install DESTDIR=/opt/sems-vm
make -C apps/voicemail/ install DESTDIR=/opt/sems-vm

and

cd /usr/local/src/ser-0.9.6-sems
make install PREFIX=/opt/sems-vm

unlike later SEMS', rc1 does unfortunately not install the default module configuration and audio files. Therefore we install it by hand:

install -m 755 /usr/local/src/sems-0.10.0_rc1/apps/voicemail/etc/voicemail.conf /opt/sems-vm/etc/sems
install -m 755 /usr/local/src/sems-0.10.0_rc1/core/etc/stats.conf /opt/sems-vm/etc/sems
install -m 755 /usr/local/src/sems-0.10.0_rc1/apps/voicemail/wav/default_en.wav /opt/sems-vm/lib/sems/audio/
install -m 755 /usr/local/src/sems-0.10.0_rc1/apps/voicemail/wav/beep.wav /opt/sems-vm/lib/sems/audio/

Step 5: Adapting configuration for ser: ser-sems-vm.cfg

We will be using the configuration ser-sems-vm.cfg file attached to this tutorial.

First we will copy it to /opt/sems-vm/etc/ser/ser-sems-vm.cfg:

cd /opt/sems-vm/etc/
wget http://www.iptel.org/files/sems_vmserver_tutorialconfig.tgz
tar xzvf sems_vmserver_tutorialconfig.tgz
mv ser-sems-vm.cfg ser
mv voicemail.conf sems.conf sems

In the file ser-sems-vm.cfg we need to set listen=

listen=10.1.0.236

Step 6: Adapting configuration for SEMS

We will be using the sems.conf file attached to this tutorial. In this file the paths have been already correctly set.

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 /opt/sems-vm/etc/sems/voicemail.conf we need to set the path of the announcement which is played and the path to the email template:

#CFGOPTION_SEMS_ANNOUNCEPATH
announce_path=/opt/sems-vm/lib/sems/audio/
#ENDCFGOPTION
#CFGOPTION_SEMS_TEMPLATEDIR
email_template_path=/opt/sems-vm/etc/sems/
#ENDCFGOPTION

Editing the email template

The email template in /opt/sems-vm/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 7: Starting SER

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

Step 8: Testing (Starting SEMS in debug mode)

/opt/sems-vm/sbin/sems -f /opt/sems-vm/etc/sems/sems.conf -D 3 -E

And then we call voicemail.

Step 8: Starting SEMS

/opt/sems-vm/sbin/sems -f /opt/sems-vm/etc/sems/sems.conf

Step 9: Monitoring

AttachmentSize
sems_vmserver_tutorialconfig.tgz1.81 KB
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login