summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-21 17:08:40 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-21 17:44:59 +0200
commit408a7ef9fcaec731fd107688ad5657a9a63d53fd (patch)
tree7e9f27e4a3ffc87805984405631bae3977dae918
parentddf011ec4fa02261248255bf09edd3d8fe27bef7 (diff)
BSC_ConnectionHandler: Define SDP template for CN-side CRCX
-rw-r--r--msc/BSC_ConnectionHandler.ttcn25
1 files changed, 11 insertions, 14 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 8e5c5f2..0b2344f 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -469,6 +469,15 @@ runs on BSC_ConnHdlr {
hex2str(cpars.called_party), hex2str(g_pars.imsi)));
}
+private template (value) SDP_Message ts_SDP_CRCX_CN(CallParameters cpars) :=
+ 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)) });
+
/* Complete call, begin with a paging response message via BSSAP */
function f_mt_call_complete(inout CallParameters cpars)
runs on BSC_ConnHdlr {
@@ -521,13 +530,7 @@ runs on BSC_ConnHdlr {
interleave {
/* Second MGCP CRCX (this time for MSS/CN side) */
[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
- 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)) }));
+ var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars));
MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
/* MSC acknowledges the MNCC_CREATE to the MNCC handler */
MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref));
@@ -626,13 +629,7 @@ runs on BSC_ConnHdlr {
interleave {
/* Second MGCP CRCX (this time for MSS/CN side) */
[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
- 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)) }));
+ var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars));
MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
/* Alerting */