res_pjsip_session: Add support for PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag.

Newer versions of PJSIP have changed to using a flag for the
PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE instead of a define. This adds a
configure check to detect the presence of the flag and use it if found.
........

Merged revisions 403329 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-12-03 18:01:36 +00:00
parent 3357c494cb
commit b8025e789d
4 changed files with 72 additions and 3 deletions

View File

@@ -1222,7 +1222,7 @@ struct ast_sip_session *ast_sip_session_create_outgoing(struct ast_sip_endpoint
pjsip_dlg_terminate(dlg);
return NULL;
}
#ifdef PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE
#if defined(HAVE_PJSIP_REPLACE_MEDIA_STREAM) || defined(PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE)
inv_session->sdp_neg_flags = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE;
#endif
@@ -1371,7 +1371,8 @@ static pjsip_inv_session *pre_session_setup(pjsip_rx_data *rdata, const struct a
pjsip_dlg_terminate(dlg);
return NULL;
}
#ifdef PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE
#if defined(HAVE_PJSIP_REPLACE_MEDIA_STREAM) || defined(PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE)
inv_session->sdp_neg_flags = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE;
#endif
if (pjsip_dlg_add_usage(dlg, &session_module, NULL) != PJ_SUCCESS) {