From 73edae53569c639eb2ee3bb78c07cd5d4bc6877f Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Wed, 5 Aug 2009 21:03:12 +0000 Subject: [PATCH] Activate fine resolution for 'receivefax' command as default --- README.Diva.fax | 3 ++- chan_capi.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.Diva.fax b/README.Diva.fax index f6021c4..fd3e5d4 100644 --- a/README.Diva.fax +++ b/README.Diva.fax @@ -221,7 +221,8 @@ The reception of the fax message is started using 'receivefax' capi command: 'options' - fax options, optional 'k' - keep fax document in case of errors (by default document is removed if fax transmission was not completed with success). - 'f' - allow Fine resolution + 'f' - allow Fine resolution (default) + 'F' - do not use Fine resolution 'u' - activate support for Super/Ultra fine resolutions and paper formats 'j' - enable JPEG coding 'b' - enable T.43 coding diff --git a/chan_capi.c b/chan_capi.c index eefe591..2684901 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -2448,7 +2448,7 @@ static int pbx_capi_receive_fax(struct ast_channel *c, char *data) char *filename, *stationid, *headline, *options; B3_PROTO_FAXG3 b3conf; char buffer[CAPI_MAX_STRING]; - unsigned short b3_protocol_options = 0; + unsigned short b3_protocol_options = 0x0001; int extended_resolution = 0; if ((i == NULL) || ((i->channeltype == CAPI_CHANNELTYPE_NULL) && (i->line_plci == NULL))) { @@ -2491,6 +2491,12 @@ static int pbx_capi_receive_fax(struct ast_channel *c, char *data) VERBOSE_PREFIX_3 CC_MESSAGE_NAME " receivefax: Allow Fine resolution\n"); b3_protocol_options |= 0x0001; break; + case 'F': /* do not use Fine resolution */ + cc_verbose(3, 1, + VERBOSE_PREFIX_3 CC_MESSAGE_NAME " receivefax: Allow Fine resolution\n"); + if (extended_resolution == 0) + b3_protocol_options &= ~0x0001; + break; case 'u': /* use Fine resolution */ cc_verbose(3, 1, VERBOSE_PREFIX_3 CC_MESSAGE_NAME " receivefax: Allow Super/Ultra fine resolution\n");