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
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 8e130bb..908773a 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -558,6 +558,9 @@
 
 	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 @@
 	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 @@
 		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);