This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: 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 C
......................................................................
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
---
M gsm_call_fsm.py
M mncc_sock.py
2 files changed, 16 insertions(+), 3 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved; Verified
diff --git a/gsm_call_fsm.py b/gsm_call_fsm.py
index fa15940..167a805 100644
--- a/gsm_call_fsm.py
+++ b/gsm_call_fsm.py
@@ -14,7 +14,7 @@
import pykka
from fysom import Fysom
-from mncc_sock import mncc_msg, mncc_number, mncc_rtp_msg, mncc_bridge_msg
+from mncc_sock import mncc_msg, mncc_number, mncc_rtp_msg, mncc_bridge_msg, mncc_bearer_cap
Uint32Array2 = mncc.uint32_t * 2
@@ -82,9 +82,10 @@
def _onmncc_setup_req(self, e):
msg = mncc_msg(msg_type = mncc.MNCC_SETUP_REQ, callref = self.callref,
- fields = mncc.MNCC_F_CALLED | mncc.MNCC_F_CALLING,
+ fields = mncc.MNCC_F_CALLED | mncc.MNCC_F_CALLING | mncc.MNCC_F_BEARER_CAP,
calling = mncc_number(self.calling),
- called = mncc_number(self.called))
+ called = mncc_number(self.called),
+ bearer_cap = mncc_bearer_cap(self.codecs_permitted))
self.mncc_ref.tell({'type': 'send', 'msg': msg})
def find_matching_codec(self, ms_codecs):
diff --git a/mncc_sock.py b/mncc_sock.py
index 3d29691..3cc1ba1 100644
--- a/mncc_sock.py
+++ b/mncc_sock.py
@@ -52,6 +52,18 @@
plan = num_plan, present = num_present,
screen = num_screen)
+def mncc_bearer_cap(codecs_permitted):
+ speech_ver = ctypes.c_int * 8
+ speech_types = speech_ver()
+ index = 0
+
+ for codec in codecs_permitted:
+ speech_types[index] = codec
+ index = index + 1
+
+ speech_types[index] = -1
+ return mncc.gsm_mncc_bearer_cap(coding = 0, speech_ctm=0, radio = 1, speech_ver = speech_types, transfer = 0, mode = 0)
+
class MnccSocketBase(object):
def send(self, msg):
return self.sock.sendall(msg.send())
--
To view, visit https://gerrit.osmocom.org/2841
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If77851b86111d62d82221a886ed2391179080cca
Gerrit-PatchSet: 1
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Owner: Gerard <gerardfly9 at gmail.com>
Gerrit-Reviewer: Gerard <gerardfly9 at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>