From db2d431697609d473de433b7028f81ce499a02c0 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 3 Dec 2013 14:43:34 +0100 Subject: mgcp/rtp: Add RTP header patch mode configuration This adds datastructures and a VTY frontend to configure the different type of RTP header patching: SSRC and timestamp. Note that timestamp patching is not yet implemented. Sponsored-by: On-Waves ehf --- openbsc/tests/mgcp/mgcp_test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index 8e130bbd8..908773a69 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -558,6 +558,9 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) trunk.number_endpoints = 1; trunk.endpoints = &endp; + trunk.force_constant_ssrc = patch_ssrc; + trunk.force_constant_timing = patch_ts; + endp.tcfg = &trunk; /* This doesn't free endp but resets/frees all fields of the structure @@ -568,7 +571,6 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) mgcp_free_endp(&endp); rtp->payload_type = 98; - endp.allow_patch = patch_ssrc; for (i = 0; i < ARRAY_SIZE(test_rtp_packets1); ++i) { struct rtp_packet_info *info = test_rtp_packets1 + i; @@ -577,6 +579,8 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) OSMO_ASSERT(info->len >= 0); memmove(buffer, info->data, info->len); + mgcp_rtp_end_config(&endp, 1, rtp); + mgcp_patch_and_count(&endp, &state, rtp, &addr, buffer, info->len); -- cgit v1.2.3