aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_speech.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-13 14:51:09 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-13 14:51:09 +0000
commit0c9b3cfe581180a63bc3c5049c667ffbde45ff63 (patch)
tree4870eced532a2d1c751e72330421b73cf143e39d /res/res_speech.c
parent19462d7c765442837bb8ac70295d5a037fbf8adf (diff)
Add an API call to allow the engine to know that DTMF was received.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79207 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_speech.c')
-rw-r--r--res/res_speech.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/res/res_speech.c b/res/res_speech.c
index 73dfe8dec..5b8f3569c 100644
--- a/res/res_speech.c
+++ b/res/res_speech.c
@@ -193,6 +193,21 @@ int ast_speech_write(struct ast_speech *speech, void *data, int len)
return res;
}
+/*! \brief Signal to the engine that DTMF was received */
+int ast_speech_dtmf(struct ast_speech *speech, char dtmf)
+{
+ int res = 0;
+
+ if (speech->state != AST_SPEECH_STATE_READY)
+ return -1;
+
+ if (speech->engine->dtmf != NULL) {
+ res = speech->engine->dtmf(speech, dtmf);
+ }
+
+ return res;
+}
+
/*! \brief Change an engine specific attribute */
int ast_speech_change(struct ast_speech *speech, char *name, const char *value)
{