Add TALK_DETECTED variable (bug #2628)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-11-01 02:04:05 +00:00
parent 219acbcc07
commit 37b375c21a
2 changed files with 7 additions and 1 deletions

View File

@@ -145,7 +145,13 @@ static int background_detect_exec(struct ast_channel *chan, void *data)
if (ms < 0)
ms = 0;
if ((ms > min) && ((max < 0) || (ms < max))) {
char ms_str[10];
ast_log(LOG_DEBUG, "Found qualified token of %d ms\n", ms);
/* Save detected talk time (in milliseconds) */
sprintf(ms_str, "%d", ms );
pbx_builtin_setvar_helper(chan, "TALK_DETECTED", ms_str);
if (ast_exists_extension(chan, chan->context, "talk", 1, chan->cid.cid_num)) {
strncpy(chan->exten, "talk", sizeof(chan->exten) -1 );
chan->priority = 0;