SEMS application development tutorial


this tutorial explains how to write SEMSi applications, both in C++ and (using the IVRi) in Python. All examples are available with their complete sources.

The tutorial consists of the pdf document and the sources of the examples. In "semsi-tutorial-apps.tgz" all examples are contained, in "sems-tutorial-app-xxx" only one module. "ccard_wav.tgz" is an archive with sample announcements for the calling card application.

The SEMSi 0.10.0 release version and the SVN version already contain the tutorial examples in the path apps/examples/tutorial, together with sample configuration. The best is to simply use the SEMS 0.10.0 release bundle version which can be found at ftp://ftp.iptel.org/pub/sems/sems-0.10.0-bundle.tar.gz and go directly to making SEMS. .

We will download SERi and SEMS, add the applications from the howto and start SER and SEMS from their source directories. If you install SER/SEMS using make install you will have to adapt the paths in the configuration files.

We will place SER and SEMS source trees under /usr/local/src, make sure that you have the appropriate rights to create files there.

We will use two SER instances: one, at port 5060, will be the home proxy, and one, at port 5070, will be the SIP stack of SEMS. The SER/SEMS combination at port 5070 acts just like another UA.

Download and make SER 0.9.6

    
       cd /usr/local/src
cvs -d :pserver:anonymous@cvs.berlios.de:/cvsroot/seri co -r rel_0_9_0 -d ser-0.9.6 sip_router
cd ser-0.9.6 ; make ; make modules

Download SEMS

Either we use the tarball of 0.10.0 rc1
    
    cd /usr/local/src ; 
wget ftp://ftp.iptel.org/pub/sems/sems-0.10.0_rc1.tar.gz ;
tar xzvf sems-0.10.0_rc1.tar.gz ; mv sems-0.10.0_rc1 ; sems-0.10.0
or we checkout trunki SEMS from SVN:
    
cd /usr/local/src ;
svn checkout http://svn.berlios.de/svnroot/repos/sems/trunk ;
mv trunk sems-0.10.0
Checkout from svn has the advantage that the tutorial applications are already in place:
in apps/examples/tutorial, so we can skip the next step.

Download the tutorial's applications

    cd /usr/local/src/sems-0.10.0/apps ;
wget http://www.iptel.org/files/sems-tutorial-apps.tgz ;
tar xzvf sems-tutorial-apps.tgz ; rm sems-tutorial-apps.tgz

Make SEMS

    cd /usr/local/src/sems-0.10.0/ ; 
make
ignoring (for the moment) some error messages complaining about mp3/lame,python or flite.h not found.
If you are using the SVN version with the tutorial apps provided, make them with
make -C apps/examples/tutorial

Download the sample configuration files for the tutorial

A set of sample configuration files for SER and SEMS is available for this tutorial.

    cd /usr/local/src ; wget http://www.iptel.org/files/sems-tutorial-config.tgz; 
tar xzvf sems-tutorial-config.tgz

Download the sample wave file set for the cc application

    cd /usr/local/src/sems-tutorial-config ; wget
    http://www.iptel.org/files/ccard_wav.tgz; 
tar xzvf ccard_wav.tgz

Start SER home proxy

We will start one SER at port 5060, that will forward all calls that come to a number starting with 1 to "localhost:5070".

    cd /usr/local/src/ser-0.9.6 ; ./ser -f ../sems_tutorial_config/ser_main.cfg 

Start SER for SEMS

The second SER at port 5070, will forward all calls to SEMS.

    cd /usr/local/src/ser-0.9.6 ; ./ser -f ../sems_tutorial_config/ser_sems.cfg 
Start SEMS
    

cd /usr/local/src/sems-0.10.0/core ; ./sems -f ../../sems_tutorial_config/sems.conf

The SEMS configuration is set to no-fork and debug, such that we can follow all debug logging of SEMS.

Try out the applications

Now we can try out the applications by calling the numbers 101, 102, 103, ...

101 myapp
102 myconfigurableapp
103 myannounceapp
104 myjukebox
105 mycc
106 ivr_announce
110 echo
111 announcement
112 conference
113 mailbox
114 early_announce
115 voicemail

Notes:

  • default ivr script path is set to ivr_announce source dir, change this in ivr.conf if you want to try other python apps (mailbox, or your own scripts)
  • If the ivr doesnt want to build, you probably have to set the python path prefix,version and no TTS/flite path in apps/ivr/Makefile.defs (see doc/COMPILING)

Have Fun!

AttachmentSize
semsng-app_module_tutorial.pdf161 KB
sems-tutorial-apps.tgz6.96 KB
sems-tutorial-app-annc_service.tgz1.25 KB
sems-tutorial-app-cc_acc.tgz1.19 KB
sems-tutorial-app-ivr_announce.tgz606 bytes
sems-tutorial-app-myannounceapp.tgz1.21 KB
sems-tutorial-app-myapp.tgz787 bytes
sems-tutorial-app-mycc.tgz3.1 KB
sems-tutorial-app-myconfigurableapp.tgz1.14 KB
sems-tutorial-app-myjukebox.tgz1.35 KB
ccard_wav.tgz295.77 KB
sems-tutorial-config.tgz3.5 KB
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login