]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add missing connected line macro calls to initial dial for Dial and Queue apps.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 15 Mar 2012 18:17:30 +0000 (18:17 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 15 Mar 2012 18:17:30 +0000 (18:17 +0000)
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/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359609 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
apps/app_queue.c

index 82a4d2e3f9caf8a0b0190a6224dc4deadf70c450..b5d06870fd24e9ee008d03a57311c2e0dbd62d40 100644 (file)
@@ -1060,7 +1060,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
                        ast_connected_line_copy_from_caller(&connected_caller, &outgoing->chan->caller);
                        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_macro(outgoing->chan, in, &connected_caller, 1, 0)) {
+                               ast_channel_update_connected_line(in, &connected_caller, NULL);
+                       }
                        ast_party_connected_line_free(&connected_caller);
                }
        }
@@ -1124,7 +1126,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
                                                        ast_connected_line_copy_from_caller(&connected_caller, &c->caller);
                                                        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_macro(c, in, &connected_caller, 1, 0)) {
+                                                               ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                       }
                                                        ast_party_connected_line_free(&connected_caller);
                                                }
                                        }
@@ -1196,7 +1200,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
                                                                ast_connected_line_copy_from_caller(&connected_caller, &c->caller);
                                                                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_macro(c, in, &connected_caller, 1, 0)) {
+                                                                       ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                               }
                                                                ast_party_connected_line_free(&connected_caller);
                                                        }
                                                }
index 629623e533ee57ae72f348a3a5219f6d78277b2e..ec13935dfae72d8f597a102b15ab9e76bbceb72e 100644 (file)
@@ -3528,7 +3528,9 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
                                                        ast_connected_line_copy_from_caller(&connected_caller, &o->chan->caller);
                                                        ast_channel_unlock(o->chan);
                                                        connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-                                                       ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                       if (ast_channel_connected_line_macro(o->chan, in, &connected_caller, 1, 0)) {
+                                                               ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                       }
                                                        ast_party_connected_line_free(&connected_caller);
                                                }
                                        }
@@ -3657,7 +3659,9 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
                                                                                ast_connected_line_copy_from_caller(&connected_caller, &o->chan->caller);
                                                                                ast_channel_unlock(o->chan);
                                                                                connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-                                                                               ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                                               if (ast_channel_connected_line_macro(o->chan, in, &connected_caller, 1, 0)) {
+                                                                                       ast_channel_update_connected_line(in, &connected_caller, NULL);
+                                                                               }
                                                                                ast_party_connected_line_free(&connected_caller);
                                                                        }
                                                                }