diff options
author | Matthew Jordan <mjordan@digium.com> | 2011-09-09 16:28:23 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2011-09-09 16:28:23 +0000 |
commit | 8b5ba33fe0e69e8d31f27139daa03e2d05d0b6d2 (patch) | |
tree | 1469d7817b6e06619d6664985947a2f8112b6df6 /main | |
parent | 8017b65bb97c4226ca7a3c7c944a9811484e0305 (diff) |
Merged revisions 335078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r335078 | mjordan | 2011-09-09 11:27:01 -0500 (Fri, 09 Sep 2011) | 29 lines
Merged revisions 335064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines
Updated SIP 484 handling; added Incomplete control frame
When a SIP phone uses the dial application and receives a 484 Address
Incomplete response, if overlapped dialing is enabled for SIP, then
the 484 Address Incomplete is forwarded back to the SIP phone and the
HANGUPCAUSE channel variable is set to 28. Previously, the Incomplete
application dialplan logic was automatically triggered; now, explicit
dialplan usage of the application is required.
Additionally, this patch adds a new AST_CONTOL_FRAME type called
AST_CONTROL_INCOMPLETE. If a channel driver receives this control frame,
it is an indication that the dialplan expects more digits back from the
device. If the device supports overlap dialing it should attempt to
notify the device that the dialplan is waiting for more digits; otherwise,
it can handle the frame in a manner appropriate to the channel driver.
(closes issue ASTERISK-17288)
Reported by: Mikael Carlsson
Tested by: Matthew Jordan
Review: https://reviewboard.asterisk.org/r/1416/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 8 | ||||
-rw-r--r-- | main/dial.c | 4 | ||||
-rw-r--r-- | main/features.c | 2 | ||||
-rw-r--r-- | main/pbx.c | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index 8f4d37c8f..5275f9ec3 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4347,6 +4347,7 @@ static int attribute_const is_visible_indication(enum ast_control_frame_type con case AST_CONTROL_MCID: break; + case AST_CONTROL_INCOMPLETE: case AST_CONTROL_CONGESTION: case AST_CONTROL_BUSY: case AST_CONTROL_RINGING: @@ -4503,6 +4504,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition, case AST_CONTROL_BUSY: ts = ast_get_indication_tone(chan->zone, "busy"); break; + case AST_CONTROL_INCOMPLETE: case AST_CONTROL_CONGESTION: ts = ast_get_indication_tone(chan->zone, "congestion"); break; @@ -5538,6 +5540,12 @@ struct ast_channel *__ast_request_and_dial(const char *type, struct ast_format_c timeout = 0; break; + case AST_CONTROL_INCOMPLETE: + ast_cdr_failed(chan->cdr); + *outstate = AST_CONTROL_CONGESTION; + timeout = 0; + break; + case AST_CONTROL_CONGESTION: ast_cdr_failed(chan->cdr); *outstate = f->subclass.integer; diff --git a/main/dial.c b/main/dial.c index 5c30e287d..6faf8f5d5 100644 --- a/main/dial.c +++ b/main/dial.c @@ -412,6 +412,10 @@ static void handle_frame(struct ast_dial *dial, struct ast_dial_channel *channel ast_hangup(channel->owner); channel->owner = NULL; break; + case AST_CONTROL_INCOMPLETE: + ast_verb(3, "%s dialed Incomplete extension %s\n", channel->owner->name, channel->owner->exten); + ast_indicate(chan, AST_CONTROL_INCOMPLETE); + break; case AST_CONTROL_RINGING: ast_verb(3, "%s is ringing\n", channel->owner->name); if (!dial->options[AST_DIAL_OPTION_MUSIC]) diff --git a/main/features.c b/main/features.c index 819b67fb0..ac41a358c 100644 --- a/main/features.c +++ b/main/features.c @@ -3423,6 +3423,8 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller, ast_indicate(caller, AST_CONTROL_BUSY); ast_frfree(f); break; + } else if (f->subclass.integer == AST_CONTROL_INCOMPLETE) { + ast_verb(3, "%s dialed incomplete extension %s; ignoring\n", chan->name, chan->exten); } else if (f->subclass.integer == AST_CONTROL_CONGESTION) { state = f->subclass.integer; ast_verb(3, "%s is congested\n", chan->name); diff --git a/main/pbx.c b/main/pbx.c index 90f6d5a89..5b33f3a72 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -9395,6 +9395,8 @@ static int pbx_builtin_incomplete(struct ast_channel *chan, const char *data) __ast_answer(chan, 0, 1); } + ast_indicate(chan, AST_CONTROL_INCOMPLETE); + return AST_PBX_INCOMPLETE; } |