Merged revisions 221086 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221086 | twilson | 2009-09-30 09:49:11 -0500 (Wed, 30 Sep 2009) | 25 lines
  
  Change the SSRC by default when our media stream changes
  
  Be default, change SSRC when doing an audio stream changes Asterisk doesn't
  honor marker bit when reinvited to already-bridged RTP streams,resulting in
  far-end stack discarding packets with "old" timestamps that areactually part of
  a new stream.  This patch sends AST_CONTROL_SRCUPDATE whenever there is a
  reinvite, unless the 'constantssrc' is set to true in sip.conf.
  
  The original issue reported to Digium support detailed the following situation:
  ITSP <-> Asterisk 1.4.26.2 <-> SIP-based Application Server Call comes in
  fromITSP, Asterisk dials the app server which sends a re-invite back
  toAsterisk--not to negotiate to send media directly to the ITSP, but to
  indicatethat it's changing the stream it's sending to Asterisk.  The app
  servergenerates a new SSRC, sequence numbers, timestamps, and sets the marker
  bit on the new stream.  Asterisk passes through the teimstamp of the new stream,
  butdoes not reset the SSRC, sequence numbers, or set the marker bit.
  
  When the timestamp on the new stream is older than the timestamp on the
  originalstream, the ITSP (which doesn't know there has been any change) discards
  the newframes because it thinks they are too old.  This patch addresses this by
  changing the SSRC on a stream update unless constantssrc=true is set in
  sip.conf.
  
  Review: https://reviewboard.asterisk.org/r/374/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2009-09-30 17:52:30 +00:00
parent a4ece92018
commit 865daf4858
5 changed files with 65 additions and 1 deletions

View File

@@ -317,6 +317,8 @@ struct ast_rtp_engine {
int (*dtmf_end)(struct ast_rtp_instance *instance, char digit);
/*! Callback to indicate that a new source of media has come in */
void (*new_source)(struct ast_rtp_instance *instance);
/*! Callback to tell new_source not to change SSRC */
void (*constant_ssrc_set)(struct ast_rtp_instance *instance);
/*! Callback for setting an extended RTP property */
int (*extended_prop_set)(struct ast_rtp_instance *instance, int property, void *value);
/*! Callback for getting an extended RTP property */
@@ -1182,6 +1184,23 @@ int ast_rtp_instance_dtmf_mode_set(struct ast_rtp_instance *instance, enum ast_r
*/
enum ast_rtp_dtmf_mode ast_rtp_instance_dtmf_mode_get(struct ast_rtp_instance *instance);
/*!
* \brief Mark an RTP instance not to update SSRC on a new source
*
* \param instance Instance to update
*
* Example usage:
*
* \code
* ast_rtp_instance_set_constantssrc(instance);
* \endcode
*
* This sets the indicated instance to not update the RTP SSRC when new_source
* is called.
*
* \since 1.6.3
*/
void ast_rtp_instance_set_constantssrc(struct ast_rtp_instance *instance);
/*!
* \brief Indicate a new source of audio has dropped in
*