Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13186 )

Change subject: msc: add codec to all Assignment Complete messages
......................................................................

msc: add codec to all Assignment Complete messages

So far we omit a Speech Codec (Chosen) from Assignment Complete messages, which
is actually a mandatory parameter. osmo-msc seems to carry on nevertheless, but
it actually shouldn't be able to.

Always send a Speech Codec (Chosen).

Change-Id: Ib35f019383db8ace05a9dc349648e2da7ba58bfa
---
M library/BSSMAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
2 files changed, 14 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index b538095..4df39d4 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -462,6 +462,11 @@
        lengthIndicator := 0, /* overwritten */
        codecElements := valueof(elem)
 }
+template BSSMAP_IE_SpeechCodec ts_BSSMAP_IE_SpeechCodec(template 
BSSMAP_FIELD_CodecElements elem) := {
+       elementIdentifier := '7E'O,
+       lengthIndicator := 0, /* overwritten */
+       codecElements := valueof(elem)
+}

 template PDU_BSSAP
 ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
@@ -534,7 +539,8 @@

 template PDU_BSSAP
 ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := 
omit,
-                            template BSSMAP_IE_AoIP_TransportLayerAddress aoip 
:= omit)
+                            template BSSMAP_IE_AoIP_TransportLayerAddress aoip 
:= omit,
+                            template BSSMAP_IE_SpeechCodec speechCodec := omit)
 modifies ts_BSSAP_BSSMAP := {
        pdu := {
                bssmap := {
@@ -550,7 +556,7 @@
                                lSAIdentifier := omit,
                                talkerPriority := omit,
                                aoIPTransportLayer := aoip,
-                               speechCodec := omit,
+                               speechCodec := speechCodec,
                                codecList := omit,
                                lCLS_BSS_Status := omit
                        }
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 2cd666f..e6cf2b0 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -532,8 +532,10 @@
                
valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
        BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
                var BSSMAP_IE_AoIP_TransportLayerAddress tla;
+               var BSSMAP_IE_SpeechCodec codec;
                tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), 
cpars.bss_rtp_port));
-               BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla));
+               codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}));
+               BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec));
                }

        /* MS -> MSC: ALERTING */
@@ -633,8 +635,10 @@
        /* expect AoIP IP/Port to match what we returned in CRCX_ACK above */
        [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
                var BSSMAP_IE_AoIP_TransportLayerAddress tla;
+               var BSSMAP_IE_SpeechCodec codec;
                tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), 
cpars.bss_rtp_port));
-               BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla));
+               codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}));
+               BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec));
                }
        }


--
To view, visit https://gerrit.osmocom.org/13186
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib35f019383db8ace05a9dc349648e2da7ba58bfa
Gerrit-Change-Number: 13186
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to