This page is user-contributed information, and not official documentation by the Osmocom project. It might be outdated or inaccurate.
Please help by improving this document, or reporting any issues to the relevant mailing list.

Simple Echo Test Setup for your OsmoCom CNI

Some people want to test the audio setup of their OsmoCom Network with just one phone, by calling a number that will echo back the audio stream.
Even though it is quite some overkill, It turns out that probably the simplest setup for such a thing is using SEMS, the SIP Express Media Server.

SEMS is not included with most Linux distributions, Alpine Linux being an exception ( but there are a number of projects that maintain binary repositories. Of course, you can build it yourself, there are a number of forks, all hosted publicly on infrastructure that this author prefers not to link to, so you will have to search it. Anyway, such things as URLs can quickly go out of date and I do not intend to maintain this page with links to current repositories of source or binary packages.

While writing this tutorial, I realise there are no suitable SEMS packages on any of the repos maintained by any of the projects that have SEMS integrated. Either the packages do not include workable config or there are far too many dependencies that you probably do not want to consider installing on your system, given that this document is about a "Simple" solution.

So, lets build it.


  • get the source code (search for it if the below no longer works)
git clone

Let's disable a bunch of stuff that we don't need to avoid dependencies and speed up compilation considerably.

apt install libevent-dev libgsm1-dev

cd sems
git checkout keith/simple

This is the diff on the keith/simple branch:

diff --git a/Makefile.defs b/Makefile.defs
index 5e103be4..ccbabe0d 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -82,8 +82,18 @@ USE_INTERNAL_RESAMPLER = yes
 # exclude some modules from compilation?
 # e.g. python modules:

-exclude_core_modules = g729 silk codec2
+exclude_core_modules = adpcm codec2 g722 g729 ilbc isac l16 \
+                       opus session_timer silk speex stats uac_auth wav
 #exclude_app_modules = py_sems ivr mailbox pin_collect conf_auth mp3 examples
+exclude_app_modules =  ann_b2b announcement announce_transfer annrecorder \
+                       callback click2dial conf_auth conference db_reg_agent \
+                       diameter_client dsm early_announce early_dbprompt \
+                       gateway ivr ivr-python2 jsonrpc mailbox \
+                       mobile_push monitoring mp3 msg_storage mwi \
+                       pin_collect precoded_announce py_sems reg_agent \
+                       registrar_client rtmp sbc twit voicebox voicemail \
+                       webconference xmlrpc2di examples

 # build in support for monitoring?

Now you can sudo make install or if you don't want to use sudo, you can give your user permission to write to /usr/local/ or just run from the source tree with the simplified configuration below:

SEMS Config File

This is about the simplest config file I can think of:

Save this as sems.conf


and run ./core/sems -f sems.conf

Configure osmo-msc and osmo-sip-connector

In osmo-msc, make sure you have the external MNCC socket enabled:

 mncc external /tmp/msc_mncc

This is sufficient osmo-sip-connector.cfg:

 socket-path /tmp/msc_mncc
 local 5050
 remote [ip_where_sems_is_running] 5060

Call any number from your Phone and have your audio echoed back.

SEMS doesn't care what the number is, It runs the echo app for all calls.
Of course there are all kinds of other apps in SEMS, file playback might be something else useful in the context of the HOWTO, It is left as an exercise to the reader to compile and configure that.

Updated by keith about 1 year ago · 7 revisions locked

Add picture from clipboard (Maximum size: 48.8 MB)