summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-03-10 22:58:25 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-03-10 23:00:57 +0100
commite6b5b9041aaeba1d281de905e81e8ab738daefff (patch)
treeca54d0e1f3d58adfb184abdae6e954908217e93a
parent63c62ad75c1ead09212393464414c3891c527b48 (diff)
msc: f_mo_call_establish(): add lots of missing partsneels/wip
f_mo_call_establish() used to be satisfied with just two CRCX, but no actual RTP connections being made. Enrich with - MNCC RTP CONNECT - MNCC SETUP COMPL - MDCX for both sides (RAN and CN) Add RTP IP and port number checking for MNCC RTP CONNECT template. Move Assignment Complete message further up in the interleave, to better match the actual sequence. Add log markers to each step of f_mo_call_establish(): often when a test halts, it is not at all clear where. With this log markers it is saner to figure out what has happened and what hasn't. Change-Id: I162985045bb5e129977a3a797b656e30220990df
-rw-r--r--library/MNCC_Types.ttcn11
-rw-r--r--msc/BSC_ConnectionHandler.ttcn66
2 files changed, 60 insertions, 17 deletions
diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn
index a3714b1..f5028d2 100644
--- a/library/MNCC_Types.ttcn
+++ b/library/MNCC_Types.ttcn
@@ -1874,14 +1874,17 @@ template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) :=
template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);
/* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */
-template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?) := {
+template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?,
+ template uint32_t ip := ?,
+ template uint32_t rtp_port := ?,
+ template uint32_t payload_type := ?) := {
msg_type := MNCC_RTP_CREATE,
u := {
rtp := {
callref := call_id,
- ip := ?,
- rtp_port := ?,
- payload_type := ?,
+ ip := ip,
+ rtp_port := rtp_port,
+ payload_type := payload_type,
payload_msg_type := ?
}
}
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 898fdee..6a4d60a 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -604,6 +604,7 @@ runs on BSC_ConnHdlr {
}
interleave {
[] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc {
+ log("f_mo_call_establish 1: rx MNCC SETUP ind");
cpars.mncc_callref := mncc.u.signal.callref;
/* Call Proceeding */
MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap));
@@ -611,6 +612,7 @@ runs on BSC_ConnHdlr {
};
/* First MGCP CRCX (for BSS/RAN side) */
[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
+ log("f_mo_call_establish 2: rx 1st CRCX");
cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd);
/* When the endpoint contains a wildcard we keep the endpoint
@@ -638,8 +640,34 @@ runs on BSC_ConnHdlr {
var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
interleave {
+
+ /* expect AoIP IP/Port to match what we returned in CRCX_ACK above */
+ [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
+ log("f_mo_call_establish 3: rx Assignment Request");
+ 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));
+ codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}));
+ BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec));
+ }
+
+ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */
+ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd {
+ log("f_mo_call_establish 4: rx MDCX for the RAN side");
+ var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss,
+ hex2str(cpars.mgcp_call_id), "42",
+ cpars.mgw_rtp_port_mss,
+ { int2str(cpars.rtp_payload_type) },
+ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
+ cpars.rtp_sdp_format)),
+ valueof(ts_SDP_ptime(20)) }));
+ MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
+
+ }
+
/* Second MGCP CRCX (this time for MSS/CN side) */
[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
+ log("f_mo_call_establish 5: rx 2nd CRCX, for CN side");
var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss,
hex2str(cpars.mgcp_call_id), "42",
cpars.mgw_rtp_port_mss,
@@ -653,19 +681,31 @@ runs on BSC_ConnHdlr {
MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref));
}
+ /* MSC tells MNCC to set up RTP with IP and port from CN side CRCX */
+ [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref,
+ oct2int(f_inet_addr(cpars.mgw_rtp_ip_mss)),
+ cpars.mgw_rtp_port_mss)) -> value mncc {
+ log("f_mo_call_establish 6: rx MNCC RTP CREATE");
+ MNCC.send(ts_MNCC_SETUP_rsp(cpars.mncc_callref));
+ }
+
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) {
+ log("f_mo_call_establish 7: rx CC Alerting");
}
- /* 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));
- codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}));
- BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec));
+
+ [] MNCC.receive(tr_MNCC_SETUP_COMPL_ind(?)) -> value mncc {
+ log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind");
+ cpars.mncc_callref := mncc.u.signal.callref;
+ /* Call Proceeding */
+ MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref,
+ /* ip 42.23.11.5 */ hex2int('42231105'H),
+ /* port 423 */ 423,
+ /* payload type 3 = GSM FR */ 3));
}
- /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */
+ /* second MDCX setting up the CN side remote RTP address and codec received from MNCC RTP CONNECT */
[] MGCP.receive(tr_MDCX) -> value mgcp_cmd {
+ log("f_mo_call_establish 9: rx MDCX for CN side");
var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss,
hex2str(cpars.mgcp_call_id), "42",
cpars.mgw_rtp_port_mss,
@@ -675,12 +715,12 @@ runs on BSC_ConnHdlr {
valueof(ts_SDP_ptime(20)) }));
MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
}
- }
- /* Answer. MNCC_SETUP_RSP -> CONNECT to MS; CONNECT_ACK from MS */
- MNCC.send(ts_MNCC_SETUP_rsp(cpars.mncc_callref));
- BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id)));
- BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id)));
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) {
+ log("f_mo_call_establish 10: rx CC CONNECT");
+ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id)));
+ }
+ }
setverdict(pass);
}