[asterisk-commits] mmichelson: branch mmichelson/digit_manipulation r195801 - /team/mmichelson/d...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 20 16:16:23 CDT 2009


Author: mmichelson
Date: Wed May 20 16:16:20 2009
New Revision: 195801

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195801
Log:
Add another place to call the macro.


Modified:
    team/mmichelson/digit_manipulation/apps/app_dial.c

Modified: team/mmichelson/digit_manipulation/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/mmichelson/digit_manipulation/apps/app_dial.c?view=diff&rev=195801&r1=195800&r2=195801
==============================================================================
--- team/mmichelson/digit_manipulation/apps/app_dial.c (original)
+++ team/mmichelson/digit_manipulation/apps/app_dial.c Wed May 20 16:16:20 2009
@@ -934,7 +934,16 @@
 					ast_verb(3, "%s answered %s\n", c->name, in->name);
 					if (!single && !ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
 						if (o->connected.id.number) {
-							ast_channel_update_connected_line(in, &o->connected);
+							const char * const macro = ast_strdupa(S_OR(pbx_builtin_getvar_helper(in, "CONNECTED_LINE_CALLER_SEND_MACRO"), ""));
+							const char * const args = ast_strdupa(S_OR(pbx_builtin_getvar_helper(in, "CONNECTED_LINE_CALLER_SEND_MACRO_ARGS"), ""));
+							ast_log(LOG_NOTICE, "macro is %s and args is %s\n", macro, args);
+							if (!ast_strlen_zero(macro)) {
+								ast_party_connected_line_copy(&in->connected, &o->connected);
+								ast_app_run_macro(c, in, macro, args);
+								ast_channel_update_connected_line(in, &in->connected);
+							} else {
+								ast_channel_update_connected_line(in, &o->connected);
+							}
 						} else if (!ast_test_flag64(o, DIAL_NOCONNECTEDLINE)) {
 							ast_channel_lock(c);
 							ast_connected_line_copy_from_caller(&connected_caller, &c->cid);




More information about the asterisk-commits mailing list