[asterisk-commits] mmichelson: branch group/CCSS r218096 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 11 14:15:48 CDT 2009
Author: mmichelson
Date: Fri Sep 11 14:15:45 2009
New Revision: 218096
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218096
Log:
Add callback macro logic plus some debugging statements.
Modified:
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=218096&r1=218095&r2=218096
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep 11 14:15:45 2009
@@ -30,6 +30,7 @@
#include "asterisk/taskprocessor.h"
#include "asterisk/event.h"
#include "asterisk/module.h"
+#include "asterisk/app.h"
/*** DOCUMENTATION
<application name="CallCompletionRequest" language="en_US">
@@ -775,6 +776,7 @@
char *full_extension = ast_strdupa(cc_interface->name);
char *context;
char *exten;
+ const char *callback_macro = ast_get_cc_callback_macro(agent->cc_params);
ast_log(LOG_NOTICE, "Now we should callback %s\n", agent->interface);
tech = interface;
if ((target = strchr(interface, '/'))) {
@@ -786,6 +788,10 @@
ast_log(LOG_NOTICE, "Failed to call back %s for reason %d\n", agent->interface, reason);
ast_cc_request_state_change(CC_FAILED, agent->core_id, "Failed to call back interface\n");
return NULL;
+ }
+ if (!ast_strlen_zero(callback_macro)) {
+ ast_log(LOG_NOTICE, "There's a callback macro configured\n");
+ ast_app_run_macro(NULL, chan, callback_macro, NULL);
}
/* We have a channel. It's time now to set up the datastore of recalled CC interfaces.
* This will be a common task for all recall functions. If it were possible, I'd have
@@ -1545,6 +1551,7 @@
struct ast_cc_monitor *mon = monitor;
struct generic_monitor_pvt *gen_mon_pvt = mon->private_data;
+ ast_log(LOG_NOTICE, "Destroying generic monitor private\n");
gen_mon_pvt->sub = ast_event_unsubscribe(gen_mon_pvt->sub);
ast_free(gen_mon_pvt);
return;
More information about the asterisk-commits
mailing list