add inter digit timeout to swigged embedded languages getDigits method. (MODLANG-65)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8820 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-06-23 16:31:09 +00:00
parent b3ad6e2622
commit 444c93c36e
2 changed files with 9 additions and 3 deletions

View File

@ -234,7 +234,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
* receiving dtmf digits. For that, use collectDigits.
*/
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout);
SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout, int interdigit = 0);
SWITCH_DECLARE(int) transfer(char *extensions, char *dialplan, char *context);

View File

@ -583,9 +583,15 @@ SWITCH_DECLARE(int) CoreSession::collectDigits(int timeout) {
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits, char *terminators, int timeout)
{
return getDigits(maxdigits, terminators, timeout, 0);
}
SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
char *terminators,
int timeout)
int timeout,
int interdigit)
{
switch_status_t status;
this_check((char *)"");
@ -600,7 +606,7 @@ SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
maxdigits,
terminators,
&terminator,
(uint32_t) timeout, 0, 0);
(uint32_t) timeout, (uint32_t)interdigit, 0);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
end_allow_threads();