mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user