Add a 'secret' probation strictrtp mode to handle delayed changes in RTP source

Often, Asterisk may realize that a change in the source of an RTP stream is
about to occur and ask that the RTP engine reset it's lock on the current RTP
source. In certain scenarios, it may take awhile for the new remote system to
send RTP packets, while the old remote system may continue providing RTP during
that time period. This causes Asterisk to re-lock onto the old source, thereby
rejecting the new source when the old source stops sending RTP and the new
source begins.

This patch prevents that by having a constant secondary, 'secret' probation
mode enabled when an RTP source has been chosen. RTP packets from other sources
are always considered, but never chosen unless the current RTP source stops
sending RTP.

Review: https://reviewboard.asterisk.org/r/2364

(closes issue AST-1124)
Reported by: John Bigelow
Tested by: John Bigelow

(closes issue AST-1125)
Reported by: John Bigelow
Tested by: John Bigelow
........

Merged revisions 382573 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2013-03-07 15:48:06 +00:00
parent a3a2b99519
commit 80b8c2349c
4 changed files with 50 additions and 103 deletions

View File

@@ -61,8 +61,6 @@ struct ast_rtp_instance {
struct ast_sockaddr local_address;
/*! Address that we are sending RTP to */
struct ast_sockaddr remote_address;
/*! Alternate address that we are receiving RTP from */
struct ast_sockaddr alt_remote_address;
/*! Instance that we are bridged to if doing remote or local bridging */
struct ast_rtp_instance *bridged;
/*! Payload and packetization information */
@@ -335,20 +333,6 @@ int ast_rtp_instance_set_remote_address(struct ast_rtp_instance *instance,
return 0;
}
int ast_rtp_instance_set_alt_remote_address(struct ast_rtp_instance *instance,
const struct ast_sockaddr *address)
{
ast_sockaddr_copy(&instance->alt_remote_address, address);
/* oink */
if (instance->engine->alt_remote_address_set) {
instance->engine->alt_remote_address_set(instance, &instance->alt_remote_address);
}
return 0;
}
int ast_rtp_instance_get_and_cmp_local_address(struct ast_rtp_instance *instance,
struct ast_sockaddr *address)
{