summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-03-15 18:32:22 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-03-15 18:32:22 +0000
commite9703da1d5f04a43b8ff4df8d3eff63cdf1f40b0 (patch)
tree0ee616dd900e63642fdf8fc7efa3bad9043222f1 /apps/app_dial.c
parent831af9fbc7ff3e22cc4a67f254ec5b44d6239b8a (diff)
Add missing connected line macro calls to initial dial for Dial and Queue apps.
The connected line interception macros do not get executed when the outgoing channel is initially created and that channel's caller-id is implicitly imported into the incoming channel's connected line data. If you are using the interception macros, you would expect that they get run for every change to a channel's connected line information outside of normal dialplan execution. Review: https://reviewboard.asterisk.org/r/1817/ ........ Merged revisions 359609 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359620 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index e641356ac..fbd4ef68b 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1061,7 +1061,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
ast_connected_line_copy_from_caller(&connected_caller, ast_channel_caller(outgoing->chan));
ast_channel_unlock(outgoing->chan);
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
- ast_channel_update_connected_line(in, &connected_caller, NULL);
+ if (ast_channel_connected_line_sub(outgoing->chan, in, &connected_caller, 0) &&
+ ast_channel_connected_line_macro(outgoing->chan, in, &connected_caller, 1, 0)) {
+ ast_channel_update_connected_line(in, &connected_caller, NULL);
+ }
ast_party_connected_line_free(&connected_caller);
}
}
@@ -1126,7 +1129,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
ast_connected_line_copy_from_caller(&connected_caller, ast_channel_caller(c));
ast_channel_unlock(c);
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
- ast_channel_update_connected_line(in, &connected_caller, NULL);
+ if (ast_channel_connected_line_sub(c, in, &connected_caller, 0) &&
+ ast_channel_connected_line_macro(c, in, &connected_caller, 1, 0)) {
+ ast_channel_update_connected_line(in, &connected_caller, NULL);
+ }
ast_party_connected_line_free(&connected_caller);
}
}
@@ -1199,7 +1205,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
ast_connected_line_copy_from_caller(&connected_caller, ast_channel_caller(c));
ast_channel_unlock(c);
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
- ast_channel_update_connected_line(in, &connected_caller, NULL);
+ if (ast_channel_connected_line_sub(c, in, &connected_caller, 0) &&
+ ast_channel_connected_line_macro(c, in, &connected_caller, 1, 0)) {
+ ast_channel_update_connected_line(in, &connected_caller, NULL);
+ }
ast_party_connected_line_free(&connected_caller);
}
}