dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32177 )
( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: MGCP_Test: add fmtp to template t_RtpFlow ...................................................................... MGCP_Test: add fmtp to template t_RtpFlow When creating a flow with fmtp parameters we must always add them in a second step. Lets update t_RtpFlow, so that it supports fmtp as an optional parameter. Change-Id: I04b17c0d233c1db4b9ba1306a4e0555914519bf8 --- M mgw/MGCP_Test.ttcn 1 file changed, 22 insertions(+), 13 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index c9e355b..f1936ce 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1397,13 +1397,12 @@ }; /* from us to MGW */ - flow[0] := valueof(t_RtpFlow(local_ip_rtp, remote_ip_rtp, 112, "AMR/8000")); + flow[0] := valueof(t_RtpFlow(local_ip_rtp, remote_ip_rtp, 112, "AMR/8000", fmtp)); flow[0].rtp_cfg := c_RtpemDefaultCfg flow[0].rtp_cfg.rx_payloads[0].payload_type := flow[0].codec_descr[0].pt; flow[0].rtp_cfg.rx_payloads[0].fixed_payload := amr_payload; flow[0].rtp_cfg.tx_payloads[0].payload_type := flow[0].codec_descr[0].pt; flow[0].rtp_cfg.tx_payloads[0].fixed_payload := amr_payload; - flow[0].codec_descr[0].fmtp := fmtp; /* bind local RTP emulation sockets */ flow[0].em.portnr := 10000; f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]); @@ -1796,8 +1795,8 @@ setverdict(pass); } - template (value) RtpFlowData t_RtpFlow(charstring host_a, charstring host_b, uint7_t pt, - charstring codec) := { + template RtpFlowData t_RtpFlow(charstring host_a, charstring host_b, uint7_t pt, + charstring codec, template charstring fmtp := omit) := { em := { hostname := host_a, portnr := omit @@ -1808,7 +1807,8 @@ }, codec_descr := {{ pt := pt, - codec := codec + codec := codec, + fmtp := fmtp }}, osmux:= { local_cid_sent := false, @@ -2283,7 +2283,7 @@ f_vty_transceive(MGWVTY, "rtp-patch rfc5993hr"); /* Connection #0 (Bidirectional) */ - flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000")); + flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000", fmtp0)); /* bind local RTP emulation sockets */ flow[0].em.portnr := 10000; flow[0].rtp_cfg := c_RtpemDefaultCfg; @@ -2291,18 +2291,16 @@ flow[0].rtp_cfg.tx_payloads[0].payload_type := flow[0].codec_descr[0].pt; flow[0].rtp_cfg.rx_payloads[0].fixed_payload := pl0; flow[0].rtp_cfg.tx_payloads[0].fixed_payload := pl0; - flow[0].codec_descr[0].fmtp := fmtp0; f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]); /* Connection #1 (Bidirectional) */ - flow[1] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000")); + flow[1] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000", fmtp1)); flow[1].em.portnr := 20000; flow[1].rtp_cfg := c_RtpemDefaultCfg; flow[1].rtp_cfg.rx_payloads[0].payload_type := flow[1].codec_descr[0].pt; flow[1].rtp_cfg.tx_payloads[0].payload_type := flow[1].codec_descr[0].pt; flow[1].rtp_cfg.rx_payloads[0].fixed_payload := pl1; flow[1].rtp_cfg.tx_payloads[0].fixed_payload := pl1; - flow[1].codec_descr[0].fmtp := fmtp1; f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]); /* Send RTP packets to connection #0, receive on connection #1 */ @@ -2363,7 +2361,7 @@ f_init(ep); /* Connection #0 (Bidirectional) */ - flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 96, "AMR/8000")); + flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 96, "AMR/8000", fmtp0)); /* bind local RTP emulation sockets */ flow[0].em.portnr := 10000; flow[0].rtp_cfg := c_RtpemDefaultCfg; @@ -2371,18 +2369,16 @@ flow[0].rtp_cfg.tx_payloads[0].payload_type := flow[0].codec_descr[0].pt; flow[0].rtp_cfg.rx_payloads[0].fixed_payload := pl0; flow[0].rtp_cfg.tx_payloads[0].fixed_payload := pl0; - flow[0].codec_descr[0].fmtp := fmtp0; f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]); /* Connection #1 (Bidirectional) */ - flow[1] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 112, "AMR/8000")); + flow[1] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 112, "AMR/8000", fmtp1)); flow[1].em.portnr := 20000; flow[1].rtp_cfg := c_RtpemDefaultCfg; flow[1].rtp_cfg.rx_payloads[0].payload_type := flow[1].codec_descr[0].pt; flow[1].rtp_cfg.tx_payloads[0].payload_type := flow[1].codec_descr[0].pt; flow[1].rtp_cfg.rx_payloads[0].fixed_payload := pl1; flow[1].rtp_cfg.tx_payloads[0].fixed_payload := pl1; - flow[1].codec_descr[0].fmtp := fmtp1; f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]); /* Send RTP packets to connection #0, receive on connection #1 */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I04b17c0d233c1db4b9ba1306a4e0555914519bf8 Gerrit-Change-Number: 32177 Gerrit-PatchSet: 7 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pma...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged