[asterisk-commits] qwell: trunk r90738 - /trunk/res/res_monitor.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 3 17:48:05 CST 2007
Author: qwell
Date: Mon Dec 3 17:48:04 2007
New Revision: 90738
URL: http://svn.digium.com/view/asterisk?view=rev&rev=90738
Log:
Add manager events for when a monitor is started or stopped.
Closes issue #10191, patch by dgradecak.
Modified:
trunk/res/res_monitor.c
Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?view=diff&rev=90738&r1=90737&r2=90738
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Mon Dec 3 17:48:04 2007
@@ -233,6 +233,13 @@
ast_monitor_set_state(chan, AST_MONITOR_RUNNING);
/* so we know this call has been monitored in case we need to bill for it or something */
pbx_builtin_setvar_helper(chan, "__MONITORED","true");
+
+ manager_event(EVENT_FLAG_CALL, "MonitorStart",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n",
+ chan->name,
+ chan->uniqueid
+ );
} else {
ast_debug(1,"Cannot start monitoring %s, already monitored\n", chan->name);
res = -1;
@@ -341,6 +348,13 @@
ast_free(chan->monitor->format);
ast_free(chan->monitor);
chan->monitor = NULL;
+
+ manager_event(EVENT_FLAG_CALL, "MonitorStop",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n",
+ chan->name,
+ chan->uniqueid
+ );
}
UNLOCK_IF_NEEDED(chan, need_lock);
More information about the asterisk-commits
mailing list