[asterisk-commits] kharwell: branch kharwell/pimp_sip_media_neg r385163 - /team/kharwell/pimp_si...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 9 17:22:32 CDT 2013


Author: kharwell
Date: Tue Apr  9 17:22:29 2013
New Revision: 385163

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385163
Log:
added media_offer func and updated res_sip_session to handle sending with an sdp.  still need to figure out a way to update the sdp after its added.

Modified:
    team/kharwell/pimp_sip_media_neg/res/res_sip_sdp_rtp.c
    team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in

Modified: team/kharwell/pimp_sip_media_neg/res/res_sip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/res/res_sip_sdp_rtp.c?view=diff&rev=385163&r1=385162&r2=385163
==============================================================================
--- team/kharwell/pimp_sip_media_neg/res/res_sip_sdp_rtp.c (original)
+++ team/kharwell/pimp_sip_media_neg/res/res_sip_sdp_rtp.c Tue Apr  9 17:22:29 2013
@@ -512,6 +512,12 @@
 	int direct_media_enabled = !ast_sockaddr_isnull(&session_media->direct_media_addr) &&
 		!ast_format_cap_is_empty(session->direct_media_cap);
 
+	int use_outgoing_caps = !ast_format_cap_is_empty(session->outgoing_caps);
+
+	/* if ((use_outgoing_caps && !ast_format_cap_has_type(session->outgoing_caps, media_type)) || */
+	/*     (!use_outgoing_caps && !ast_format_cap_has_type(session->endpoint->codecs, media_type))) { */
+	/* 	/\* If no type formats are configured don't add a stream *\/ */
+	/* 	return 0; */
 	if (!ast_format_cap_has_type(session->endpoint->codecs, media_type)) {
 		/* If no type formats are configured don't add a stream */
 		return 0;
@@ -557,9 +563,9 @@
 		return -1;
 	}
 
-	if (!ast_format_cap_is_empty(session->outgoing_caps)) {
-		ast_format_cap_copy(caps, session->outgoing_caps);		
-	} else if (direct_media_enabled) {
+	if (use_outgoing_caps) {
+		ast_format_cap_copy(caps, session->outgoing_caps);
+ 	} else if (direct_media_enabled) {
 		ast_format_cap_joint_copy(session->endpoint->codecs, session->direct_media_cap, caps);
 	} else if (ast_format_cap_is_empty(session->req_caps)) {
 		ast_format_cap_copy(caps, session->endpoint->codecs);

Modified: team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in?view=diff&rev=385163&r1=385162&r2=385163
==============================================================================
--- team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in (original)
+++ team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in Tue Apr  9 17:22:29 2013
@@ -12,6 +12,7 @@
 		LINKER_SYMBOL_PREFIXast_sip_session_refresh;
 		LINKER_SYMBOL_PREFIXast_sip_session_send_response;
 		LINKER_SYMBOL_PREFIXast_sip_session_send_request;
+		LINKER_SYMBOL_PREFIXast_sip_session_send_request_with_sdp;
 		LINKER_SYMBOL_PREFIXast_sip_session_create_outgoing;
 	local:
 		*;




More information about the asterisk-commits mailing list