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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 30 08:23:13 CDT 2011


Author: mnicholson
Date: Thu Jun 30 08:23:10 2011
New Revision: 325804

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325804
Log:
allow the other channel to do a T.38 reinvite if our CED tone triggered reinvite was refused

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=325804&r1=325803&r2=325804
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Thu Jun 30 08:23:10 2011
@@ -2664,16 +2664,20 @@
 
 		ast_debug(1, "unable to negotiate T.38 on %s for fax gateway\n", active->name);
 
-		/* our request to negotiate T.38 was refused, nothing more we
-		 * can do */
-
-		ast_framehook_detach(chan, details->gateway_id);
-		details->gateway_id = -1;
-
-		ast_string_field_set(details, result, "FAILED");
-		ast_string_field_set(details, resultstr, "unable to negotiate T.38");
-		ast_string_field_set(details, error, "T38_NEG_ERROR");
-		set_channel_variables(chan, details);
+		/* our request to negotiate T.38 was refused, if the other
+		 * channel supports T.38, they might still reinvite and save
+		 * the day.  Otherwise disable the gateway. */
+		if (ast_channel_get_t38_state(other) == T38_STATE_UNKNOWN) {
+			gateway->t38_state = T38_STATE_UNAVAILABLE;
+		} else {
+			ast_framehook_detach(chan, details->gateway_id);
+			details->gateway_id = -1;
+
+			ast_string_field_set(details, result, "FAILED");
+			ast_string_field_set(details, resultstr, "unable to negotiate T.38");
+			ast_string_field_set(details, error, "T38_NEG_ERROR");
+			set_channel_variables(chan, details);
+		}
 
 		ao2_ref(details, -1);
 		return &ast_null_frame;




More information about the asterisk-commits mailing list