Dear Harald,
I decided to try the mncc-python tool. I managed to compile it, but when I actually trying
to connect to calls, I get this:
>>
>> connect_call("7839", "3802")
DEBUG:pykka:Registered
GsmCallFsm (urn:uuid:c61985e6-3ec8-47fd-a70f-02bb71af23f8)
DEBUG:pykka:Starting GsmCallFsm(15/None->None/NULL)
DEBUG:pykka:Registered GsmCallFsm (urn:uuid:7f8c6b86-6093-4826-8864-52baf0a5304a)
DEBUG:pykka:Starting GsmCallFsm(16/None->None/NULL)
DEBUG:pykka:Registered GsmCallConnector (urn:uuid:c020e5ae-56e5-4a8b-89af-a09587abc52f)
DEBUG:pykka:Starting GsmCallConnector (urn:uuid:c020e5ae-56e5-4a8b-89af-a09587abc52f)
<ActorProxy for GsmCallConnector (urn:uuid:c020e5ae-56e5-4a8b-89af-a09587abc52f),
attr_path=()>
GsmCallFsm(15/3802->7839/CALL_PRESENT): event: mncc_setup_req, NULL -> CALL_PRESENT
GsmCallFsm(16/7839->3802/CALL_PRESENT): event: mncc_setup_req, NULL ->
CALL_PRESENT>>>
MnccActor TxMNCC mncc_msg(type=0x0101, callref=15,
fields=0x0006)CallConnector:leg_state_change(7839) NULL -> CALL_PRESENT
CallConnector:leg_state_change(3802) NULL -> CALL_PRESENT MnccActor RxMNCC
mncc_msg(type=0x0111, callref=15, fields=0x0020), broadcasting to Call FSMsMnccActor
TxMNCC mncc_msg(type=0x0101, callref=16, fields=0x0006)
GsmCallFsm(15/3802->7839/CALL_PRESENT): on_receive(mncc, mncc_msg(type=0x0111,
callref=15, fields=0x0020))
GsmCallFsm(15/3802->7839/NULL): event: mncc_rel_ind, CALL_PRESENT -> NULL
DEBUG:pykka:Unregistered GsmCallFsm (urn:uuid:c61985e6-3ec8-47fd-a70f-02bb71af23f8)
DEBUG:pykka:Stopped GsmCallFsm(15/3802->7839/NULL)
CallConnector:leg_state_change(7839) CALL_PRESENT -> NULL
MnccActor RxMNCC mncc_msg(type=0x0111, callref=16, fields=0x0020), broadcasting to Call
FSMs
GsmCallFsm(16/7839->3802/CALL_PRESENT): on_receive(mncc, mncc_msg(type=0x0111,
callref=16, fields=0x0020))
GsmCallFsm(16/7839->3802/NULL): event: mncc_rel_ind, CALL_PRESENT -> NULL
DEBUG:pykka:Unregistered GsmCallFsm (urn:uuid:7f8c6b86-6093-4826-8864-52baf0a5304a)
CallConnector:leg_state_change(3802) CALL_PRESENT -> NULL
DEBUG:pykka:Stopped GsmCallFsm(16/7839->3802/NULL)
Both A and B in state NULL -> Terminating
DEBUG:pykka:Unregistered GsmCallConnector (urn:uuid:c020e5ae-56e5-4a8b-89af-a09587abc52f)
DEBUG:pykka:Stopped GsmCallConnector (urn:uuid:c020e5ae-56e5-4a8b-89af-a09587abc52f)
The MNCC socket is connected according to the BSC, but when I gave the command, nothing
happens on the BSC nor the BTS side.
Maybe I miss some more configuration steps. I have both half rate and full rate TCHs
enabled on the BTS, the first two TS is half rate. But again, nothing seems to happen on
the BSC nor the BTS log.
Can you please shed some light what can be the problem?
For the README can you please add these informations:
-------------------------------------
Dependencies for Ubuntu (14.04 LTS):
sudo apt-get install python-pykka python-pip
sudo pip install fysom
-------------------------------------
Regards,
Csaba
----- Eredeti üzenet -----
Feladó: "Harald Welte" <laforge(a)gnumonks.org>
Címzett: openbsc(a)lists.osmocom.org
Elküldött üzenetek: Szerda, 2015. December 2. 0:48:02
Tárgy: mncc-python tool for talking to MNCC interface
Hi all,
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.
The immediate first use case for this was to be able to automatically,
reproducibly and quickly 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. Other use cases
are expected to be added shortly.
The first working version of the tool is available from
http://git.osmocom.org/mncc-python/
or
git clone
git://git.osmocom.org/mncc-python
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/decodng of MNCC messages is auto-generated from the
mncc header file #defines, enums and c-structures by means of ctypes
code generation.
mncc_test.py 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. Exiting the shell by quit() or Ctrl+C will terminate
all call FSMs and terminate.
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)