[asterisk-commits] file: branch 12 r403329 - in /branches/12: ./ include/asterisk/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 3 11:59:46 CST 2013


Author: file
Date: Tue Dec  3 11:59:41 2013
New Revision: 403329

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403329
Log:
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.

Modified:
    branches/12/configure
    branches/12/configure.ac
    branches/12/include/asterisk/autoconfig.h.in
    branches/12/res/res_pjsip_session.c

Modified: branches/12/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/12/configure.ac?view=diff&rev=403329&r1=403328&r2=403329
==============================================================================
--- branches/12/configure.ac (original)
+++ branches/12/configure.ac Tue Dec  3 11:59:41 2013
@@ -434,6 +434,7 @@
 AST_EXT_LIB_SETUP([PJPROJECT], [PJPROJECT], [pjproject])
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
 AST_EXT_LIB_SETUP_OPTIONAL([PJ_TRANSACTION_GRP_LOCK], [PJSIP Transaction Group Lock Support], [PJPROJECT], [pjsip])
+AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_REPLACE_MEDIA_STREAM], [PJSIP Media Stream Replacement Support], [PJPROJECT], [pjsip])
 AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
 AST_EXT_LIB_SETUP_OPTIONAL([PRI_L2_PERSISTENCE], [ISDN Layer 2 persistence option], [PRI], [pri])
@@ -2018,6 +2019,8 @@
 
 AST_EXT_LIB_CHECK([PJ_TRANSACTION_GRP_LOCK], [pjsip], [pjsip_tsx_create_uac2], [pjsip.h])
 
+AST_C_COMPILE_CHECK([PJSIP_REPLACE_MEDIA_STREAM], [pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE], [pjmedia.h])
+
 AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
 
 AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])

Modified: branches/12/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/autoconfig.h.in?view=diff&rev=403329&r1=403328&r2=403329
==============================================================================
--- branches/12/include/asterisk/autoconfig.h.in (original)
+++ branches/12/include/asterisk/autoconfig.h.in Tue Dec  3 11:59:41 2013
@@ -568,6 +568,9 @@
 
 /* Define if your system has the PJPROJECT libraries. */
 #undef HAVE_PJPROJECT
+
+/* Define if your system has the PJSIP_REPLACE_MEDIA_STREAM headers. */
+#undef HAVE_PJSIP_REPLACE_MEDIA_STREAM
 
 /* Define to 1 if PJPROJECT has the PJSIP Transaction Group Lock Support
    feature. */

Modified: branches/12/res/res_pjsip_session.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_session.c?view=diff&rev=403329&r1=403328&r2=403329
==============================================================================
--- branches/12/res/res_pjsip_session.c (original)
+++ branches/12/res/res_pjsip_session.c Tue Dec  3 11:59:41 2013
@@ -1222,7 +1222,7 @@
 		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 @@
 		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) {




More information about the asterisk-commits mailing list