[svn-commits] mmichelson: branch mmichelson/digit_manipulation r196070 - /team/mmichelson/d...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu May 21 15:10:28 CDT 2009
Author: mmichelson
Date: Thu May 21 15:10:25 2009
New Revision: 196070
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196070
Log:
Call the macro when calling the pickup exten!
Modified:
team/mmichelson/digit_manipulation/main/features.c
Modified: team/mmichelson/digit_manipulation/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/mmichelson/digit_manipulation/main/features.c?view=diff&rev=196070&r1=196069&r2=196070
==============================================================================
--- team/mmichelson/digit_manipulation/main/features.c (original)
+++ team/mmichelson/digit_manipulation/main/features.c Thu May 21 15:10:25 2009
@@ -4500,6 +4500,8 @@
int res;
const char *chan_name;
const char *cur_name;
+ const char *macro;
+ const char *macro_args;
if (!(cur = ast_channel_callback(find_channel_by_group, NULL, chan, 0))) {
ast_debug(1, "No call pickup possible...\n");
@@ -4509,6 +4511,9 @@
return -1;
}
+ macro = ast_strdupa(S_OR(pbx_builtin_getvar_helper(cur, "CONNECTED_LINE_CALLEE_SEND_MACRO"), ""));
+ macro_args = ast_strdupa(S_OR(pbx_builtin_getvar_helper(cur, "CONNECTED_LINE_CALLEE_SEND_MACRO_ARGS"), ""));
+
ast_channel_lock_both(cur, chan);
cur_name = ast_strdupa(cur->name);
@@ -4518,7 +4523,13 @@
connected_caller = cur->connected;
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
- ast_channel_update_connected_line(chan, &connected_caller);
+ if (!ast_strlen_zero(macro)) {
+ ast_party_connected_line_copy(&chan->connected, &connected_caller);
+ ast_app_run_macro(NULL, chan, macro, macro_args);
+ ast_channel_update_connected_line(chan, &chan->connected);
+ } else {
+ ast_channel_update_connected_line(chan, &connected_caller);
+ }
ast_party_connected_line_collect_caller(&connected_caller, &chan->cid);
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
More information about the svn-commits
mailing list