From c18fc0e2ae15fc51562ba95438679904fae82744 Mon Sep 17 00:00:00 2001 From: mnicholson Date: Mon, 26 Apr 2010 14:18:15 +0000 Subject: Update res_fax and res_fax_spandsp to be compatible with Fax For Asterisk 1.2. The fax session initilization code for T.38 faxes has been rewritten. T.38 session initialization was removed from generic_fax_exec, and split into two different code paths for receive and send. Also the 'z' option (to send a T.38 reinvite if we do not receive one) was added to sendfax. In the output of 'fax show sessions', the 'Type' column has been renamed to 'Tech' and replaced with a new 'Tech' column that will report 'G.711' or 'T.38'. Control of ECM defaults has been added to res_fax A 'fax show settings' CLI command has been added. Support of the new AST_T38_REQUEST_PARMS control method request to handle channels that have already received a T.38 reinvite before the FAX application is start has been added. Support for the 'fax show settings' command has been added to res_fax_spandsp and handling of the ECM flag has been slightly altered. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258896 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_fax_spandsp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'res/res_fax_spandsp.c') diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c index 9a84d28f6..d29cf7902 100644 --- a/res/res_fax_spandsp.c +++ b/res/res_fax_spandsp.c @@ -61,6 +61,7 @@ static int spandsp_fax_switch_to_t38(struct ast_fax_session *s); static char *spandsp_fax_cli_show_capabilities(int fd); static char *spandsp_fax_cli_show_session(struct ast_fax_session *s, int fd); static char *spandsp_fax_cli_show_stats(int fd); +static char *spandsp_fax_cli_show_settings(int fd); static struct ast_fax_tech spandsp_fax_tech = { .type = "Spandsp", @@ -85,6 +86,7 @@ static struct ast_fax_tech spandsp_fax_tech = { .cli_show_capabilities = spandsp_fax_cli_show_capabilities, .cli_show_session = spandsp_fax_cli_show_session, .cli_show_stats = spandsp_fax_cli_show_stats, + .cli_show_settings = spandsp_fax_cli_show_settings, }; struct spandsp_fax_stats { @@ -405,7 +407,7 @@ static void set_file(t30_state_t *t30_state, struct ast_fax_session_details *det static void set_ecm(t30_state_t *t30_state, struct ast_fax_session_details *details) { - t30_set_ecm_capability(t30_state, (details->option.ecm == AST_FAX_OPTFLAG_DEFAULT) ? 1 : details->option.ecm ); + t30_set_ecm_capability(t30_state, details->option.ecm); t30_set_supported_compressions(t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION); } @@ -732,6 +734,13 @@ static char *spandsp_fax_cli_show_stats(int fd) return CLI_SUCCESS; } +/*! \brief Show res_fax_spandsp settings */ +static char *spandsp_fax_cli_show_settings(int fd) +{ + /* no settings at the moment */ + return CLI_SUCCESS; +} + /*! \brief unload res_fax_spandsp */ static int unload_module(void) { -- cgit v1.2.3