From c1457252403f367fda151cf89728711629176a09 Mon Sep 17 00:00:00 2001 From: anthm Date: Fri, 7 May 2004 20:39:14 +0000 Subject: Created API call ast_dtmf_stream int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digits,int between) changed app_senddtmf.c to use this new call added D() parameter to app_dial to allow post connect dtmf stream to be sent using above call -Tony git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2918 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_senddtmf.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'apps/app_senddtmf.c') diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index 2e85b01d3..58e99b21c 100755 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -43,34 +43,13 @@ static int senddtmf_exec(struct ast_channel *chan, void *data) int res = 0; struct localuser *u; char *digits = data; - struct ast_frame f; - int x; + if (!digits || !strlen(digits)) { - ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#abcd)\n"); + ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#aAbBcCdD)\n"); return -1; } LOCAL_USER_ADD(u); - for (x=0;x 2) - ast_verbose(VERBOSE_PREFIX_3 "Sent digit string '%s' on %s\n", digits, chan->name); - + res = ast_dtmf_stream(chan,NULL,digits,250); LOCAL_USER_REMOVE(u); return res; } -- cgit v1.2.3