[asterisk-commits] blanchet: branch group/v6 r85137 - /team/group/v6/trunk/main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 9 11:00:32 CDT 2007


Author: blanchet
Date: Tue Oct  9 11:00:32 2007
New Revision: 85137

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85137
Log:
before deciding if native or packet2packet bridging is possible, add a check if the IP versions of both legs are compatible. if not, native is out but try packet2packet bridging.

Modified:
    team/group/v6/trunk/main/rtp.c

Modified: team/group/v6/trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/rtp.c?view=diff&rev=85137&r1=85136&r2=85137
==============================================================================
--- team/group/v6/trunk/main/rtp.c (original)
+++ team/group/v6/trunk/main/rtp.c Tue Oct  9 11:00:32 2007
@@ -3917,6 +3917,16 @@
 		return AST_BRIDGE_FAILED_NOWARN;
 	}
 
+	/* both rtp endpoints must use the same IPversion to do native bridging */
+        /* if not same IPversion, then try partial bridge */
+	if (!ast_vinetsock_sa_ipv_cmp(
+		(struct sockaddr *)&p0->them, p0->themlen, 
+		(struct sockaddr *)&p1->them, p1->themlen)) {
+
+		audio_p0_res = AST_RTP_TRY_PARTIAL;
+		audio_p1_res = AST_RTP_TRY_PARTIAL;
+	}	
+
 	/* If either side can only do a partial bridge, then don't try for a true native bridge */
 	if (audio_p0_res == AST_RTP_TRY_PARTIAL || audio_p1_res == AST_RTP_TRY_PARTIAL) {
 		struct ast_format_list fmt0, fmt1;




More information about the asterisk-commits mailing list