[asterisk-commits] seanbright: branch seanbright/cdr-syslog r203845 - in /team/seanbright/cdr-sy...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 26 17:00:44 CDT 2009


Author: seanbright
Date: Fri Jun 26 17:00:41 2009
New Revision: 203845

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203845
Log:
Merged revisions 203842 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r203842 | russell | 2009-06-26 17:48:41 -0400 (Fri, 26 Jun 2009) | 7 lines
  
  Add 's' option to ChanSpy, which makes the app exit when no channels are left to spy on.
  
  (closes issue #14594)
  Reported by: JimDickenson
  Patches:
        chanspy.diff uploaded by JimDickenson (license 710)
........

Modified:
    team/seanbright/cdr-syslog/   (props changed)
    team/seanbright/cdr-syslog/CHANGES
    team/seanbright/cdr-syslog/apps/app_chanspy.c

Propchange: team/seanbright/cdr-syslog/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 26 17:00:41 2009
@@ -1,1 +1,1 @@
-/trunk:1-203833
+/trunk:1-203844

Modified: team/seanbright/cdr-syslog/CHANGES
URL: http://svn.asterisk.org/svn-view/asterisk/team/seanbright/cdr-syslog/CHANGES?view=diff&rev=203845&r1=203844&r2=203845
==============================================================================
--- team/seanbright/cdr-syslog/CHANGES (original)
+++ team/seanbright/cdr-syslog/CHANGES Fri Jun 26 17:00:41 2009
@@ -60,6 +60,9 @@
    exit the application.
  * The Voicemail application has been improved to automatically ignore messages
    that only contain silence.
+ * The ChanSpy application now has the 's' option, which makes the application
+   automatically exit once it hits a point where no more channels are available
+   to spy on.
 
 Dialplan Functions
 ------------------

Modified: team/seanbright/cdr-syslog/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/seanbright/cdr-syslog/apps/app_chanspy.c?view=diff&rev=203845&r1=203844&r2=203845
==============================================================================
--- team/seanbright/cdr-syslog/apps/app_chanspy.c (original)
+++ team/seanbright/cdr-syslog/apps/app_chanspy.c Fri Jun 26 17:00:41 2009
@@ -134,6 +134,9 @@
 					</option>
 					<option name="o">
 						<para>Only listen to audio coming from this channel.</para>
+					</option>
+					<option name="s">
+						<para>Stop when no more channels are left to spy on.</para>
 					</option>
 					<option name="X">
 						<para>Allow the user to exit ChanSpy to a valid single digit
@@ -266,6 +269,9 @@
 					<option name="o">
 						<para>Only listen to audio coming from this channel.</para>
 					</option>
+					<option name="s">
+						<para>Stop when there are no more extensions left to spy on.</para>
+					</option>
 					<option name="X">
 						<para>Allow the user to exit ChanSpy to a valid single digit
 						numeric extension in the current context or the context
@@ -349,6 +355,7 @@
 	OPTION_DTMF_EXIT         = (1 << 14),	/* Set DTMF to exit, added for DAHDIScan integration */
 	OPTION_DTMF_CYCLE        = (1 << 15),	/* Custom DTMF for cycling next avaliable channel, (default is '*') */
 	OPTION_DAHDI_SCAN        = (1 << 16),	/* Scan groups in DAHDIScan mode */
+	OPTION_STOP              = (1 << 17),
 };
 
 enum {
@@ -373,6 +380,7 @@
 	AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
 	AST_APP_OPTION_ARG('e', OPTION_ENFORCED, OPT_ARG_ENFORCED),
 	AST_APP_OPTION('o', OPTION_READONLY),
+	AST_APP_OPTION('s', OPTION_STOP),
 	AST_APP_OPTION('X', OPTION_EXIT),
 	AST_APP_OPTION('s', OPTION_NOTECH),
 	AST_APP_OPTION_ARG('n', OPTION_NAME, OPT_ARG_NAME),
@@ -956,6 +964,9 @@
 
 		if (res == -1 || ast_check_hangup(chan))
 			break;
+		if (ast_test_flag(flags, OPTION_STOP) && !next_autochan) {
+			break;
+		}
 	}
 exit:
 




More information about the asterisk-commits mailing list