aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
10 daysAdjust mncc_sock.py to MNCC v7 introducing sockaddr_storageHEADmasterHarald Welte3-1/+34
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
10 daysUpdate MNCC with LLC+HLC supportHarald Welte2-20/+69
... as introduced in osmo-msc Change-Id I15f5afcf069ee6c1c4641108ceacc837bee311b5 Change-Id: Ic318656b778ed1ce115d8e60b0dce4ef75ed0a2c
10 daysupdate to MNCC V8 supportHarald Welte2-18/+25
This updates the mncc.h to V8 with GCR support, as introduced in Change-ID I705c860e51637b4537cad65a330ecbaaca96dd5b of osmo-msc Change-Id: Ia27956e42c6c2f494d59b89f42345462c86b10d2
10 daysport over ctypeslib2Harald Welte5-1708/+601
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
10 daysInitial port from python2 to python3Harald Welte5-47/+49
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
2023-01-17rtpsourcec: Fix compilation on Debian 11 / gcc-10.2.1Harald Welte1-2/+3
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
2023-01-04MNCC data size check: allow trailing dataOliver Smith1-1/+1
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
2020-11-25main: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-2/+10
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
2020-09-09Update to MNCC v7 (Support IPv6 addresses)Pau Espin Pedrol3-1279/+4134
Change-Id: Iab17f09380d7cd914cf85746b794c6c04ec7de43
2020-09-09regen-mncc-py.sh: Document how to obtain required bins from sourcePau Espin Pedrol1-1/+23
Change-Id: Ifc54ea883dd9f11bf6497e81eaa00bb6ddf50807
2020-04-30mncc_mt_loadgen.py: add codec argOliver Smith1-7/+10
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
2020-04-30rtpsource: CTRL call rtp_create: add codec argOliver Smith6-11/+60
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
2020-04-30rtpsource: Modularize generation of RTP framesHarald Welte6-7/+230
Change-Id: Iad98e1753fef1927c0e8a7493372141372a38224
2020-04-30update .gitignore with rtpsource object code file namesHarald Welte1-0/+3
Change-Id: I085d50bb60e4eebda5d92c6e5fbc5a1d56c0badb
2020-04-29GsmCallFsm: permit MNCC_REL_CNF in any stateHarald Welte1-1/+1
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
2020-03-11rtpsource: Make local RTP bind IP configurble via "-r" cmdline optHarald Welte2-1/+28
Change-Id: Ia742180326f3d945eb7933cebbef3fd17d127d51
2020-03-07mncc_mt_loadgen: Don't call GsmCallFsm() with rtp_bridge=TrueHarald Welte2-5/+1
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
2020-03-07mncc_test: add calls() to initiate series of callsNeels Hofmeyr2-0/+25
Change-Id: I0cec9e5dc52e62247da8a3bec47917f929bde5be
2020-03-07mncc_{test,mg_loadgen}.py: Add a manual call-release functionNeels Hofmeyr3-1/+15
Change-Id: I30265b765f03bd0485bdaa7d6be6d95ad678b0ee
2020-03-07mncc_{test,mt_loedgen}.py: don't start calls automaticallyOliver Smith2-10/+12
Change-Id: I3173b94f5a5b8baea4a111193a7894b673272a24
2020-03-07mncc_mt_loadgen.py: Program for MT call load testing with rtpsourceHarald Welte2-0/+258
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
2020-03-07initial checkin of 'osmo-rtpsource' programHarald Welte4-0/+440
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
2020-03-06update mncc.py to mncc.h after MNCCv6 updateHarald Welte2-859/+946
Change-Id: I9f112a0f76b9cd00d58dc2d5751b031ee056e194
2020-03-06mncc.h: Update to MNCC 6 as of libosmocore 1.3.0 / osmo-msc 1.6.1Harald Welte1-1/+45
Change-Id: Ic893922b3e4b272f2899d793df3219b6ef9b749f
2020-03-06Fix regen-mncc-py.sh script to work on Debian8 (jessie)Harald Welte1-3/+14
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
2020-03-06MnccSocketServer: Don't unlink if the socket doesn't existHarald Welte1-1/+2
Change-Id: I5164502f2d20d5e82e916918ad8556c2b5f7a3d1
2020-03-06contrib/manual_test_server: Make executable, add #!Harald Welte1-0/+2
Change-Id: I77ce1c5e9223006ec47f71df12b9a970db5276e2
2019-03-12Add git-review configMax1-0/+3
Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
2018-09-30*.py: use generic logging framework instead of print()Vadim Yanitskiy5-24/+28
Change-Id: I025ddae64e41319abac8e2cd2e266db83aea4a7b
2018-09-30manual_test_server.py: drop redundant print() callsVadim Yanitskiy1-2/+0
Change-Id: Id9c8fa9e65837822002b68d10af9c2eacb818aac
2018-09-30*.py: cosmetic: tweak the global logging formatVadim Yanitskiy3-2/+9
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
2018-09-30mncc_sock.py: throw / raise exceptions from MnccSocketVadim Yanitskiy1-12/+4
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
2018-09-29mncc_sock.py: distinguish traffic framesVadim Yanitskiy2-0/+33
Change-Id: I996513e433bb57f12a4030391697f4e87e6ff938
2018-09-29mncc_sock.py: simplify msg_type matchingVadim Yanitskiy1-1/+6
Change-Id: I0d7d988e7d1bcfd9cf5cd319fd9da0f4f65a8e5d
2018-09-29mncc_sock.py: share common send() / receive() callsVadim Yanitskiy1-19/+6
Change-Id: I871c72c8e3392a1be76e0126a24b3bc9a787113d
2018-09-29mncc_sock.py: parse and match MNCC_SOCKET_HELLO messageVadim Yanitskiy1-1/+44
Change-Id: If6c3ca37a83db1d4ae75796f7be687601b159136
2018-09-29*.py: use proper '#!/usr/bin/env' shebangVadim Yanitskiy4-4/+5
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
2018-08-09recommend stock Debian/Ubuntu package for fysomStefan Sperling1-3/+1
fysom is now available as a regular Debian/Ubuntu package so there is no need anymore to install it via pip: https://packages.debian.org/stretch/python-fysom https://packages.ubuntu.com/bionic/python-fysom Change-Id: I59e3b93c1d3f849f14dcb2344f6f033312331884
2017-06-04Bearer capability not provided during MO call using mncc-python, which ↵Gerard Pinto2-3/+16
results in GSM IE error (96) invalid mandatory information sent by Network -> MS (mncc-python) 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
2017-04-29test: Add a manual test to simulate DTMF handling in osmo-sip-connectorHolger Hans Peter Freyther1-0/+126
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
2017-04-29mncc: Make it possible to build a MNCC server for testingHolger Hans Peter Freyther1-13/+32
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
2017-03-05mncc_sock.py: Fix typo and say connectingHolger Hans Peter Freyther1-1/+1
We don't have a connection yet, so let's say this meant connecting. Change-Id: Iba0423add3ae4d6920fed74800b0c2b298dda501
2015-12-12some README clarifications, including required python modulesHarald Welte1-2/+20
2015-12-05add smpp_test to generate SMS load via SMPP interfaceHarald Welte1-0/+52
It's not really related to MNCC, but in lack of a better suitable repository, I'll commit it here for the time being.
2015-12-05gsm_call_fsm: Less debug printf'sHarald Welte1-7/+0
2015-12-05Terminate CallConnector when both GsmCallFsm enter NULL state againHarald Welte1-0/+3
2015-12-05GsmCallFsm: Print current state in __str__Harald Welte1-1/+1
2015-12-05GsmCallFsm: Initialize calling/called during constructorHarald Welte1-0/+1
2015-12-05GsmCallFsm: Handle DTMF and HOLD requests from phonesHarald Welte1-0/+22
we don't want the FSM to terminate in case such requests are received.
2015-12-05GsmCallFsm: Implement __str__() and use itHarald Welte1-5/+8