summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2014-05-16 20:06:59 +0000
committerRichard Mudgett <rmudgett@digium.com>2014-05-16 20:06:59 +0000
commit4c252096ef90d79a0da69daedaf09898b47a675b (patch)
tree57b76a183c952e170ffb03daea3628792b491cee /channels/chan_dahdi.c
parent6e2e38083d4b27185df4d85617ceae45f0961a39 (diff)
chan_dahdi: Fix analog dialtone detection.
* Check if waitingfordt (waitfordialtone) is enabled in dahdi_read() to allow the DSP to operate early enough to detect dialtone. * Made use the correct variable in my_check_waitingfordt(). ASTERISK-23709 #close Reported by: Steve Davies Patches: dialtone_detect_fix (license #5012) patch uploaded by Steve Davies Review: https://reviewboard.asterisk.org/r/3534/ ........ Merged revisions 414067 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 414068 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 414069 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index b9b915064..b4c8ec366 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1870,7 +1870,7 @@ static int my_check_waitingfordt(void *pvt)
{
struct dahdi_pvt *p = pvt;
- if (p->waitingfordt.tv_usec) {
+ if (p->waitingfordt.tv_sec) {
return 1;
}
@@ -8472,7 +8472,7 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
#if 0
ast_debug(1, "Read %d of voice on %s\n", p->subs[idx].f.datalen, ast->name);
#endif
- if (p->dialing || p->radio || /* Transmitting something */
+ if ((p->dialing && !p->waitingfordt.tv_sec) || p->radio || /* Transmitting something */
(idx && (ast_channel_state(ast) != AST_STATE_UP)) || /* Three-way or callwait that isn't up */
((idx == SUB_CALLWAIT) && !p->subs[SUB_CALLWAIT].inthreeway) /* Inactive and non-confed call-wait */
) {