summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-08-11 18:32:37 +0000
committerMark Michelson <mmichelson@digium.com>2014-08-11 18:32:37 +0000
commitef70c08dc7e074bee599c01a6850499ce8889ed6 (patch)
tree69db30c50c43cf49ffa3eccbcfa00cd868a678e8 /apps/app_dial.c
parent1b500d2fa1eb4b158a663e2f20bf2ffa3523a707 (diff)
Improve call forwarding reporting, especially with regards to ARI.
This patch addresses a few issues: 1) The order of Dial events have been changed when performing a call forward. The order has now been altered to 1) Dial begins dialing channel A. 2) When A forwards the call to B, we issue the dial end event to channel A, indicating the dial is being canceled due to a forward to B. 3) When the call to channel B occurs, we then issue a new dial begin to channel B. 2) Call forwards are now reported on the calling channel, not the peer channel. 3) AMI DialEnd events have been altered to display the extension the call is being forwarded to when relevant. 4) You can now get the values of channel variables for channels that are not currently in the Stasis application. This brings the retrieval of channel variables more in line with the rest of channel read operations since they may be performed on channels not in Stasis. ASTERISK-24134 #close Reported by Matt Jordan ASTERISK-24138 #close Reported by Matt Jordan Patches: forward-shenanigans.diff uploaded by Matt Jordan (License #6283) Review: https://reviewboard.asterisk.org/r/3899 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index b48a226c7..7c0cc6299 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -895,6 +895,7 @@ static void do_forward(struct chanlist *o, struct cause_args *num,
tech, stuff, cause);
}
if (!c) {
+ ast_channel_publish_dial(in, original, stuff, "BUSY");
ast_clear_flag64(o, DIAL_STILLGOING);
handle_cause(cause, num);
ast_hangup(original);
@@ -995,16 +996,18 @@ static void do_forward(struct chanlist *o, struct cause_args *num,
if (ast_call(c, stuff, 0)) {
ast_log(LOG_NOTICE, "Forwarding failed to dial '%s/%s'\n",
tech, stuff);
+ ast_channel_publish_dial(in, original, stuff, "CONGESTION");
ast_clear_flag64(o, DIAL_STILLGOING);
ast_hangup(original);
ast_hangup(c);
c = o->chan = NULL;
num->nochan++;
} else {
- ast_channel_publish_dial(in, c, stuff, NULL);
ast_channel_publish_dial_forward(in, original, c, NULL, "CANCEL",
ast_channel_call_forward(original));
+ ast_channel_publish_dial(in, c, stuff, NULL);
+
/* Hangup the original channel now, in case we needed it */
ast_hangup(original);
}