summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-02-28 08:43:00 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2019-03-14 03:43:52 +0000
commit82fd04b13b3dde28aa6d329343bdb9f4284bfaa4 (patch)
tree324fed3e43046ae84ff29c8916e90c45deccce7b
parentb7aae8b957e70d6930efb7d988353b449ef21358 (diff)
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
-rw-r--r--library/BSSMAP_Templates.ttcn10
-rw-r--r--msc/BSC_ConnectionHandler.ttcn8
2 files changed, 14 insertions, 4 deletions
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 @@ template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_
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 @@ modifies tr_BSSAP_BSSMAP := {
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 @@ modifies ts_BSSAP_BSSMAP := {
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 @@ runs on BSC_ConnHdlr {
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 @@ runs on BSC_ConnHdlr {
/* 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));
}
}