Change in osmo-ttcn3-hacks[master]: BSC_ConnectionHandler: Define SDP template for CN-side CRCX

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Apr 21 15:45:51 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13727


Change subject: BSC_ConnectionHandler: Define SDP template for CN-side CRCX
......................................................................

BSC_ConnectionHandler: Define SDP template for CN-side CRCX

Change-Id: I90546249c41de8f99ce4a558e76cb46597413518
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 11 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/13727/1

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 @@
 					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 @@
 	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 @@
 	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 */

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90546249c41de8f99ce4a558e76cb46597413518
Gerrit-Change-Number: 13727
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190421/258a2a9f/attachment.html>


More information about the gerrit-log mailing list