[asterisk-commits] irroot: branch irroot/t38gateway-1.8 r334440 - /team/irroot/t38gateway-1.8/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Sep 4 06:30:20 CDT 2011
Author: irroot
Date: Sun Sep 4 06:30:09 2011
New Revision: 334440
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334440
Log:
Remove changes made in early gwtimeout settings discarded.backport to 1.8
Modified:
team/irroot/t38gateway-1.8/res/res_fax.c
team/irroot/t38gateway-1.8/res/res_fax_spandsp.c
Modified: team/irroot/t38gateway-1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax.c?view=diff&rev=334440&r1=334439&r2=334440
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax.c Sun Sep 4 06:30:09 2011
@@ -184,7 +184,7 @@
<para>R/W Modem type (v17/v27/v29).</para>
</enum>
<enum name="gateway">
- <para>R/W T38 fax gateway, with optional fax activity timeout in seconds (yes[,timeout]/no)</para>
+ <para>R/W T38 Gateway Enabled With optional fax activity timeout in seconds (yes[,gwtimeout]/no)</para>
</enum>
<enum name="pages">
<para>R/O Number of pages transferred.</para>
@@ -467,7 +467,6 @@
d->minrate = general_options.minrate;
d->maxrate = general_options.maxrate;
d->gateway_id = -1;
- d->gateway_timeout = 0;
return d;
}
@@ -2508,7 +2507,7 @@
ast_dsp_set_faxmode(gateway->peer_dsp, DSP_FAXMODE_DETECT_V21 | DSP_FAXMODE_DETECT_CED);
details->caps = AST_FAX_TECH_GATEWAY;
- if (!(gateway->s = fax_session_reserve(details, &gateway->token))) {
+ if (details->gateway_timeout && !(gateway->s = fax_session_reserve(details, &gateway->token))) {
details->caps |= ~AST_FAX_TECH_GATEWAY;
ast_log(LOG_ERROR, "Can't reserve a FAX session, gateway attempt failed.\n");
ao2_ref(gateway, -1);
@@ -2592,6 +2591,7 @@
gateway->t38_state = T38_STATE_NEGOTIATING;
gateway->timeout_start = ast_tvnow();
+ details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
ast_debug(1, "requesting T.38 for gateway session for %s\n", chan->name);
return fp;
@@ -2684,6 +2684,7 @@
t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
gateway->t38_state = T38_STATE_UNKNOWN;
gateway->timeout_start = ast_tvnow();
+ details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
ao2_ref(details, -1);
return f;
} else if (state == T38_STATE_UNAVAILABLE || state == T38_STATE_REJECTED) {
@@ -2721,6 +2722,7 @@
t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
gateway->t38_state = T38_STATE_UNKNOWN;
gateway->timeout_start = ast_tvnow();
+ details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
ast_debug(1, "%s is attempting to negotiate T.38 after we already sent a negotiation request based on v21 preamble detection\n", active->name);
ao2_ref(details, -1);
@@ -2964,7 +2966,9 @@
return f;
}
- gateway->timeout_start = ast_tvnow();
+ if (details->gateway_timeout) {
+ gateway->timeout_start = ast_tvnow();
+ }
/* we are bridged, change r/w formats to SLIN for v21 preamble
* detection and T.30 */
@@ -2984,7 +2988,7 @@
gateway->bridged = 1;
}
- if (details->gateway_timeout && gateway->bridged && !ast_tvzero(gateway->timeout_start)) {
+ if (gateway->bridged && !ast_tvzero(gateway->timeout_start)) {
if (ast_tvdiff_ms(ast_tvnow(), gateway->timeout_start) > details->gateway_timeout) {
ast_debug(1, "no fax activity between %s and %s after %d ms, disabling gateway\n", chan->name, peer->name, details->gateway_timeout);
ast_framehook_detach(chan, gateway->framehook);
Modified: team/irroot/t38gateway-1.8/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax_spandsp.c?view=diff&rev=334440&r1=334439&r2=334440
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax_spandsp.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax_spandsp.c Sun Sep 4 06:30:09 2011
@@ -544,7 +544,6 @@
.subclass.codec = AST_FORMAT_SLINEAR,
.src = "res_fax_spandsp_g711",
};
-
struct ast_frame *f = &fax_frame;
ast_timer_ack(p->timer, 1);
More information about the asterisk-commits
mailing list