summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2010-03-12 22:04:51 +0000
committerTerry Wilson <twilson@digium.com>2010-03-12 22:04:51 +0000
commit68d1ded8dd40f646017da31c1fd3b4a0cc23c375 (patch)
tree24326afc8f1cbf64c5dc15d7013b19991584bf86 /channels/chan_mgcp.c
parent828bdd8929000a8bba2be8ca5d4f65144a90b9dd (diff)
Only change the RTP ssrc when we see that it has changed
This change basically reverts the change reviewed in https://reviewboard.asterisk.org/r/374/ and instead limits the updating of the RTP synchronization source to only those times when we detect that the other side of the conversation has changed the ssrc. The problem is that SRCUPDATE control frames are sent many times where we don't want a new ssrc, including whenever Asterisk has to send DTMF in a normal bridge. This is also not the first time that this mistake has been made. The initial implementation of the ast_rtp_new_source function also changed the ssrc--and then it was removed because of this same issue. Then, we put it back in again to fix a different issue. This patch attempts to only change the ssrc when we see that the other side of the conversation has changed the ssrc. It also renames some functions to make their purpose more clear. Review: https://reviewboard.asterisk.org/r/540/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 5dfafb84a..16195cb2e 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1456,7 +1456,10 @@ static int mgcp_indicate(struct ast_channel *ast, int ind, const void *data, siz
ast_moh_stop(ast);
break;
case AST_CONTROL_SRCUPDATE:
- ast_rtp_instance_new_source(sub->rtp);
+ ast_rtp_instance_update_source(sub->rtp);
+ break;
+ case AST_CONTROL_SRCCHANGE:
+ ast_rtp_instance_change_source(sub->rtp);
break;
case AST_CONTROL_PROGRESS:
case AST_CONTROL_PROCEEDING: