From e2292f3aa1e9ae1faf5521a9cb108775f1ac0540 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 3 Dec 2013 15:13:12 +0100 Subject: mgcp/rtp: Only patch SSRC once after MDCX if enabled Currently the output SSRC is always forced to be the same if SSRC patching is enabled. This patch modifies this to optionally restrict the number of SSRC changes that will be corrected. Note that the configuration only allows for the 'once' mode and 'off'. Sponsored-by: On-Waves ehf --- openbsc/src/libmgcp/mgcp_protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openbsc/src/libmgcp/mgcp_protocol.c') diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c index c703bec13..b8e1ecde4 100644 --- a/openbsc/src/libmgcp/mgcp_protocol.c +++ b/openbsc/src/libmgcp/mgcp_protocol.c @@ -619,8 +619,10 @@ void mgcp_rtp_end_config(struct mgcp_endpoint *endp, int expect_ssrc_change, { struct mgcp_trunk_config *tcfg = endp->tcfg; + int patch_ssrc = expect_ssrc_change && tcfg->force_constant_ssrc; + rtp->force_constant_timing = tcfg->force_constant_timing; - rtp->force_constant_ssrc = tcfg->force_constant_ssrc; + rtp->force_constant_ssrc = patch_ssrc ? 1 : 0; LOGP(DMGCP, LOGL_DEBUG, "Configuring RTP endpoint: local port %d%s%s\n", -- cgit v1.2.3