[svn-commits] file: trunk r79335 - in /trunk: ./ apps/ include/asterisk/ res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 13 16:59:16 CDT 2007


Author: file
Date: Mon Aug 13 16:59:15 2007
New Revision: 79335

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79335
Log:
Merged revisions 79334 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79334 | file | 2007-08-13 18:57:20 -0300 (Mon, 13 Aug 2007) | 2 lines

Instead of accepting a single DTMF character accept a full string.

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_speech_utils.c
    trunk/include/asterisk/speech.h
    trunk/res/res_speech.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_speech_utils.c?view=diff&rev=79335&r1=79334&r2=79335
==============================================================================
--- trunk/apps/app_speech_utils.c (original)
+++ trunk/apps/app_speech_utils.c Mon Aug 13 16:59:15 2007
@@ -662,7 +662,6 @@
 			/* Free the frame we received */
 			switch (f->frametype) {
 			case AST_FRAME_DTMF:
-				ast_speech_dtmf(speech, f->subclass);
 				if (dtmf_terminator != '\0' && f->subclass == dtmf_terminator) {
 					done = 1;
 				} else {
@@ -702,6 +701,7 @@
 		/* We sort of make a results entry */
 		speech->results = ast_calloc(1, sizeof(*speech->results));
 		if (speech->results != NULL) {
+			ast_speech_dtmf(speech, dtmf);
 			speech->results->score = 1000;
 			speech->results->text = ast_strdup(dtmf);
 			speech->results->grammar = ast_strdup("dtmf");

Modified: trunk/include/asterisk/speech.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/speech.h?view=diff&rev=79335&r1=79334&r2=79335
==============================================================================
--- trunk/include/asterisk/speech.h (original)
+++ trunk/include/asterisk/speech.h Mon Aug 13 16:59:15 2007
@@ -88,7 +88,7 @@
 	/*! Write audio to the speech engine */
 	int (*write)(struct ast_speech *speech, void *data, int len);
 	/*! Signal DTMF was received */
-	int (*dtmf)(struct ast_speech *speech, char dtmf);
+	int (*dtmf)(struct ast_speech *speech, const char *dtmf);
 	/*! Prepare engine to accept audio */
 	int (*start)(struct ast_speech *speech);
 	/*! Change an engine specific setting */
@@ -137,7 +137,7 @@
 /*! \brief Write audio to the speech engine */
 int ast_speech_write(struct ast_speech *speech, void *data, int len);
 /*! \brief Signal to the engine that DTMF was received */
-int ast_speech_dtmf(struct ast_speech *speech, char dtmf);
+int ast_speech_dtmf(struct ast_speech *speech, const char *dtmf);
 /*! \brief Change an engine specific attribute */
 int ast_speech_change(struct ast_speech *speech, char *name, const char *value);
 /*! \brief Change the type of results we want */

Modified: trunk/res/res_speech.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_speech.c?view=diff&rev=79335&r1=79334&r2=79335
==============================================================================
--- trunk/res/res_speech.c (original)
+++ trunk/res/res_speech.c Mon Aug 13 16:59:15 2007
@@ -154,7 +154,7 @@
 }
 
 /*! \brief Signal to the engine that DTMF was received */
-int ast_speech_dtmf(struct ast_speech *speech, char dtmf)
+int ast_speech_dtmf(struct ast_speech *speech, const char *dtmf)
 {
 	int res = 0;
 




More information about the svn-commits mailing list