[Home]

Summary:ASTERISK-07321: [patch][post 1.4] Add read-only options and manager event
Reporter:Michael Baehr (tehdely)Labels:
Date Opened:2006-07-10 23:14:41Date Closed:2006-10-31 12:26:47.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast-svn-chanspyadditions.diff
Description:I have added one feature and one option to chanspy to accomodate an application I am writing which is designed to ease the administration of conferences (app_conference in particular)

I needed a way to step through channels and only hear the read-side of the channel in order to determine which person is ruining the conference with music or loud noises.  chanspy sets the CHANSPY_MIXAUDIO flag by default, which results (in the situation of several callers on a conference) in hearing the same audio on each channel that is in that conference, since each caller is hearing the collected mix of every other caller.  I have added an option "o" (for "readonly") which instructs chanspy to not set this flag and thus allows you to only hear the read side, which means that you can differentiate between callers sending different audio.

At the same time, I needed a way to mark the channel for further action.  Once a ruiner is detected, there needs to be some way to indicate that he should be banned!  I decided that the best way to do this is to signal a manager Event ("ChanSpyMark") upon entering digits + *.  I.e. 729* while spying on IAX2/tandem-3 would signal the following event:

Mon Jul 10 22:48:38 CDT 2006 RECV 163: Event: ChanSpyMark
Mon Jul 10 22:48:38 CDT 2006 RECV 163: Privilege: call,all
Mon Jul 10 22:48:38 CDT 2006 RECV 163: Channel: IAX2/tandem-3
Mon Jul 10 22:48:38 CDT 2006 RECV 163: Dialed: 729
Mon Jul 10 22:48:38 CDT 2006 RECV 163:

It will then behave as if you had just pressed *, and cycle to the next channel.  I figure this is a generic enough way to add a whole bunch of potential behavior; in my case at least a bot will be listening for that manager event and executing a command (ban/kick/etc.) on that channel according to the dialed digits.

Diff is against latest svn, but I have only tested it against 1.2.9.1.
Comments:By: Serge Vecher (serge-v) 2006-07-11 08:34:15

Thanks for the patch. Can you please get a dislaimer on file so we can review it for inclusion? See
http://bugs.digium.com/main_page.php and please notate the bug when done. Thanks.

By: Michael Baehr (tehdely) 2006-07-13 20:28:25

Just faxed it in; thanks vechers!

By: jmls (jmls) 2006-10-31 12:26:46.000-0600

ASTERISK-7918 supercedes this issue