[asterisk-bugs] [Asterisk 0010815]: [patch] SendFAX/ReceiveFAX

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Oct 11 02:38:31 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10815 
====================================================================== 
Reported By:                dimas
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10815
Category:                   Applications/NewFeature
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-24-2007 04:57 CDT
Last Modified:              10-11-2007 02:38 CDT
====================================================================== 
Summary:                    [patch] SendFAX/ReceiveFAX
Description: 
sendfax/receivefax applications are replacement for well known txfax/rxfax.
These are based on the same idea and also use SpanDSP GPL library by Steve
Underwood.

I hope these can be included in basic Asterisk distribution (or to addons)
just to make it easier for people obtaining fax support for Asterisk. Also,
this implementation fixes couple of bugs in applications which prevented me
using txfax/rxfax out of the box.

Notes:
* receivefax does not allow specifying %d in the file name. To me, it is
up to dialplan to form really unique file name.
* debug and answering/calling mode options are specified in a way
different from txfax/rxfax
====================================================================== 

---------------------------------------------------------------------- 
 slavon - 10-11-07 02:38  
---------------------------------------------------------------------- 
I write this patch to app_txfax.c. maybe add some one to you patch?

--- ./app_txfax.c       2007-06-24 09:05:36.000000000 +0400
+++ ./../../asterisk-1.4.11/apps/app_txfax.c    2007-08-27
11:08:46.000000000 +0400
@@ -83,18 +83,24 @@
 {
     struct ast_channel *chan;
     char far_ident[21];
+    char buf[255];

     chan = (struct ast_channel *) user_data;
     if (result == T30_ERR_OK)
     {
         t30_get_far_ident(s, far_ident);
         pbx_builtin_setvar_helper(chan, "REMOTESTATIONID", far_ident);
+        pbx_builtin_setvar_helper(chan, "FAX_DONE", "1");
     }
     else
     {
         ast_log(LOG_DEBUG,
"==============================================================================\n");
         ast_log(LOG_DEBUG, "Fax send not successful - result (%d) %s.\n",
result, t30_completion_code_to_str(result));
         ast_log(LOG_DEBUG,
"==============================================================================\n");
+
+       sprintf(&buf[0], "Fax send not successful - result (%d) %s.\n",
result, t30_completion_code_to_str(result));
+        pbx_builtin_setvar_helper(chan, "FAX_ERROR", buf);
+        pbx_builtin_setvar_helper(chan, "FAX_DONE", "2");
     }
 }
 /*- End of function
--------------------------------------------------------*/ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-11-07 02:38  slavon         Note Added: 0071805                          
======================================================================




More information about the asterisk-bugs mailing list