Python scripting interface to OsmoNITB/OsmoMSC MNCC interface
Go to file
Oliver Smith 25363b1891 add codec arg
Add codec parameter to start_call() and convenience functions mt_call()
and calls() with FR as default. While at it, update the help text.

Duplicate enum codec_type into, because the enum
values are different from the existing enum values in the python code
(GSM48_BCAP_SV_EFR etc.).

Related: SYS#4924
2020-04-29 16:02:09 +02:00
contrib contrib/manual_test_server: Make executable, add #! 2020-03-06 18:49:35 +01:00
rtpsource add codec arg 2020-04-29 16:02:09 +02:00
.gitignore update .gitignore with rtpsource object code file names 2020-04-29 13:24:41 +02:00
.gitreview Add git-review config 2019-03-12 17:06:24 +01:00
README recommend stock Debian/Ubuntu package for fysom 2018-08-09 12:01:51 +02:00 Program for MT call load testing with rtpsource 2020-03-07 21:48:08 +01:00 mncc_mt_loadgen: Don't call GsmCallFsm() with rtp_bridge=True 2020-03-07 21:48:08 +01:00
mncc.h mncc.h: Update to MNCC 6 as of libosmocore 1.3.0 / osmo-msc 1.6.1 2020-03-06 18:49:35 +01:00 update to mncc.h after MNCCv6 update 2020-03-06 18:49:35 +01:00
mncc.xml update to mncc.h after MNCCv6 update 2020-03-06 18:49:35 +01:00 add codec arg 2020-04-29 16:02:09 +02:00 MnccSocketServer: Don't unlink if the socket doesn't exist 2020-03-06 18:49:35 +01:00 mncc_test: add calls() to initiate series of calls 2020-03-07 21:48:08 +01:00 Fix script to work on Debian8 (jessie) 2020-03-06 18:49:35 +01:00 *.py: use generic logging framework instead of print() 2018-09-30 17:21:41 +07:00


python MNCC interface for OsmoNITB
(C) 2015 by Harald Welte

I've been working on a small python tool that can be used to attach to 
the MNCC interface of OsmoNITB.  It implements the 04.08 CC state 
machine with our MNCC primitives, including support for RTP bridge mode
of the voice streams.

= Requirements =

mncc-python needs python-pykka, and fysom.

On Debian or Ubuntu you can install them via
	sudo apt-get install python-pykka python-fysom

= Getting the code =

The first working version of the tool is available from
        git clone git://

The code is pretty hacky in some places.  That's partially due to the 
fact that I'm much more familiar in the C, Perl and Erlang world than in
python.  Still I thought it's a good idea to do it in python to enable 
more people to use/edit/contribute to it.

I'm happy for review / cleanup suggestion by people with more Python-foo 
than I have.

Architecturally, I decided to do things a bit erlang-like, where we have
finite state machines in an actor models, and message passing between 
the actors.  This is what happens with the GsmCallFsm()'s, which are 
created by the GsmCallConnector() representing both legs of a call and 
the MnccActor() that wraps the MNCC socket towards OsmoNITB.

The actual encoding/decoding of MNCC messages is auto-generated from the
mncc header file #defines, enums and c-structures by means of ctypes 
code generation.

The immediate first use case for this was to be able to generate MT 
calls to a set of known MSISDNs and load all 14 TCH/H channels of a
single-TRX BTS.  It will connect the MT calls in pairs, so you end up 
with 7 MS-to-MS calls. currently drops you into a python shell where you can e.g.
start more / new calls by calling functions like
        connect_call("7839", "3802")
from that shell.  Above example initiates MT calls to subscribers with
extension number 7839 and 3802.

Exiting the shell by quit() or Ctrl+C will terminate all call FSMs and