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
This commit is contained in:
Terry Wilson
2010-03-12 22:04:51 +00:00
parent 828bdd8929
commit 68d1ded8dd
12 changed files with 122 additions and 59 deletions

View File

@@ -85,7 +85,8 @@ struct ast_codec_pref {
* \arg \b HOLD Call is placed on hold
* \arg \b UNHOLD Call is back from hold
* \arg \b VIDUPDATE Video update requested
* \arg \b SRCUPDATE The source of media has changed
* \arg \b SRCUPDATE The source of media has changed (RTP marker bit must change)
* \arg \b SRCCHANGE Media source has changed (RTP marker bit and SSRC must change)
* \arg \b CONNECTED_LINE Connected line has changed
* \arg \b REDIRECTING Call redirecting information has changed.
*/
@@ -323,6 +324,7 @@ enum ast_control_frame_type {
AST_CONTROL_CONNECTED_LINE = 22,/*!< Indicate connected line has changed */
AST_CONTROL_REDIRECTING = 23, /*!< Indicate redirecting id has changed */
AST_CONTROL_T38_PARAMETERS = 24, /*! T38 state change request/notification with parameters */
AST_CONTROL_SRCCHANGE = 25, /*!< Media source has changed and requires a new RTP SSRC */
};
enum ast_control_t38 {