[asterisk-commits] file: trunk r41718 - in /trunk: channels/chan_sip.c main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 1 10:54:23 MST 2006


Author: file
Date: Fri Sep  1 12:54:22 2006
New Revision: 41718

URL: http://svn.digium.com/view/asterisk?rev=41718&view=rev
Log:
If we are doing video and we can't reinvite, then resort to generic bridging instead of Packet2Packet since video isn't supported there yet. (reported by PCadach in #asterisk-bugs)

Modified:
    trunk/channels/chan_sip.c
    trunk/main/rtp.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=41718&r1=41717&r2=41718&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Sep  1 12:54:22 2006
@@ -16130,7 +16130,7 @@
 		return AST_RTP_GET_FAILED;
 
 	ast_mutex_lock(&p->lock);
-	if (!(p->rtp)) {
+	if (!(p->vrtp)) {
 		ast_mutex_unlock(&p->lock);
 		return AST_RTP_GET_FAILED;
 	}

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?rev=41718&r1=41717&r2=41718&view=diff
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Fri Sep  1 12:54:22 2006
@@ -3070,7 +3070,13 @@
 	audio_p1_res = pr1->get_rtp_info(c1, &p1);
 	video_p1_res = pr1->get_vrtp_info ? pr1->get_vrtp_info(c1, &vp1) : AST_RTP_GET_FAILED;
 
-	/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
+	/* If we are carrying video, and both sides are not reinviting... then fail the native bridge */
+	if (video_p0_res != AST_RTP_GET_FAILED && (audio_p0_res != AST_RTP_TRY_NATIVE || video_p0_res != AST_RTP_TRY_NATIVE))
+		audio_p0_res = AST_RTP_GET_FAILED;
+	if (video_p1_res != AST_RTP_GET_FAILED && (audio_p1_res != AST_RTP_TRY_NATIVE || video_p1_res != AST_RTP_TRY_NATIVE))
+		audio_p1_res = AST_RTP_GET_FAILED;
+
+	/* Check if a bridge is possible (partial/native) */
 	if (audio_p0_res == AST_RTP_GET_FAILED || audio_p1_res == AST_RTP_GET_FAILED) {
 		/* Somebody doesn't want to play... */
 		ast_channel_unlock(c0);



More information about the asterisk-commits mailing list