From: Kevin P. Fleming Date: Mon, 16 Nov 2009 12:51:59 +0000 (+0000) Subject: Ensure that only one end of a T.38 session initiates teardown at completion. X-Git-Tag: 11.0.0-beta1~3848 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=237795f6d7d277b5fc017b927270895bb68a4f10;p=thirdparty%2Fasterisk.git Ensure that only one end of a T.38 session initiates teardown at completion. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230343 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_fax.c b/apps/app_fax.c index a1448cf1e4..6a33fe7a30 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -706,7 +706,11 @@ static int transmit_t38(fax_session *s) t38_terminal_release(&t38); disable_t38: - if (ast_channel_get_t38_state(s->chan) == T38_STATE_NEGOTIATED) { + /* if we are not the caller, it's our job to shut down the T.38 + * session when the FAX transmisson is complete. + */ + if ((s->caller_mode == FALSE) && + (ast_channel_get_t38_state(s->chan) == T38_STATE_NEGOTIATED)) { if (ast_indicate_data(s->chan, AST_CONTROL_T38_PARAMETERS, &t38_parameters, sizeof(t38_parameters)) == 0) { /* wait up to five seconds for negotiation to complete */ unsigned int timeout = 5000;