It seems that 4 years ago in 2020 we merged Change-Id
Iab17f09380d7cd914cf85746b794c6c04ec7de43 to add MNCCv7 support, but
never actually tested mncc_sock.py ever since, as it still tries to
unconditionally access the 'ip' and 'port' members of the message,
which no longer exist due to the introduction of sockaddr_storage.
Working with sockaddr_storage is a bit nasty as it contains
double-underscores in the __ss_padding member, which means ctypes/python
will make it a private member that we cannot access. Work around this
with a small sed-script that removes the underscores from the
clang2py-generated python source code.
Change-Id: I3aa267a866ffaa54e7d71c19231adc78d3831169
This updates the mncc.h to V8 with GCR support, as introduced
in Change-ID I705c860e51637b4537cad65a330ecbaaca96dd5b of osmo-msc
Change-Id: Ia27956e42c6c2f494d59b89f42345462c86b10d2
After many years without ctypeslib maintenance, there's finally a
ctypeslib2 for python3.x
Instead of the crude gcc2xml hack it uses libclang to generate python
directly from the C.
Change-Id: I9efd56623ebeabef4317356a05484a620a3a91cc
This is a very crude port, including manual edits to the ctypeslib-generated
mncc.py file. There's no real clean way to do this, as ctypeslib is
ancient, abandoned and unmaintained.
Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
rtpsource.c: In function ‘signal_handler’:
rtpsource.c:209:3: error: called object ‘signal’ is not a function or function pointer
209 | signal(SIGABRT, SIG_DFL);
| ^~~~~~
rtpsource.c:198:32: note: declared here
198 | static void signal_handler(int signal)
| ~~~~^~~~~~
Change-Id: I57d13faa8052b6f15890ce9c6c74efa927d2e2ab
Verify is the parsed data is at least the size of the struct, not
exactly the size. Make it accept messages with additional data, like
the SDP information the TTCN-3 testsuite is sending since
Ic9568c8927507e161aadfad1a4d20aa896d8ae30.
This change makes the size checks consistent with the other size
checks in MNCC implementations such as osmo-sip-connector
Related: OS#4282
Related: osmo-sip-connector I522ce7f206932a816a64f03d916799c3215bb8c7
Change-Id: Ic8c24e6988ae2d3c4278c4adccae46e248c893b8
Previous code relied on abort() switching sigaction to SIG_FDL +
retriggering SIGABRT in case the signal handler returns, which would
then generate the coredump + terminate the process.
However, if a SIGABRT is received from somewhere else (kill -SIGABRT),
then the process would print the talloc report and continue running,
which is not desired.
Fixes: OS#4865
Change-Id: I3caa78e6ce7c9a98b0a26fde61468bd7b38c6fd9
Add codec parameter to start_call() and convenience functions mt_call()
and calls() with FR as default. While at it, update the help text.
Related: SYS#4924
Change-Id: I5879b8b9ccc63908b9f6629487e66eff1e4a1ab4
Instead of hardcoding FR in rtpsource, add an argument to set the codec
from mncc_mt_loadgen.py via CTRL call rtp_create. Hardcode FR in
mncc_mt_loadgen.py for now, a follow up patch will make it configurable
there, too.
Related: SYS#4924
Change-Id: If75e902b451d7e202a03e93afcd55bd24f517813
Depending on the type of failure in the MSC, MGW or BSC, we may expect
MNCC_REL_CNF in any state.
Closes: SYS#4832
Change-Id: I0d65da82fbcc48c8967a65b917ea14121bd941f3
rtp_bridge=True triggers the automatic transmission of a MNCC_RTP_CREATE
when that call goes into ACTIVE state. We don't want this in the
case of mncc_mt_loadgen, as we perform this at a much sooner point in
time.
Change-Id: I8816ccb8c7dce2958496c81a95f1a91bc33e772b
This program (derived from mncc_test.py) is used to start MT calls
via the MNCC interface of OsmoMSC. Every calls RTP is connected
to the new 'rtpsource' process, which generates a realistic RTP
flow in terms of number of packets (20ms interval) and payload size.
Change-Id: I9e5d799aaeeff5188dc97061f0d6e1873d9bf653
osmo-rtpsource is a small utility program which is generating
RTP flows at a constant rate of 20ms, as required in most IP based
telphony. The payload currently is hard-coded.
Change-Id: Id4e292ddfd5aa58754382b2380558993b2ddf07a
As python-ctypeslib is long unmaintained, it is not packaged
for anything more recent than Debian 8 (jessie). Let's print
that at start and check for availability of the reqquired
executable programs (part of python-ctypeslib).
Change-Id: Ied6333016e2eb357bda08499742f1ed8c56ba762
Printing log level, file name, and line number together with a
log message is the common practice in Osmocom projects that
facilitates debugging and development.
Change-Id: I80cd7cdfa41ae7e70a1890d88c8b2f7357a500af
Calling sys.exit() from MnccSocket's constructor could lead to
a situation when the main thread becomes "dead", while its child
threads are still working. Let's throw the exceptions towards
the caller, so it would be possible to handle them there.
Change-Id: I485eb86c69e74693eeae89723de27e376585f1da
Using hard-coded paths in shebang is a bad idea, because on different
systems Python interpreter can be installed in different places. See:
https://mail.python.org/pipermail/tutor/2007-June/054816.html
Change-Id: Ib729ece0c95254dc2b235f90eb731681df955bd1
Verified this error by GSMTAP using mncc-python interface OsmocomBB to network
Proposed Changes:
In case of MO call (_onmncc_setup_req) caller needs to provide bearer_cap speech version
Added mncc.bearer_cap in mncc_sock.py based on codecs = GSM48.AllCodecs
Added new field mncc.MNCC_F_BEARER_CAP in mncc.MNCC_SETUP_REQ, when call is initiated (MO) from MS -> network
Change-Id: If77851b86111d62d82221a886ed2391179080cca
Add a manul test to the contrib folder that helped and can help during
the development of osmo-sip-connector or similar software. This avoids
having to create a separate mncc module.
It can be started like:
$ PYTHONPATH=$PWD/../ python manual_test_server.py
Change-Id: I7f62efbc62455e6fcb1f091afb5fa120099834f0
For manual testing the osmo-sip-connector it is nice to run a custom
MNCC server to mock certain behavior. Refactor the socket class to
share code between client/server.
Change-Id: I8387fe1687557c6a1a26ff1e0cc9dbff3087aa82