res_pjsip_session: Add ability to accept multiple sdp answers

pjproject by default currently will follow media forked during an INVITE
on outbound calls if the To tag is different on a subsequent response as
that on an earlier response.  We handle this correctly.  There have
been reported cases where the To tag is the same but we still need to
follow the media.  The pjproject patch in this commit adds the
capability to sip_inv and also adds the capability to control it at
runtime.  The original "different tag" behavior was always controllable
at runtime but we never did anything with it and left it to default to
TRUE.

So, along with the pjproject patch, this commit adds options to both the
system and endpoint objects to control the two behaviors, and a small
logic change to session_inv_on_media_update in res_pjsip_session to
control the behavior at the endpoint level.

The default behavior for "different tags" remains the same at TRUE and
the default for "same tag" is FALSE.

Change-Id: I64d071942b79adb2f0a4e13137389b19404fe3d6
ASTERISK-27936
Reported-by: Ross Beer
This commit is contained in:
George Joseph
2018-06-18 20:22:17 -06:00
parent 017b7849bc
commit 880fbff6b7
13 changed files with 505 additions and 0 deletions

View File

@@ -623,6 +623,10 @@
/* Define to 1 if PJPROJECT has the pjsip_get_dest_info support feature. */
#undef HAVE_PJSIP_GET_DEST_INFO
/* Define if your system has the PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS
headers. */
#undef HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS
/* Define to 1 if PJPROJECT has the PJSIP INVITE Session Reference Count
support feature. */
#undef HAVE_PJSIP_INV_SESSION_REF

View File

@@ -643,6 +643,10 @@ struct ast_sip_media_rtp_configuration {
unsigned int timeout;
/*! Number of seconds before terminating channel due to lack of RTP (when on hold) */
unsigned int timeout_hold;
/*! Follow forked media with a different To tag */
unsigned int follow_early_media_fork;
/*! Accept updated SDPs on non-100rel 18X and 2XX responses with the same To tag */
unsigned int accept_multiple_sdp_answers;
};
/*!