[svn-commits] mmichelson: trunk r393897 - /trunk/channels/chan_gulp.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 9 15:07:23 CDT 2013


Author: mmichelson
Date: Tue Jul  9 15:07:21 2013
New Revision: 393897

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393897
Log:
Use correct function for getting bridged peer when doing direct media checks.

(closes issue ASTERISK-21947)
reported by Matt Jordan


Modified:
    trunk/channels/chan_gulp.c

Modified: trunk/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gulp.c?view=diff&rev=393897&r1=393896&r2=393897
==============================================================================
--- trunk/channels/chan_gulp.c (original)
+++ trunk/channels/chan_gulp.c Tue Jul  9 15:07:21 2013
@@ -488,12 +488,14 @@
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(chan);
 	struct ast_sip_session *session = pvt->session;
 	int changed = 0;
-
-	/* BUGBUG - ast_bridged_channel will always return NULL, meaning direct media will never occur */
+	struct ast_channel *bridge_peer;
+
 	/* Don't try to do any direct media shenanigans on early bridges */
-	if ((rtp || vrtp || tpeer) && !ast_bridged_channel(chan)) {
+	bridge_peer = ast_channel_bridge_peer(chan);
+	if ((rtp || vrtp || tpeer) && !bridge_peer) {
 		return 0;
 	}
+	ast_channel_cleanup(bridge_peer);
 
 	if (nat_active && session->endpoint->disable_direct_media_on_nat) {
 		return 0;




More information about the svn-commits mailing list