Add generic faxdetect framehook to res_fax

Added func FAXOPT(faxdetect)=yes,cng,t38[,timeout]/no
to enable dialplan faxdetect allowing more flexibility.

as soon as a fax tone is detected the framehook is removed.
there is a penalty involved in running this framehook on
non G711 channels as they will be transcoded.

CNG tone is suppresed using the SQUELCH flag to allow
WaitForNoise to be run on the channel to detect Voice.

(Closes issue ASTERISK-18569)
Reported by: Myself
Reviewed by: Matthew Nicholson, Kevin Fleming

Review: https://reviewboard.asterisk.org/r/1116/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Gregory Nietsky
2011-10-05 06:50:18 +00:00
parent 1b3bd7ddb4
commit b698038995
3 changed files with 315 additions and 0 deletions

View File

@@ -174,6 +174,8 @@ struct ast_fax_session_details {
int gateway_id;
/*! the timeout for this gateway in seconds */
int gateway_timeout;
/*! the id of the faxdetect framehook for this channel */
int faxdetect_id;
};
struct ast_fax_tech;