aboutsummaryrefslogtreecommitdiffstats
path: root/msc/BSC_ConnectionHandler.ttcn
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-03-14 16:37:48 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-14 21:08:20 +0000
commit4b2692d50bd24eccfb4973a0d968dbe16799e692 (patch)
treeb5b4c28f916d6c605c80ac3532b54fcfb7880df5 /msc/BSC_ConnectionHandler.ttcn
parent83348bcfbf91424e11baa3f8792ce4939bec63df (diff)
MSC_Tests: Support wildcarded endpoints
At the moment the testsuite is unable to detect when the call agent performs a CRCX request with a wildcarded endpoint. - Set a default endpoint name in cpars in case the MSC does a CRCX request with wildcarded endpoint name. - Detect if the MSC supplied a wildcarded endpoint name. Do not overwrite the default setting in cpars then. - Attach the endpoint name as Z: parameter in the response so that the MSC knows which endpoint to use. (Unconditional, does not harm on non wildcarded requests) Change-Id: I0efeae0f8a6e98deb843e79648f84a262f1d98f8 Related: OS#2710
Diffstat (limited to 'msc/BSC_ConnectionHandler.ttcn')
-rw-r--r--msc/BSC_ConnectionHandler.ttcn15
1 files changed, 12 insertions, 3 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 11891120..48da7931 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -444,8 +444,14 @@ runs on BSC_ConnHdlr {
/* First MGCP CRCX (for BSS/RAN side) */
MGCP.receive(tr_CRCX) -> value mgcp_cmd {
cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd);
- /* TODO: dynamic EP allocation case */
- cpars.mgcp_ep := mgcp_cmd.line.ep;
+
+ /* When the endpoint contains a wildcard we keep the endpoint
+ * identifier we have set up in cpars. Otherwise we use the
+ * endpoint name that the call agent has supplied */
+ if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) {
+ cpars.mgcp_ep := mgcp_cmd.line.ep;
+ }
+
var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss,
hex2str(cpars.mgcp_call_id), "42",
cpars.mgw_rtp_port_bss,
@@ -453,7 +459,10 @@ runs on BSC_ConnHdlr {
{ valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
cpars.rtp_sdp_format)),
valueof(ts_SDP_ptime(20)) }));
- MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp));
+ var template MgcpResponse mgcp_resp;
+ mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp);
+ f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep));
+ MGCP.send(mgcp_resp);
}
/* Second MGCP CRCX (this time for MSS/CN side) */
MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {