diff options
author | Joshua Colp <jcolp@digium.com> | 2007-08-06 21:52:30 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-08-06 21:52:30 +0000 |
commit | 9ef1b0a97495678414991b73af66375c2bf3d84f (patch) | |
tree | b89adfb31308894d6ab44ad8b7232a763dfee84f /main/channel.c | |
parent | 431c60f8188db3588b6275591633f1f32ce8537b (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: https://origsvn.digium.com/svn/asterisk/trunk@78278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c index 4c1dc4b84..5c8de5694 100644 --- a/main/channel.c +++ b/main/channel.c @@ -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) |