[asterisk-commits] mnicholson: branch irroot/t38gateway-trunk r324615 - /team/irroot/t38gateway-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 23 07:44:37 CDT 2011


Author: mnicholson
Date: Thu Jun 23 07:44:34 2011
New Revision: 324615

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324615
Log:
don't start a gateway if neither channel can handle T.38

Modified:
    team/irroot/t38gateway-trunk/res/res_fax.c

Modified: team/irroot/t38gateway-trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax.c?view=diff&rev=324615&r1=324614&r2=324615
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Thu Jun 23 07:44:34 2011
@@ -2709,6 +2709,14 @@
 	}
 
 	if (!gateway->bridged && peer) {
+		/* don't start a gateway if neither channel can handle T.38 */
+		if (ast_channel_get_t38_state(chan) == T38_STATE_UNAVAILABLE && ast_channel_get_t38_state(peer) == T38_STATE_UNAVAILABLE) {
+			ast_debug(1, "not starting gateway for %s and %s; neither channel supports T.38\n", chan->name, peer->name);
+			ast_framehook_detach(chan, gateway->s->details->gateway_id);
+			gateway->s->details->gateway_id = -1;
+			return f;
+		}
+
 		/* we are bridged, change r/w formats to SLIN for CED detection and T.30 */
 		ast_format_copy(&gateway->chan_read_format, &chan->readformat);
 		ast_format_copy(&gateway->chan_write_format, &chan->readformat);




More information about the asterisk-commits mailing list