diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-12-05 17:44:15 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-12-05 17:44:15 +0000 |
commit | 938b642245f6d8289400d413e3abcdb4d2ebafc4 (patch) | |
tree | f2542f4b55aba3487e48081a024ec840dfac6166 /channels/sig_analog.c | |
parent | c5fe1cfdc09180b152ffb4d3dd53b1775b988750 (diff) |
Restore call progress code for analog ports.
Extracting sig_analog from chan_dahdi lost call progress detection
functionality.
* Fix analog ports from considering a call answered immediately after
dialing has completed if the callprogress option is enabled.
(closes issue ASTERISK-18841)
Reported by: Richard Miller
Patches:
chan_dahdi.diff (license #5685) patch uploaded by Richard Miller (Modified by me)
sig_analog.c.diff (license #5685) patch uploaded by Richard Miller (Modified by me)
sig_analog.h.diff (license #5685) patch uploaded by Richard Miller
........
Merged revisions 347006 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 347007 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_analog.c')
-rw-r--r-- | channels/sig_analog.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c index 003563767..edfd0da9e 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -200,6 +200,15 @@ static int analog_wait_event(struct analog_pvt *p) return -1; } +static int analog_have_progressdetect(struct analog_pvt *p) +{ + if (p->calls->have_progressdetect) { + return p->calls->have_progressdetect(p->chan_pvt); + } + /* Don't have progress detection. */ + return 0; +} + enum analog_cid_start analog_str_to_cidstart(const char *value) { if (!strcasecmp(value, "ring")) { @@ -2744,7 +2753,9 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_ } } if (ast->_state == AST_STATE_DIALING) { - if (analog_check_confirmanswer(p) || (!p->dialednone + if (analog_have_progressdetect(p)) { + ast_debug(1, "Done dialing, but waiting for progress detection before doing more...\n"); + } else if (analog_check_confirmanswer(p) || (!p->dialednone && ((mysig == ANALOG_SIG_EM) || (mysig == ANALOG_SIG_EM_E1) || (mysig == ANALOG_SIG_EMWINK) || (mysig == ANALOG_SIG_FEATD) || (mysig == ANALOG_SIG_FEATDMF_TA) || (mysig == ANALOG_SIG_FEATDMF) |