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: https://origsvn.digium.com/svn/asterisk/trunk@78278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-08-06 21:52:30 +00:00
parent 431c60f818
commit 9ef1b0a974
8 changed files with 30 additions and 26 deletions

View File

@@ -2657,14 +2657,14 @@ int ast_senddigit_end(struct ast_channel *chan, char digit, unsigned int duratio
return 0;
}
int ast_senddigit(struct ast_channel *chan, char digit)
int ast_senddigit(struct ast_channel *chan, char digit, unsigned int duration)
{
if (chan->tech->send_digit_begin) {
ast_senddigit_begin(chan, digit);
ast_safe_sleep(chan, AST_DEFAULT_EMULATE_DTMF_DURATION);
ast_safe_sleep(chan, (duration >= AST_DEFAULT_EMULATE_DTMF_DURATION ? duration : AST_DEFAULT_EMULATE_DTMF_DURATION));
}
return ast_senddigit_end(chan, digit, AST_DEFAULT_EMULATE_DTMF_DURATION);
return ast_senddigit_end(chan, digit, (duration >= AST_DEFAULT_EMULATE_DTMF_DURATION ? duration : AST_DEFAULT_EMULATE_DTMF_DURATION));
}
int ast_prod(struct ast_channel *chan)