Commit Graph

17 Commits

Author SHA1 Message Date
Harald Welte 637cf54c8c MnccSocketServer: Don't unlink if the socket doesn't exist
Change-Id: I5164502f2d20d5e82e916918ad8556c2b5f7a3d1
2020-03-06 18:49:35 +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 1e3f0aaf6b mncc_sock.py: 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 mncc_sock.py: distinguish traffic frames
Change-Id: I996513e433bb57f12a4030391697f4e87e6ff938
2018-09-29 22:33:20 +07:00
Vadim Yanitskiy 8a8b422dcf mncc_sock.py: simplify msg_type matching
Change-Id: I0d7d988e7d1bcfd9cf5cd319fd9da0f4f65a8e5d
2018-09-29 22:23:01 +07:00
Vadim Yanitskiy 61a1ecc988 mncc_sock.py: share common send() / receive() calls
Change-Id: I871c72c8e3392a1be76e0126a24b3bc9a787113d
2018-09-29 21:55:18 +07:00
Vadim Yanitskiy ada97f1c5a mncc_sock.py: 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:

https://mail.python.org/pipermail/tutor/2007-June/054816.html

Change-Id: Ib729ece0c95254dc2b235f90eb731681df955bd1
2018-09-29 21:55:16 +07: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 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-06-04 21:04:56 -07: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 mncc_sock.py: 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 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 47ff791075 add license headers 2015-12-02 00:23:09 +01:00
Harald Welte 20523c7fd2 add mncc_rtp_msg() class for RTP messages on MNCC interface 2015-12-01 23:04:20 +01:00
Harald Welte 3703441150 mncc_msg(): Add more meaningful string representation 2015-12-01 22:19:56 +01:00
Harald Welte 56c63fe7f2 logging cleanup 2015-12-01 20:32:12 +01:00
Harald Welte 3d66bfbeee initial checkin of experiments with python and the MNCC interface 2015-12-01 19:07:30 +01:00