#include "asterisk/say.h"
#include "asterisk/pbx.h"
#include "asterisk/translate.h"
+#include "asterisk/manager.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
}
ast_mutex_unlock(&spyee_chanspy_ds->lock);
- if (!spyee)
+ if (!spyee) {
return 0;
+ }
/* We now hold the channel lock on spyee */
}
name = ast_strdupa(spyee->name);
+
ast_verb(2, "Spying on channel %s\n", name);
+ manager_event(EVENT_FLAG_CALL, "ChanSpyStart",
+ "SpyerChannel: %s\r\n"
+ "SpyeeChannel: %s\r\n",
+ spyer_name, name);
memset(&csth, 0, sizeof(csth));
ast_audiohook_destroy(&csth.spy_audiohook);
ast_verb(2, "Done Spying on channel %s\n", name);
+ manager_event(EVENT_FLAG_CALL, "ChanSpyStop", "SpyeeChannel: %s\r\n", name);
return running;
}
If an actionID was specified for the SipShowRegistry action, it will be appended as the
last line of the RegistrationsComplete event.
+- Event: ChanSpyStart
+ Modules: app_chanspy
+ Purpose: Reports when an active channel starts to be monitored by someone.
+ Example:
+ Event: ChanSpyStart
+ SpyerChannel: SIP/4321-13bba124
+ SpyeeChannel: SIP/1234-56ecc098
+
+- Event: ChanSpyStop
+ Modules: app_chanspy
+ Purpose: Reports when an active channel stops to be monitored by someone.
+ Example:
+ Event: ChanSpyStop
+ SpyeeChannel: SIP/1234-56ecc098
+
* TODO
------