diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-06-01 13:04:32 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-06-01 13:04:32 +0000 |
commit | 463f9d729aed1a5ed538aa3deed1a3fed9462111 (patch) | |
tree | 1f664e6ba2c731057b40b1400ea1ade911c79c39 /channels/sip | |
parent | a7a3050de9b98aea0516e570c93f19da5f00fa61 (diff) |
Help mitigate potential reinvite glare scenarios.
When Asterisk servers are set up back-to-back, and
direct media is to be used betweeen endpoints, it is
fairly common for the two Asterisk servers to send
direct media reinvites to each other simultaneously.
This results in 491s and ACKs being exchanged between
the servers. While the media eventually gets set up
properly, the problem is that there can be a noticeable
delay for the streams to stabilize.
This patch adds a new directmedia option called "outgoing".
With this set, an immediate direct media reinvite will only
be sent if the call direction is outgoing. For incoming
dialogs, an immediate direct media reinvite will not be sent,
but further "reactionary" direct media reinvites may be sent.
Review: https://reviewboard.asterisk.org/r/1954
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip')
-rw-r--r-- | channels/sip/include/sip.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index cd061b7be..958fe9af2 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -368,9 +368,11 @@ #define SIP_PAGE3_SRTP_TAG_32 (1 << 1) /*!< DP: Use a 32bit auth tag in INVITE not 80bit */ #define SIP_PAGE3_NAT_AUTO_RPORT (1 << 2) /*!< DGP: Set SIP_NAT_FORCE_RPORT when NAT is detected */ #define SIP_PAGE3_NAT_AUTO_COMEDIA (1 << 3) /*!< DGP: Set SIP_PAGE2_SYMMETRICRTP when NAT is detected */ +#define SIP_PAGE3_DIRECT_MEDIA_OUTGOING (1 << 4) /*!< DP: Only send direct media reinvites on outgoing calls */ #define SIP_PAGE3_FLAGS_TO_COPY \ - (SIP_PAGE3_SNOM_AOC | SIP_PAGE3_SRTP_TAG_32 | SIP_PAGE3_NAT_AUTO_RPORT | SIP_PAGE3_NAT_AUTO_COMEDIA) + (SIP_PAGE3_SNOM_AOC | SIP_PAGE3_SRTP_TAG_32 | SIP_PAGE3_NAT_AUTO_RPORT | SIP_PAGE3_NAT_AUTO_COMEDIA | \ + SIP_PAGE3_DIRECT_MEDIA_OUTGOING) #define CHECK_AUTH_BUF_INITLEN 256 |