diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-25 17:58:00 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-25 17:58:00 +0000 |
commit | 249675f01156189fcbc4540bed534cbf634832e2 (patch) | |
tree | 499850d8134de75af8b2dfeae4ded166f73f19cb /channels/chan_dahdi.c | |
parent | 33fdd3466379b4b1af9b03c3e4572e75e4f177b1 (diff) |
Merged revisions 303771 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r303771 | rmudgett | 2011-01-25 11:49:20 -0600 (Tue, 25 Jan 2011) | 54 lines
Merged revisions 303769 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r303769 | rmudgett | 2011-01-25 11:42:42 -0600 (Tue, 25 Jan 2011) | 47 lines
Merged revisions 303765 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r303765 | rmudgett | 2011-01-25 11:36:50 -0600 (Tue, 25 Jan 2011) | 40 lines
Sending out unnecessary PROCEEDING messages breaks overlap dialing.
Issue #16789 was a good idea. Unfortunately, it breaks overlap dialing
through Asterisk. There is not enough information available at this point
to know if dialing is complete. The ast_exists_extension(),
ast_matchmore_extension(), and ast_canmatch_extension() calls are not
adequate to detect a dial through extension pattern of "_9!".
Workaround is to use the dialplan Proceeding() application early in
non-dial through extensions.
* Effectively revert issue #16789.
* Allow outgoing overlap dialing to hear dialtone and other early media.
A PROGRESS "inband-information is now available" message is now sent after
the SETUP_ACKNOWLEDGE message for non-digital calls. An
AST_CONTROL_PROGRESS is now generated for incoming SETUP_ACKNOWLEDGE
messages for non-digital calls.
* Handling of the AST_CONTROL_CONGESTION in chan_dahdi/sig_pri was
inconsistent with the cause codes.
* Added better protection from sending out of sequence messages by
combining several flags into a single enum value representing call
progress level.
* Added diagnostic messages for deferred overlap digits handling corner
cases.
(closes issue #17085)
Reported by: shawkris
(closes issue #18509)
Reported by: wimpy
Patches:
issue18509_early_media_v1.8_v3.patch uploaded by rmudgett (license 664)
Expanded upon issue18509_early_media_v1.8_v3.patch to include analog
and SS7 because of backporting requirements.
Tested by: wimpy, rmudgett
........
................
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@303772 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index dd3366ed4..328ec8b39 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -7705,7 +7705,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast) ast_debug(1, "Detected %sdigit '%c'\n", p->pulsedial ? "pulse ": "", res & 0xff); #if defined(HAVE_PRI) if (dahdi_sig_pri_lib_handles(p->sig) - && !((struct sig_pri_chan *) p->sig_pvt)->proceeding + && ((struct sig_pri_chan *) p->sig_pvt)->call_level < SIG_PRI_CALL_LEVEL_PROCEEDING && p->pri && (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)) { /* absorb event */ @@ -7725,7 +7725,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast) ast_debug(1, "DTMF Down '%c'\n", res & 0xff); #if defined(HAVE_PRI) if (dahdi_sig_pri_lib_handles(p->sig) - && !((struct sig_pri_chan *) p->sig_pvt)->proceeding + && ((struct sig_pri_chan *) p->sig_pvt)->call_level < SIG_PRI_CALL_LEVEL_PROCEEDING && p->pri && (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)) { /* absorb event */ @@ -8976,7 +8976,7 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast) || f->frametype == AST_FRAME_DTMF_END) { #ifdef HAVE_PRI if (dahdi_sig_pri_lib_handles(p->sig) - && !((struct sig_pri_chan *) p->sig_pvt)->proceeding + && ((struct sig_pri_chan *) p->sig_pvt)->call_level < SIG_PRI_CALL_LEVEL_PROCEEDING && p->pri && ((!p->outgoing && (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)) || (p->outgoing && (p->pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)))) { @@ -9209,7 +9209,17 @@ static int dahdi_indicate(struct ast_channel *chan, int condition, const void *d res = 0; break; case AST_CONTROL_CONGESTION: - chan->hangupcause = AST_CAUSE_CONGESTION; + /* There are many cause codes that generate an AST_CONTROL_CONGESTION. */ + switch (chan->hangupcause) { + case AST_CAUSE_USER_BUSY: + case AST_CAUSE_NORMAL_CLEARING: + case 0:/* Cause has not been set. */ + /* Supply a more appropriate cause. */ + chan->hangupcause = AST_CAUSE_CONGESTION; + break; + default: + break; + } break; case AST_CONTROL_HOLD: ast_moh_start(chan, data, p->mohinterpret); |