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

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


Author: mmichelson
Date: Wed May 20 15:01:58 2009
New Revision: 195762

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195762
Log:
Add support for using caller-side macro when dialing multiple targets.


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=195762&r1=195761&r2=195762
==============================================================================
--- team/mmichelson/digit_manipulation/apps/app_dial.c (original)
+++ team/mmichelson/digit_manipulation/apps/app_dial.c Wed May 20 15:01:58 2009
@@ -983,7 +983,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