aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_senddtmf.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 21:52:30 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 21:52:30 +0000
commite8820a04915e9c541e5330eef7435d68c6215327 (patch)
treeb89adfb31308894d6ab44ad8b7232a763dfee84f /apps/app_senddtmf.c
parent6f3cf2396f0d88b7a9dcba22aa39b969b107da2c (diff)
Extend the ast_senddigit and ast_dtmf_stream API calls to allow the duration of the DTMF digit(s) to be specified and make the SendDTMF application have the capability to use it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78278 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_senddtmf.c')
-rw-r--r--apps/app_senddtmf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index 81651ec6b..fab83360e 100644
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -60,10 +60,11 @@ static int senddtmf_exec(struct ast_channel *chan, void *vdata)
{
int res = 0;
char *data;
- int timeout;
+ int timeout, duration;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(digits);
AST_APP_ARG(timeout);
+ AST_APP_ARG(duration);
);
if (ast_strlen_zero(vdata)) {
@@ -75,7 +76,8 @@ static int senddtmf_exec(struct ast_channel *chan, void *vdata)
AST_STANDARD_APP_ARGS(args, data);
timeout = atoi(args.timeout);
- res = ast_dtmf_stream(chan, NULL, args.digits, timeout <= 0 ? 250 : timeout);
+ duration = atoi(args.duration);
+ res = ast_dtmf_stream(chan, NULL, args.digits, timeout <= 0 ? 250 : timeout, duration);
return res;
}
@@ -102,7 +104,7 @@ static int manager_play_dtmf(struct mansession *s, const struct message *m)
return 0;
}
- ast_senddigit(chan, *digit);
+ ast_senddigit(chan, *digit, 0);
ast_mutex_unlock(&chan->lock);
astman_send_ack(s, m, "DTMF successfully queued");