[asterisk-commits] may: branch may/chan_ooh323_evo r228795 - in /team/may/chan_ooh323_evo: addon...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 7 12:49:07 CST 2009


Author: may
Date: Sat Nov  7 12:49:05 2009
New Revision: 228795

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=228795
Log:
let app_fax compile with spandsp 6
bugfix from r228658 (pointer casting)

Modified:
    team/may/chan_ooh323_evo/addons/Makefile
    team/may/chan_ooh323_evo/addons/app_fasdetect.c
    team/may/chan_ooh323_evo/addons/ooh323c/src/ooh245.c
    team/may/chan_ooh323_evo/addons/ooh323c/src/ooh323.c
    team/may/chan_ooh323_evo/apps/app_fax.c

Modified: team/may/chan_ooh323_evo/addons/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/addons/Makefile?view=diff&rev=228795&r1=228794&r2=228795
==============================================================================
--- team/may/chan_ooh323_evo/addons/Makefile (original)
+++ team/may/chan_ooh323_evo/addons/Makefile Sat Nov  7 12:49:05 2009
@@ -32,7 +32,8 @@
             chan_mobile \
             chan_ooh323 \
             format_mp3 \
-            res_config_mysql
+            res_config_mysql \
+	    app_fasdetect
 
 all: _all
 

Modified: team/may/chan_ooh323_evo/addons/app_fasdetect.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/addons/app_fasdetect.c?view=diff&rev=228795&r1=228794&r2=228795
==============================================================================
--- team/may/chan_ooh323_evo/addons/app_fasdetect.c (original)
+++ team/may/chan_ooh323_evo/addons/app_fasdetect.c Sat Nov  7 12:49:05 2009
@@ -15,6 +15,10 @@
  * the GNU General Public License Version 2. See the LICENSE file
  * at the top of the source tree.
  */
+
+/*** MODULEINFO
+	<defaultenabled>no</defaultenabled>
+ ***/
 
 /*! \file
  *
@@ -65,8 +69,8 @@
 static char *app = "FasDetect";
 
 #define DETECTLIMIT 3000		/* limit detection up to 3 sec */
-#define FAS_SILENCE 2000		/* silence from 2 sec is fas */
-#define SILENCE_THRESHOLD 1024		/* silence level */
+#define FAS_SILENCE 1500		/* silence from 2 sec is fas */
+#define SILENCE_THRESHOLD 2048		/* silence level */
 
 enum {
 	OPTION_SILENCE = (1 << 0),
@@ -83,11 +87,13 @@
 	char* opts[0], *parse;
 	int sthreshold = SILENCE_THRESHOLD;
 	tone_detect_state_t f400_tone_state;
+	tone_detect_state_t f444_tone_state;
+	tone_detect_state_t f500_tone_state;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(channel);
 		AST_APP_ARG(options);
 	);
-	int original_read_fmt, original_write_fmt, original_peer_fmt;
+	int original_read_fmt, original_peer_fmt = AST_FORMAT_SLINEAR;
 	int res, fasdetected, notsilence, csilence;
 	int count = 0, totalsilence = 0, lenmatch;
 	struct ast_dsp *dsp;
@@ -135,6 +141,8 @@
 	}
 	ast_dsp_set_threshold(dsp, sthreshold);
 	ast_tone_detect_init(&f400_tone_state, 400, 420, 16);
+	ast_tone_detect_init(&f444_tone_state, 444, 420, 16);
+	ast_tone_detect_init(&f500_tone_state, 500, 420, 16);
 
 	fasdetected = 0;
 	notsilence = 0;
@@ -147,6 +155,18 @@
 		count += f->datalen / 2;
 
 		if (tone_detect(dsp, &f400_tone_state, 
+				f->data.ptr, f->datalen / 2)) {
+			ast_debug(1,"fas tone detected on %s\n", chan->name);
+			fasdetected = 1;
+			break;
+		}
+		if (tone_detect(dsp, &f444_tone_state, 
+				f->data.ptr, f->datalen / 2)) {
+			ast_debug(1,"fas tone detected on %s\n", chan->name);
+			fasdetected = 1;
+			break;
+		}
+		if (tone_detect(dsp, &f500_tone_state, 
 				f->data.ptr, f->datalen / 2)) {
 			ast_debug(1,"fas tone detected on %s\n", chan->name);
 			fasdetected = 1;

Modified: team/may/chan_ooh323_evo/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/addons/ooh323c/src/ooh245.c?view=diff&rev=228795&r1=228794&r2=228795
==============================================================================
--- team/may/chan_ooh323_evo/addons/ooh323c/src/ooh245.c (original)
+++ team/may/chan_ooh323_evo/addons/ooh323c/src/ooh245.c Sat Nov  7 12:49:05 2009
@@ -3201,7 +3201,7 @@
       ooFreeH245Message(call, ph245msg);
       return OO_FAILED;
    }
-   strcpy(*(char**)indication->u.userInput->u.alphanumeric, data);
+   strcpy(*(char**)&indication->u.userInput->u.alphanumeric, data);
    OOTRACEDBGA3 ("Built UserInputIndication_alphanumeric (%s, %s)\n", 
                  call->callType, call->callToken);
 
@@ -3264,7 +3264,7 @@
       ooFreeH245Message(call, ph245msg);
       return OO_FAILED;
    }
-   strcpy(*(char**)indication->u.userInput->u.signal->signalType, data);
+   strcpy(*(char**)&indication->u.userInput->u.signal->signalType, data);
    OOTRACEDBGA3 ("Built UserInputIndication_signal (%s, %s)\n", 
                  call->callType, call->callToken);
 

Modified: team/may/chan_ooh323_evo/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/addons/ooh323c/src/ooh323.c?view=diff&rev=228795&r1=228794&r2=228795
==============================================================================
--- team/may/chan_ooh323_evo/addons/ooh323c/src/ooh323.c (original)
+++ team/may/chan_ooh323_evo/addons/ooh323c/src/ooh323.c Sat Nov  7 12:49:05 2009
@@ -2167,7 +2167,7 @@
                memFreePtr(pctxt, pPrefixEntry);
                return OO_FAILED;
             }
-            strcpy(*(char**)pPrefixEntry->prefix.u.dialedDigits, pAlias->value);
+            strcpy(*(char**)&pPrefixEntry->prefix.u.dialedDigits, pAlias->value);
             bValid = TRUE;
             break;
          default:
@@ -2220,7 +2220,7 @@
                memFreePtr(pctxt, pAliasEntry);
                return OO_FAILED;
             }
-            strcpy(*(char**)pAliasEntry->u.dialedDigits, pAlias->value);
+            strcpy(*(char**)&pAliasEntry->u.dialedDigits, pAlias->value);
             bValid = TRUE;
             break;
          case T_H225AliasAddress_h323_ID:
@@ -2249,7 +2249,7 @@
                memFreePtr(pctxt, pAliasEntry);               
                return OO_FAILED;
             }
-            strcpy(*(char**)pAliasEntry->u.url_ID, pAlias->value);
+            strcpy(*(char**)&pAliasEntry->u.url_ID, pAlias->value);
             bValid = TRUE;
             break;
          case T_H225AliasAddress_email_ID:
@@ -2262,7 +2262,7 @@
                            "alias entry \n");
                return OO_FAILED;
             }
-            strcpy(*(char**)pAliasEntry->u.email_ID, pAlias->value);
+            strcpy(*(char**)&pAliasEntry->u.email_ID, pAlias->value);
             bValid = TRUE;
             break;
          default:

Modified: team/may/chan_ooh323_evo/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/apps/app_fax.c?view=diff&rev=228795&r1=228794&r2=228795
==============================================================================
--- team/may/chan_ooh323_evo/apps/app_fax.c (original)
+++ team/may/chan_ooh323_evo/apps/app_fax.c Sat Nov  7 12:49:05 2009
@@ -29,6 +29,7 @@
 #include <tiffio.h>
 
 #define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
+#define FIRST_ORDER_NOISE_SHAPING 1
 #include <spandsp.h>
 #include <spandsp/version.h>
 




More information about the asterisk-commits mailing list