summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-04-11 15:47:17 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-04-11 15:47:17 +0000
commitbc907695bf295306415d488440bd5253bf00b589 (patch)
tree2965fca440a825ed14fb6582ba3e5415af917efa /channels
parent723215f4ed0a981bd0348abbc0a4b5850ef60902 (diff)
Merged revisions 313190 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r313190 | rmudgett | 2011-04-11 10:40:30 -0500 (Mon, 11 Apr 2011) | 39 lines Merged revisions 313189 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r313189 | rmudgett | 2011-04-11 10:32:53 -0500 (Mon, 11 Apr 2011) | 32 lines Merged revisions 313188 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r313188 | rmudgett | 2011-04-11 10:27:52 -0500 (Mon, 11 Apr 2011) | 25 lines Stuck channel using FEATD_MF if caller hangs up at the right time. The cause was actually a caller hanging up just at the end of the Feature Group D DTMF tones that setup the call. The reason for this is a "guard timer" that's implemented using ast_safe_sleep(100). If the caller happens to hang up AFTER the final tone of the DTMF string but BEFORE the end of that ast_safe_sleep(), then ast_safe_sleep() will return non-zero. This causes the code to bounce to the end of ss_thread(), but it does NOT tear down the call properly. This should be a rare occurrence because the caller has to hang up at EXACTLY the right time. Nonetheless, it was happening quite regularly on the reporter's system. It's not easily reproducible, unless you purposely increase the guard-time to 2000 or more. Once you do that, you can reproduce it every time by watching the DTMF debug and hanging up just as it ends. Simply add an ast_hangup() before goto quit. (closes issue #15671) Reported by: jcromes Patches: issue15671.patch uploaded by pabelanger (license 224) Tested by: jcromes ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c5
-rw-r--r--channels/sig_analog.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index de2d0f4ca..f4a81131b 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -9986,7 +9986,10 @@ static void *analog_ss_thread(void *data)
/* some switches require a minimum guard time between
the last FGD wink and something that answers
immediately. This ensures it */
- if (ast_safe_sleep(chan,100)) goto quit;
+ if (ast_safe_sleep(chan, 100)) {
+ ast_hangup(chan);
+ goto quit;
+ }
}
dahdi_enable_ec(p);
if (NEED_MFDETECT(p)) {
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index 92eb19144..5fcb485ee 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -2010,10 +2010,13 @@ static void *__analog_ss_thread(void *data)
}
if ((p->sig == ANALOG_SIG_FEATDMF) || (p->sig == ANALOG_SIG_FEATDMF_TA)) {
analog_wink(p, idx);
- /* some switches require a minimum guard time between
- the last FGD wink and something that answers
- immediately. This ensures it */
- if (ast_safe_sleep(chan,100)) {
+ /*
+ * Some switches require a minimum guard time between the last
+ * FGD wink and something that answers immediately. This
+ * ensures it.
+ */
+ if (ast_safe_sleep(chan, 100)) {
+ ast_hangup(chan);
goto quit;
}
}