[Pkg-voip-commits] r6561 - in /asterisk-spandsp-plugins/trunk: app_fax.c debian/patches/app_fax_14

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Fri Dec 19 21:02:50 UTC 2008


Author: tzafrir-guest
Date: Fri Dec 19 21:02:50 2008
New Revision: 6561

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6561
Log:
Update to 1.6.0/rev. 164265 (current).
Fix patch that was slightly broken.

If its not getting uploaded it might at least serve as a useful backport.

Modified:
    asterisk-spandsp-plugins/trunk/app_fax.c
    asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14

Modified: asterisk-spandsp-plugins/trunk/app_fax.c
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-spandsp-plugins/trunk/app_fax.c?rev=6561&op=diff
==============================================================================
--- asterisk-spandsp-plugins/trunk/app_fax.c (original)
+++ asterisk-spandsp-plugins/trunk/app_fax.c Fri Dec 19 21:02:50 2008
@@ -18,7 +18,7 @@
  
 #include "asterisk.h"
 
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 164265 $")
 
 #include <string.h>
 #include <stdlib.h>
@@ -29,6 +29,9 @@
 #include <tiffio.h>
 
 #include <spandsp.h>
+#ifdef HAVE_SPANDSP_EXPOSE_H
+#include <spandsp/expose.h>
+#endif
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -46,8 +49,8 @@
 "  SendFAX(filename[|options]):\n"
 "Send a given TIFF file to the channel as a FAX.\n"
 "The option string may contain zero or more of the following characters:\n"
-"     'a' -- makes the application behave as an answering machine\n"
-"	    The default behaviour is to behave as a calling machine.\n"
+"     'a' - makes the application behave as an answering machine\n"
+"           The default behaviour is to behave as a calling machine.\n"
 "\n"
 "This application uses following variables:\n"
 "     LOCALSTATIONID to identify itself to the remote end.\n"
@@ -55,10 +58,12 @@
 "\n"
 "This application sets the following channel variables upon completion:\n"
 "     FAXSTATUS       - status of operation:\n"
-"			   SUCCESS | FAILED\n"
-"     FAXERROR	- Error when FAILED\n"
+"                           SUCCESS | FAILED\n"
+"     FAXERROR        - Error when FAILED\n"
+"     FAXMODE         - Mode used:\n"
+"                           audio | T38\n"
 "     REMOTESTATIONID - CSID of the remote side.\n"
-"     FAXPAGES	- number of pages sent.\n"
+"     FAXPAGES        - number of pages sent.\n"
 "     FAXBITRATE      - transmition rate.\n"
 "     FAXRESOLUTION   - resolution.\n"
 "\n"
@@ -73,7 +78,7 @@
 "the file if it already exists. File created will have TIFF format.\n"
 "The option string may contain zero or more of the following characters:\n"
 "     'c' -- makes the application behave as a calling machine\n"
-"	    The default behaviour is to behave as an answering machine.\n"
+"            The default behaviour is to behave as an answering machine.\n"
 "\n"
 "This application uses following variables:\n"
 "     LOCALSTATIONID to identify itself to the remote end.\n"
@@ -81,10 +86,12 @@
 "\n"
 "This application sets the following channel variables upon completion:\n"
 "     FAXSTATUS       - status of operation:\n"
-"			   SUCCESS | FAILED\n"
-"     FAXERROR	- Error when FAILED\n"
+"                           SUCCESS | FAILED\n"
+"     FAXERROR        - Error when FAILED\n"
+"     FAXMODE         - Mode used:\n"
+"                           audio | T38\n"
 "     REMOTESTATIONID - CSID of the remote side.\n"
-"     FAXPAGES	- number of pages sent.\n"
+"     FAXPAGES        - number of pages sent.\n"
 "     FAXBITRATE      - transmition rate.\n"
 "     FAXRESOLUTION   - resolution.\n"
 "\n"
@@ -575,6 +582,7 @@
 	pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "FAILED"); 
 	pbx_builtin_setvar_helper(s->chan, "FAXERROR", "Channel problems"); 
 
+	pbx_builtin_setvar_helper(s->chan, "FAXMODE", NULL);
 	pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", NULL);
 	pbx_builtin_setvar_helper(s->chan, "FAXPAGES", NULL);
 	pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", NULL);
@@ -593,6 +601,7 @@
 	s->t38state = ast_channel_get_t38_state(s->chan);
 	if (s->t38state != T38_STATE_NEGOTIATED) {
 		/* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */	
+		pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio"); 
 		res = transmit_audio(s);
 		if (res > 0) {
 			/* transmit_audio reports switchover to T38. Update t38state */
@@ -604,6 +613,7 @@
 	}
 
 	if (s->t38state == T38_STATE_NEGOTIATED) {
+		pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38"); 
 		res = transmit_t38(s);
 	}
 

Modified: asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14?rev=6561&op=diff
==============================================================================
--- asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14 (original)
+++ asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14 Fri Dec 19 21:02:50 2008
@@ -153,7 +153,7 @@
  		}
  
  		ast_frfree(inf);
-@@ -590,22 +636,28 @@ static int transmit(fax_session *s)
+@@ -590,24 +636,30 @@ static int transmit(fax_session *s)
  		}
  	}
  
@@ -162,6 +162,7 @@
  	if (s->t38state != T38_STATE_NEGOTIATED) {
 +#endif
  		/* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */	
+		pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio"); 
  		res = transmit_audio(s);
  		if (res > 0) {
  			/* transmit_audio reports switchover to T38. Update t38state */
@@ -176,6 +177,7 @@
  	}
  
  	if (s->t38state == T38_STATE_NEGOTIATED) {
+		pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38"); 
  		res = transmit_t38(s);
  	}
 +#endif




More information about the Pkg-voip-commits mailing list