Commit Graph

72 Commits (45ff1d2e62538dea14c7190617f561dd1f93654a)

Author SHA1 Message Date
Pau Espin 45ff1d2e62 main: generate coredump and exit upon SIGABRT received
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-11-25 17:52:19 +01:00
Pau Espin b73faa4749 Update to MNCC v7 (Support IPv6 addresses)
Change-Id: Iab17f09380d7cd914cf85746b794c6c04ec7de43
2020-09-09 20:11:28 +02:00
Pau Espin 0265d6e642 Document how to obtain required bins from source
Change-Id: Ifc54ea883dd9f11bf6497e81eaa00bb6ddf50807
2020-09-09 20:11:27 +02:00
Oliver Smith aaf4e884ec 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.

Related: SYS#4924
Change-Id: I5879b8b9ccc63908b9f6629487e66eff1e4a1ab4
2020-04-30 10:05:44 +02:00
Oliver Smith 2d24cd48c9 rtpsource: CTRL call rtp_create: add codec arg
Instead of hardcoding FR in rtpsource, add an argument to set the codec
from via CTRL call rtp_create. Hardcode FR in for now, a follow up patch will make it configurable
there, too.

Related: SYS#4924
Change-Id: If75e902b451d7e202a03e93afcd55bd24f517813
2020-04-30 10:05:39 +02:00
Harald Welte fb046ebc9e rtpsource: Modularize generation of RTP frames
Change-Id: Iad98e1753fef1927c0e8a7493372141372a38224
2020-04-30 10:00:49 +02:00
Harald Welte c67e0a7f66 update .gitignore with rtpsource object code file names
Change-Id: I085d50bb60e4eebda5d92c6e5fbc5a1d56c0badb
2020-04-30 07:01:06 +00:00
Harald Welte 2497dfabb0 GsmCallFsm: permit MNCC_REL_CNF in any state
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-04-29 16:26:59 +00:00
Harald Welte 94791c8d56 rtpsource: Make local RTP bind IP configurble via "-r" cmdline opt
Change-Id: Ia742180326f3d945eb7933cebbef3fd17d127d51
2020-03-11 15:12:10 +00:00
Harald Welte 6ecdaf6c01 mncc_mt_loadgen: Don't call GsmCallFsm() with rtp_bridge=True
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

Change-Id: I8816ccb8c7dce2958496c81a95f1a91bc33e772b
2020-03-07 21:48:08 +01:00
Neels Hofmeyr 5e6d9d3594 mncc_test: add calls() to initiate series of calls
Change-Id: I0cec9e5dc52e62247da8a3bec47917f929bde5be
2020-03-07 21:48:08 +01:00
Neels Hofmeyr a765716b8c mncc_{test,mg_loadgen}.py: Add a manual call-release function
Change-Id: I30265b765f03bd0485bdaa7d6be6d95ad678b0ee
2020-03-07 21:48:08 +01:00
Oliver Smith cf8e58e5fb mncc_{test,mt_loedgen}.py: don't start calls automatically
Change-Id: I3173b94f5a5b8baea4a111193a7894b673272a24
2020-03-07 21:48:08 +01:00
Harald Welte 41af37de9f Program for MT call load testing with rtpsource
This program (derived from 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-07 21:48:08 +01:00
Harald Welte 09462c3b04 initial checkin of 'osmo-rtpsource' program
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-07 21:48:08 +01:00
Harald Welte c4e12b35c0 update to mncc.h after MNCCv6 update
Change-Id: I9f112a0f76b9cd00d58dc2d5751b031ee056e194
2020-03-06 18:49:35 +01:00
Harald Welte 2cc64ac40a mncc.h: Update to MNCC 6 as of libosmocore 1.3.0 / osmo-msc 1.6.1
Change-Id: Ic893922b3e4b272f2899d793df3219b6ef9b749f
2020-03-06 18:49:35 +01:00
Harald Welte 7b33e5f6e2 Fix script to work on Debian8 (jessie)
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-06 18:49:35 +01:00
Harald Welte 637cf54c8c MnccSocketServer: Don't unlink if the socket doesn't exist
Change-Id: I5164502f2d20d5e82e916918ad8556c2b5f7a3d1
2020-03-06 18:49:35 +01:00
Harald Welte 57c1213aab contrib/manual_test_server: Make executable, add #!
Change-Id: I77ce1c5e9223006ec47f71df12b9a970db5276e2
2020-03-06 18:49:35 +01:00
Max b93472b534 Add git-review config
Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
2019-03-12 17:06:24 +01:00
Vadim Yanitskiy af9a227a89 *.py: use generic logging framework instead of print()
Change-Id: I025ddae64e41319abac8e2cd2e266db83aea4a7b
2018-09-30 17:21:41 +07:00
Vadim Yanitskiy 8b5c864f28 drop redundant print() calls
Change-Id: Id9c8fa9e65837822002b68d10af9c2eacb818aac
2018-09-30 17:21:41 +07:00
Vadim Yanitskiy a275d7a49d *.py: cosmetic: tweak the global logging format
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-30 17:21:41 +07:00
Vadim Yanitskiy 1e3f0aaf6b throw / raise exceptions from MnccSocket
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-30 15:23:12 +07:00
Vadim Yanitskiy c43f321e6e distinguish traffic frames
Change-Id: I996513e433bb57f12a4030391697f4e87e6ff938
2018-09-29 22:33:20 +07:00
Vadim Yanitskiy 8a8b422dcf simplify msg_type matching
Change-Id: I0d7d988e7d1bcfd9cf5cd319fd9da0f4f65a8e5d
2018-09-29 22:23:01 +07:00
Vadim Yanitskiy 61a1ecc988 share common send() / receive() calls
Change-Id: I871c72c8e3392a1be76e0126a24b3bc9a787113d
2018-09-29 21:55:18 +07:00
Vadim Yanitskiy ada97f1c5a parse and match MNCC_SOCKET_HELLO message
Change-Id: If6c3ca37a83db1d4ae75796f7be687601b159136
2018-09-29 21:55:18 +07:00
Vadim Yanitskiy 022be433ad *.py: use proper '#!/usr/bin/env' shebang
Using hard-coded paths in shebang is a bad idea, because on different
systems Python interpreter can be installed in different places. See:

Change-Id: Ib729ece0c95254dc2b235f90eb731681df955bd1
2018-09-29 21:55:16 +07:00
Stefan Sperling 354904a0a6 recommend stock Debian/Ubuntu package for fysom
fysom is now available as a regular Debian/Ubuntu package
so there is no need anymore to install it via pip:

Change-Id: I59e3b93c1d3f849f14dcb2344f6f033312331884
2018-08-09 12:01:51 +02:00
Gerard Pinto 983231a70d Bearer capability not provided during MO call using mncc-python, which 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 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-06-04 21:04:56 -07:00
Holger Hans Peter Freyther ce184f83f0 test: Add a manual test to simulate DTMF handling in osmo-sip-connector
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

Change-Id: I7f62efbc62455e6fcb1f091afb5fa120099834f0
2017-04-29 14:49:36 +02:00
Holger Hans Peter Freyther 03980b4e31 mncc: Make it possible to build a MNCC server for testing
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-04-29 14:12:31 +02:00
Holger Hans Peter Freyther 08207d9e6f Fix typo and say connecting
We don't have a connection yet, so let's say this meant connecting.

Change-Id: Iba0423add3ae4d6920fed74800b0c2b298dda501
2017-03-05 17:42:01 +01:00
Harald Welte 19f678d259 some README clarifications, including required python modules 2015-12-12 23:04:34 +01:00
Harald Welte 031b9c9006 add smpp_test to generate SMS load via SMPP interface
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-05 22:41:57 +01:00
Harald Welte fcc3baaa2d gsm_call_fsm: Less debug printf's 2015-12-05 16:13:05 +01:00
Harald Welte 1b26694bca Terminate CallConnector when both GsmCallFsm enter NULL state again 2015-12-05 16:12:26 +01:00
Harald Welte e5d8b99fe7 GsmCallFsm: Print current state in __str__ 2015-12-05 14:04:33 +01:00
Harald Welte 5010316fd2 GsmCallFsm: Initialize calling/called during constructor 2015-12-05 13:57:51 +01:00
Harald Welte 6ae54d430d GsmCallFsm: Handle DTMF and HOLD requests from phones
we don't want the FSM to terminate in case such requests are received.
2015-12-05 13:51:43 +01:00
Harald Welte 8a6dce0026 GsmCallFsm: Implement __str__() and use it 2015-12-05 13:51:43 +01:00
Harald Welte 5b283e8942 gcm_call_fsm: Allow user to specify which codec(s) are to be used
The user can submit a list of permitted codecs for a GsmCallFsm or
GsmCallConnector.  This list is ordered by priority (highest first),
and the first matching codec is chosen.

TODO: Proper error handling in case no matching codec is found
2015-12-05 13:51:43 +01:00
Harald Welte a5fce60121 gsm_call_fsm: Implement classic MNCC_BRIDGE mode
In the classic MNCC_BRIDGE mode we ask the MSC to bridge the two
traffic channels itself.  This works for E1 as well as for RTP
BTSs', and even accross mixed E1 and RTP environments.
2015-12-05 13:51:43 +01:00
Harald Welte 8ebb6355ef mncc.{h,py}: Add a gsm_mncc_bridge struct
this struct doesn't yet exist in upstream, but it should.
2015-12-05 13:51:37 +01:00
Harald Welte 474d83e21a gsm_call_fsm: Add get_callref method to GsmCallFsm
... and obtain the call references into the GsmCallConnector
2015-12-03 13:54:40 +01:00
Harald Welte 79b7947191 typo fix 2015-12-02 00:51:11 +01:00
Harald Welte e47c3eee45 add README 2015-12-02 00:46:46 +01:00
Harald Welte 47ff791075 add license headers 2015-12-02 00:23:09 +01:00