How to set up a voicemail server with SEMS 0.10.0 rc2


This tutorial describes how to setup a voicemail server with SEMSi.

General

This document describes how to set up a voicemail server using SEMSi 0.10.0 rc2.
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 rc1, please have a look at the tutorial for rc1.

We will be using SERi 0.9.6-semsi as the SIP stack for SEMS. 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.

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.

seri.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: Installing SER for SEMS

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

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

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

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

Step 3: Installing SEMS

Then we get and install sems 0.10.0. rc2:

cd /usr/local/src
wget ftp.iptel.org/pub/sems/sems-0.10.0-rc2.tar.gz
tar xzvf sems-0.10.0-rc2.tar.gz; cd sems-0.10.0-rc2
make install

The one but last step is to install the ser configuration for sems:

cd /usr/local/src/sems-0.10.0-rc2
make install-ser-cfg

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.

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/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=/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

And then we call voicemail.

Step 7: Starting SEMS

/usr/local/sbin/sems

Step 8: Monitoring

tbd

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