[asterisk-commits] rmudgett: branch 1.8 r359609 - in /branches/1.8/apps: app_dial.c app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 15 13:17:41 CDT 2012


Author: rmudgett
Date: Thu Mar 15 13:17:30 2012
New Revision: 359609

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=359609
Log:
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/

Modified:
    branches/1.8/apps/app_dial.c
    branches/1.8/apps/app_queue.c

Modified: branches/1.8/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_dial.c?view=diff&rev=359609&r1=359608&r2=359609
==============================================================================
--- branches/1.8/apps/app_dial.c (original)
+++ branches/1.8/apps/app_dial.c Thu Mar 15 13:17:30 2012
@@ -1060,7 +1060,9 @@
 			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 @@
 							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 @@
 								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);
 							}
 						}

Modified: branches/1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_queue.c?view=diff&rev=359609&r1=359608&r2=359609
==============================================================================
--- branches/1.8/apps/app_queue.c (original)
+++ branches/1.8/apps/app_queue.c Thu Mar 15 13:17:30 2012
@@ -3528,7 +3528,9 @@
 							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 @@
 										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);
 									}
 								}




More information about the asterisk-commits mailing list