summaryrefslogtreecommitdiff
path: root/main/channel.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 /main/channel.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 'main/channel.c')
-rw-r--r--main/channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 833de79b3..016453c24 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2964,6 +2964,7 @@ int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
case AST_CONTROL_RINGING:
case AST_CONTROL_ANSWER:
case AST_CONTROL_SRCUPDATE:
+ case AST_CONTROL_SRCCHANGE:
case AST_CONTROL_CONNECTED_LINE:
case AST_CONTROL_REDIRECTING:
/* Unimportant */
@@ -3599,6 +3600,7 @@ static int attribute_const is_visible_indication(enum ast_control_frame_type con
case AST_CONTROL_PROCEEDING:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
+ case AST_CONTROL_SRCCHANGE:
case AST_CONTROL_RADIO_KEY:
case AST_CONTROL_RADIO_UNKEY:
case AST_CONTROL_OPTION:
@@ -3739,6 +3741,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
case AST_CONTROL_PROCEEDING:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
+ case AST_CONTROL_SRCCHANGE:
case AST_CONTROL_RADIO_KEY:
case AST_CONTROL_RADIO_UNKEY:
case AST_CONTROL_OPTION:
@@ -4474,6 +4477,7 @@ struct ast_channel *__ast_request_and_dial(const char *type, format_t format, co
case AST_CONTROL_UNHOLD:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
+ case AST_CONTROL_SRCCHANGE:
case AST_CONTROL_CONNECTED_LINE:
case AST_CONTROL_REDIRECTING:
case -1: /* Ignore -- just stopping indications */
@@ -5724,6 +5728,7 @@ static enum ast_bridge_result ast_generic_bridge(struct ast_channel *c0, struct
case AST_CONTROL_UNHOLD:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
+ case AST_CONTROL_SRCCHANGE:
ast_indicate_data(other, f->subclass.integer, f->data.ptr, f->datalen);
if (jb_in_use) {
ast_jb_empty_and_reset(c0, c1);