[asterisk-commits] oej: branch oej/videocaps r64186 - in /team/oej/videocaps: ./ apps/ cdr/ chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 14 05:13:23 MST 2007


Author: oej
Date: Mon May 14 07:13:22 2007
New Revision: 64186

URL: http://svn.digium.com/view/asterisk?view=rev&rev=64186
Log:
Reset automerge

Added:
    team/oej/videocaps/configs/res_pgsql.conf.sample
      - copied unchanged from r64158, trunk/configs/res_pgsql.conf.sample
    team/oej/videocaps/contrib/scripts/realtime_pgsql.sql
      - copied unchanged from r64158, trunk/contrib/scripts/realtime_pgsql.sql
    team/oej/videocaps/doc/qos.tex
      - copied unchanged from r64158, trunk/doc/qos.tex
    team/oej/videocaps/include/asterisk/event.h
      - copied unchanged from r64158, trunk/include/asterisk/event.h
    team/oej/videocaps/include/asterisk/event_defs.h
      - copied unchanged from r64158, trunk/include/asterisk/event_defs.h
    team/oej/videocaps/main/event.c
      - copied unchanged from r64158, trunk/main/event.c
    team/oej/videocaps/pbx/ael/ael-test/ael-test20/
      - copied from r64158, trunk/pbx/ael/ael-test/ael-test20/
    team/oej/videocaps/pbx/ael/ael-test/ael-test20/extensions.ael
      - copied unchanged from r64158, trunk/pbx/ael/ael-test/ael-test20/extensions.ael
    team/oej/videocaps/pbx/ael/ael-test/ref.ael-test20
      - copied unchanged from r64158, trunk/pbx/ael/ael-test/ref.ael-test20
    team/oej/videocaps/res/res_eventtest.c
      - copied unchanged from r64158, trunk/res/res_eventtest.c
Removed:
    team/oej/videocaps/doc/ip-tos.tex
Modified:
    team/oej/videocaps/   (props changed)
    team/oej/videocaps/CHANGES
    team/oej/videocaps/CREDITS
    team/oej/videocaps/Makefile
    team/oej/videocaps/UPGRADE.txt
    team/oej/videocaps/apps/app_directory.c
    team/oej/videocaps/apps/app_macro.c
    team/oej/videocaps/apps/app_meetme.c
    team/oej/videocaps/apps/app_minivm.c
    team/oej/videocaps/apps/app_queue.c
    team/oej/videocaps/apps/app_voicemail.c
    team/oej/videocaps/cdr/cdr_radius.c
    team/oej/videocaps/channels/chan_agent.c
    team/oej/videocaps/channels/chan_h323.c
    team/oej/videocaps/channels/chan_iax2.c
    team/oej/videocaps/channels/chan_jingle.c
    team/oej/videocaps/channels/chan_local.c
    team/oej/videocaps/channels/chan_mgcp.c
    team/oej/videocaps/channels/chan_misdn.c
    team/oej/videocaps/channels/chan_sip.c
    team/oej/videocaps/channels/chan_skinny.c
    team/oej/videocaps/channels/chan_zap.c
    team/oej/videocaps/channels/iax2-provision.c
    team/oej/videocaps/channels/iax2.h
    team/oej/videocaps/codecs/codec_zap.c
    team/oej/videocaps/configs/features.conf.sample
    team/oej/videocaps/configs/h323.conf.sample
    team/oej/videocaps/configs/iax.conf.sample
    team/oej/videocaps/configs/iaxprov.conf.sample
    team/oej/videocaps/configs/indications.conf.sample
    team/oej/videocaps/configs/manager.conf.sample
    team/oej/videocaps/configs/mgcp.conf.sample
    team/oej/videocaps/configs/queues.conf.sample
    team/oej/videocaps/configs/say.conf.sample
    team/oej/videocaps/configs/sip.conf.sample
    team/oej/videocaps/configs/skinny.conf.sample
    team/oej/videocaps/configs/voicemail.conf.sample
    team/oej/videocaps/contrib/scripts/safe_asterisk
    team/oej/videocaps/doc/CODING-GUIDELINES
    team/oej/videocaps/doc/ast_appdocs.tex
    team/oej/videocaps/doc/asterisk.tex
    team/oej/videocaps/doc/dundi.tex
    team/oej/videocaps/doc/queuelog.tex
    team/oej/videocaps/funcs/func_enum.c
    team/oej/videocaps/include/asterisk.h
    team/oej/videocaps/include/asterisk/acl.h
    team/oej/videocaps/include/asterisk/app.h
    team/oej/videocaps/include/asterisk/features.h
    team/oej/videocaps/include/asterisk/http.h
    team/oej/videocaps/include/asterisk/lock.h
    team/oej/videocaps/include/asterisk/manager.h
    team/oej/videocaps/include/asterisk/module.h
    team/oej/videocaps/include/asterisk/netsock.h
    team/oej/videocaps/include/asterisk/options.h
    team/oej/videocaps/include/asterisk/rtp.h
    team/oej/videocaps/include/asterisk/udptl.h
    team/oej/videocaps/main/Makefile
    team/oej/videocaps/main/acl.c
    team/oej/videocaps/main/app.c
    team/oej/videocaps/main/asterisk.c
    team/oej/videocaps/main/callerid.c
    team/oej/videocaps/main/cdr.c
    team/oej/videocaps/main/channel.c
    team/oej/videocaps/main/config.c
    team/oej/videocaps/main/dial.c
    team/oej/videocaps/main/file.c
    team/oej/videocaps/main/http.c
    team/oej/videocaps/main/loader.c
    team/oej/videocaps/main/manager.c
    team/oej/videocaps/main/minimime/   (props changed)
    team/oej/videocaps/main/netsock.c
    team/oej/videocaps/main/pbx.c
    team/oej/videocaps/main/rtp.c
    team/oej/videocaps/main/say.c
    team/oej/videocaps/main/udptl.c
    team/oej/videocaps/pbx/ael/ael.tab.c
    team/oej/videocaps/pbx/ael/ael.tab.h
    team/oej/videocaps/pbx/ael/ael.y
    team/oej/videocaps/pbx/pbx_dundi.c
    team/oej/videocaps/res/res_agi.c
    team/oej/videocaps/res/res_config_odbc.c
    team/oej/videocaps/res/res_config_pgsql.c
    team/oej/videocaps/res/res_features.c
    team/oej/videocaps/res/res_jabber.c

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 14 07:13:22 2007
@@ -1,1 +1,1 @@
-/trunk:1-62035
+/trunk:1-64185

Modified: team/oej/videocaps/CHANGES
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/CHANGES?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/CHANGES (original)
+++ team/oej/videocaps/CHANGES Mon May 14 07:13:22 2007
@@ -53,6 +53,10 @@
      registration data, as before.
   * The SIPPEER function have new options for port address, call and pickup groups
   * Added support for T.140 realtime text in SIP/RTP
+  * The "checkmwi" option has been removed from sip.conf, as it is no longer
+     required due to the restructuring of how MWI is handled.  See the descriptions 
+     in this file of the "pollmailboxes" and "pollfreq" options to voicemail.conf 
+     for more information.
 
 IAX2 changes
 ------------
@@ -69,13 +73,60 @@
      done using a global variable or a dialplan function.  Using the SHELL()
      function would allow you to have an external script set the weight for
      each response.
+  * Added two new dialplan functions, DUNDIQUERY and DUNDIRESULT.  These
+     functions will allow you to initiate a DUNDi query from the dialplan,
+     find out how many results there are, and access each one.
 
 Voicemail Changes
 -----------------
   * Added the ability to customize which sound files are used for some of the
      prompts within the Voicemail application by changing them in voicemail.conf
   * Added the ability for the "voicemail show users" CLI command to show users
-    configured by the dynamic realtime configuration method.
+     configured by the dynamic realtime configuration method.
+  * MWI (Message Waiting Indication) handling has been significantly
+     restructured internally to Asterisk.  It is now totally event based
+     instead of polling based.  The voicemail application will notify other
+     modules that have subscribed to MWI events when something in the mailbox
+     changes.
+    This also means that if any other entity outside of Asterisk is changing
+     the contents of mailboxes, then the voicemail application still needs to
+     poll for changes.  Examples of situations that would require this option
+     are web interfaces to voicemail or an email client in the case of using
+     IMAP storage.  So, two new options have been added to voicemail.conf
+     to account for this: "pollmailboxes" and "pollfreq".  See the sample
+     configuration file for details.
+
+Queue changes
+-------------
+  * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and 
+     setqueueentryvar options for each queue, see queues.conf.sample for details.
+  * Added keepstats option to queues.conf which will keep queue
+     statistics during a reload.
+  * setinterfacevar option in queues.conf also now sets a variable
+     called MEMBERNAME which contains the member's name.
+  * Added 'Strategy' field to manager event QueueParams which represents
+     the queue strategy in use. 
+  * Added option to run macro when a queue member is connected to a caller, 
+     see queues.conf.sample for details.
+  * app_queue now has a 'loose' option which is almost exactly like 'strict' except it
+     does not count paused queue members as unavailable.
+  * Added min-announce-frequency option to queues.conf which allows you to control the
+     minimum amount of time between queue announcements for use when the caller's queue
+     position changes frequently.
+  * Added additional information to EXITWITHTIMEOUT and EXITWITHKEY events in the
+     queue log.
+
+MeetMe Changes
+--------------
+  * The 'o' option to provide an optimization has been removed and its functionality 
+     has been enabled by default.
+  * When a conference is created, the UNIQUEID of the channel that caused it to be
+     created is stored.  Then, every channel that joins the conference will have the
+     MEETMEUNIQUEID channel variable set with this ID.  This can be used to relate
+     callers that come and go from long standing conferences.
+  * Added a new application, MeetMeChannelAdmin, which is similar to MeetMeAdmin,
+     except it does operations on a channel by name, instead of number in a conference.
+     This is a very useful feature in combination with the 'X' option to ChanSpy.
 
 Miscellaneous 
 -------------
@@ -97,16 +148,10 @@
      can use --with-cap to specify the path.
   * H323 remote hold notification support added (by NOTIFY message
      and/or H.450 supplementary service)
-  * Added keepstats option to queues.conf which will keep queue
-     statistics during a reload.
   * Added rotatetimestamp option to logger.conf which will use
      the time to name the logger files instead of sequence number.
-  * setinterfacevar option in queues.conf also now sets a variable
-     called MEMBERNAME which contains the member's name.
   * Added Masquerade manager event for when a masquerade happens between
      two channels.
-  * Added 'Strategy' field to manager event QueueParams which represents
-     the queue strategy in use. 
   * From the to-do lists: straighten out the app timeout args:
      Wait() app now really does 0.3 seconds- was truncating arg to an int.
      WaitExten() same as Wait().
@@ -117,14 +162,8 @@
      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds.
   * Added 'C' option to Meetme which causes a caller to continue in the dialplan
      when kicked out.
-  * Added option to run macro when a queue member is connected to a caller, 
-     see queues.conf.sample for details.
-  * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and 
-    setqueueentryvar options for each queue, see queues.conf.sample for details.
   * Brazilian Portuguese (pt-BR) in VM, and say.c was added via patch from cfassoni.
   * CID matching information is now shown when doing 'dialplan show'.
-  * app_queue now has a 'loose' option which is almost exactly like 'strict' except it
-     does not count paused queue members as unavailable.
   * Added maxfiles option to options section of asterisk.conf which allows you to specify
      what Asterisk should set as the maximum number of open files when it loads.
   * Added the jittertargetextra configuration option.
@@ -140,4 +179,17 @@
   * Added a new CDR module, cdr_sqlite3_custom.
   * Added a new realtime configuration module, res_config_sqlite
   * Added a new dialplan application, Bridge, which allows you to bridge the
-    calling channel to any other active channel on the system.
+     calling channel to any other active channel on the system.
+  * Added support for setting the CoS for VLAN traffic (802.1p).  See the sample
+     configuration files for the IP channel drivers.  The new option is "cos".
+     This information is also documented in doc/qos.tex, or the IP Quality of Service
+     section of asterisk.pdf.
+  * The built-in method for doing attended transfers has been updated to
+     include some new options that allow you to have the transferee sent
+     back to the person that did the transfer if the transfer is not successful.
+     See the options "atxferdropcall", "atxferloopdelay", and "atxfercallbackretries"
+     in features.conf.sample.
+  * The device state functionality in the Local channel driver has been updated
+     to indicate INUSE or NOT_INUSE when a Local channel is being used as opposed
+     to just UNKNOWN if the extension exists.
+  * Added support for the Hungarian language for saying numbers, dates, and times.

Modified: team/oej/videocaps/CREDITS
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/CREDITS?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/CREDITS (original)
+++ team/oej/videocaps/CREDITS Mon May 14 07:13:22 2007
@@ -109,7 +109,9 @@
 Simon Lockhart - Porting to Solaris (based on work of Logan ???)	
 	simon at slimey.org
 
-Olle E. Johansson - SIP RFC compliance, documentation and testing, testing, testing
+Olle E. Johansson - SIP RFC compliance, documentation and testing, testing, testing,
+	- MiniVM - the small voicemail system, many documentation updates/corrections
+	and many bug fixes.
 	oej at edvina.net, http://edvina.net
 
 Steve Kann - new jitter buffer for IAX2

Modified: team/oej/videocaps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/Makefile?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/Makefile (original)
+++ team/oej/videocaps/Makefile Mon May 14 07:13:22 2007
@@ -287,7 +287,8 @@
 
 makeopts: configure
 	@echo "****"
-	@echo "**** The configure script must be executed before running '$(MAKE)'."
+	@echo "**** The configure script must be executed before running '$(MAKE)'." 
+	@echo "****               Please run \"./configure\"."
 	@echo "****"
 	@exit 1
 
@@ -426,7 +427,7 @@
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
 	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
 	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
-		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
+		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
 		chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
 	fi
 	$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
@@ -544,6 +545,7 @@
 		echo ";[options]" ; \
 		echo ";internal_timing = yes" ; \
 		echo ";systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues" ; \
+		echo ";autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set" ; \
 		echo "; Changing the following lines may compromise your security." ; \
 		echo ";[files]" ; \
 		echo ";astctlpermissions = 0660" ; \

Modified: team/oej/videocaps/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/UPGRADE.txt?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/UPGRADE.txt (original)
+++ team/oej/videocaps/UPGRADE.txt Mon May 14 07:13:22 2007
@@ -24,13 +24,24 @@
   style' layout introduced in Asterisk 1.4 (and used by the automatic
   sound file installer in the Makefile).
 
-Applications:
+Voicemail:
 
 * The voicemail configuration values 'maxmessage' and 'minmessage' have
   been changed to 'maxsecs' and 'minsecs' to clarify their purpose and
   to make them more distinguishable from 'maxmsgs', which sets folder
   size.  The old variables will continue to work in this version, albeit
   with a deprecation warning.
+* If you use any interface for modifying voicemail aside from the built in
+  dialplan applications, then the option "pollmailboxes" *must* be set in
+  voicemail.conf for message waiting indication (MWI) to work properly.  This
+  is because Voicemail notification is now event based instead of polling
+  based.  The channel drivers are no longer responsible for constantly manually
+  checking mailboxes for changes so that they can send MWI information to users.
+  Examples of situations that would require this option are web interfaces to
+  voicemail or an email client in the case of using IMAP storage.
+
+Applications:
+
 * ChanIsAvail() now has a 't' option, which allows the specified device
   to be queried for state without consulting the channel drivers. This
   performs mostly a 'ChanExists' sort of function.
@@ -50,3 +61,14 @@
   choppiness or the clipping of loud signal peaks.  To increasing the volume
   of voicemail messages, use the 'volgain' option in voicemail.conf
 
+Channel Drivers:
+
+* chan_sip.c: a small upgrade to support the "Record" button on the SNOM360,
+  which sends a sip INFO message with a "Record: on" or "Record: off" 
+  header. If asterisk is set up (via features.conf) to accept "One Touch Monitor"
+  requests (by default, via '*1'), then the user-configured dialpad sequence
+  is generated, and recording can be started and stopped via this button. The
+  file names and formats are all controlled via the normal mechanisms. If the
+  user has not configured the automon feature, the normal "415 Unsupported media type"
+  is returned, and nothing is done.
+

Modified: team/oej/videocaps/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_directory.c?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/apps/app_directory.c (original)
+++ team/oej/videocaps/apps/app_directory.c Mon May 14 07:13:22 2007
@@ -98,7 +98,7 @@
 	void *fdm = MAP_FAILED;
 	SQLHSTMT stmt;
 	char sql[256];
-	char fmt[80]="";
+	char fmt[80]="", empty[10] = "";
 	char *c;
 	SQLLEN colsize;
 	char full_fn[256];
@@ -149,7 +149,7 @@
 				break;
 			}
 
-			res = SQLGetData(stmt, 1, SQL_BINARY, NULL, 0, &colsize);
+			res = SQLGetData(stmt, 1, SQL_BINARY, empty, 0, &colsize);
 			fdlen = colsize;
 			if (fd > -1) {
 				char tmp[1]="";

Modified: team/oej/videocaps/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_macro.c?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/apps/app_macro.c (original)
+++ team/oej/videocaps/apps/app_macro.c Mon May 14 07:13:22 2007
@@ -149,6 +149,7 @@
 	char *macro;
 	char fullmacro[80];
 	char varname[80];
+	char runningapp[80], runningdata[1024];
 	char *oldargs[MAX_ARGS + 1] = { NULL, };
 	int argc, x;
 	int res=0;
@@ -167,9 +168,6 @@
 	char *save_macro_offset;
 	struct ast_module_user *u;
  
-	struct ast_context *c;
-	struct ast_exten *e;
-
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
 		return -1;
@@ -280,13 +278,31 @@
 	autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
 	ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
 	while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
+		struct ast_context *c;
+		struct ast_exten *e;
+
 		/* What application will execute? */
-		for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
-			if (!strcmp(ast_get_context_name(c), chan->context)) {
-				e = find_matching_priority(c, chan->exten, chan->priority, chan->cid.cid_num);
-				break;
-			}
-		}
+		if (ast_rdlock_contexts()) {
+			ast_log(LOG_WARNING, "Failed to lock contexts list\n");
+			e = NULL;
+		} else {
+			for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
+				if (!strcmp(ast_get_context_name(c), chan->context)) {
+					if (ast_rdlock_context(c)) {
+						ast_log(LOG_WARNING, "Unable to lock context?\n");
+						runningapp[0] = '\0';
+						runningdata[0] = '\0';
+					} else {
+						e = find_matching_priority(c, chan->exten, chan->priority, chan->cid.cid_num);
+						ast_copy_string(runningapp, ast_get_extension_app(e), sizeof(runningapp));
+						ast_copy_string(runningdata, ast_get_extension_app_data(e), sizeof(runningdata));
+						ast_unlock_context(c);
+					}
+					break;
+				}
+			}
+		}
+		ast_unlock_contexts();
 
 		/* Reset the macro depth, if it was changed in the last iteration */
 		pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
@@ -321,15 +337,14 @@
 			}
 		}
 
-		ast_log(LOG_DEBUG, "Executed application: %s\n", ast_get_extension_app(e));
-
-		if (e && !strcasecmp(ast_get_extension_app(e), "GOSUB")) {
+		ast_log(LOG_DEBUG, "Executed application: %s\n", runningapp);
+
+		if (!strcasecmp(runningapp, "GOSUB")) {
 			gosub_level++;
 			ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
-		} else if (e && !strcasecmp(ast_get_extension_app(e), "GOSUBIF")) {
-			const char *tmp = ast_get_extension_app_data(e);
+		} else if (!strcasecmp(runningapp, "GOSUBIF")) {
 			char tmp2[1024] = "", *cond, *app, *app2 = tmp2;
-			pbx_substitute_variables_helper(chan, tmp, tmp2, sizeof(tmp2) - 1);
+			pbx_substitute_variables_helper(chan, runningdata, tmp2, sizeof(tmp2) - 1);
 			cond = strsep(&app2, "?");
 			app = strsep(&app2, ":");
 			if (pbx_checkcondition(cond)) {
@@ -343,18 +358,17 @@
 					ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
 				}
 			}
-		} else if (e && !strcasecmp(ast_get_extension_app(e), "RETURN")) {
+		} else if (!strcasecmp(runningapp, "RETURN")) {
 			gosub_level--;
 			ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
-		} else if (e && !strcasecmp(ast_get_extension_app(e), "STACKPOP")) {
+		} else if (!strcasecmp(runningapp, "STACKPOP")) {
 			gosub_level--;
 			ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
-		} else if (e && !strncasecmp(ast_get_extension_app(e), "EXEC", 4)) {
+		} else if (!strncasecmp(runningapp, "EXEC", 4)) {
 			/* Must evaluate args to find actual app */
-			const char *tmp = ast_get_extension_app_data(e);
 			char tmp2[1024] = "", *tmp3 = NULL;
-			pbx_substitute_variables_helper(chan, tmp, tmp2, sizeof(tmp2) - 1);
-			if (!strcasecmp(ast_get_extension_app(e), "EXECIF")) {
+			pbx_substitute_variables_helper(chan, runningdata, tmp2, sizeof(tmp2) - 1);
+			if (!strcasecmp(runningapp, "EXECIF")) {
 				tmp3 = strchr(tmp2, '|');
 				if (tmp3)
 					*tmp3++ = '\0';

Modified: team/oej/videocaps/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_meetme.c?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/apps/app_meetme.c (original)
+++ team/oej/videocaps/apps/app_meetme.c Mon May 14 07:13:22 2007
@@ -145,8 +145,6 @@
 	CONFFLAG_EMPTY = (1 << 18),
 	CONFFLAG_EMPTYNOPIN = (1 << 19),
 	CONFFLAG_ALWAYSPROMPT = (1 << 20),
-	/*! If set, treats talking users as muted users */
-	CONFFLAG_OPTIMIZETALKER = (1 << 21),
 	/*! If set, won't speak the extra prompt when the first person 
 	 *  enters the conference */
 	CONFFLAG_NOONLYPERSON = (1 << 22),
@@ -183,7 +181,6 @@
 	AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ),
 	AST_APP_OPTION('M', CONFFLAG_MOH ),
 	AST_APP_OPTION('m', CONFFLAG_STARTMUTED ),
-	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
 	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
 	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
 	AST_APP_OPTION('q', CONFFLAG_QUIET ),
@@ -201,12 +198,14 @@
 static const char *app = "MeetMe";
 static const char *app2 = "MeetMeCount";
 static const char *app3 = "MeetMeAdmin";
+static const char *app4 = "MeetMeChannelAdmin";
 static const char *slastation_app = "SLAStation";
 static const char *slatrunk_app = "SLATrunk";
 
 static const char *synopsis = "MeetMe conference bridge";
 static const char *synopsis2 = "MeetMe participant count";
 static const char *synopsis3 = "MeetMe conference Administration";
+static const char *synopsis4 = "MeetMe conference Administration (channel specific)";
 static const char *slastation_synopsis = "Shared Line Appearance Station";
 static const char *slatrunk_synopsis = "Shared Line Appearance Trunk";
 
@@ -290,6 +289,14 @@
 "      'V' -- Raise entire conference listening volume\n"
 "";
 
+static const char *descrip4 = 
+"  MeetMeChannelAdmin(channel|command): Run admin command for a specific\n"
+"channel in any coference.\n"
+"      'k' -- Kick the specified user out of the conference he is in\n"
+"      'm' -- Unmute the specified user\n"
+"      'M' -- Mute the specified user\n"
+"";
+
 static const char *slastation_desc =
 "  SLAStation():\n";
 
@@ -321,6 +328,7 @@
 	const char *recordingformat;            /*!< Format to record the Conference in */
 	char pin[MAX_PIN];                      /*!< If protected by a PIN */
 	char pinadmin[MAX_PIN];                 /*!< If protected by a admin PIN */
+	char uniqueid[32];
 	struct ast_frame *transframe[32];
 	struct ast_frame *origframe;
 	struct ast_trans_pvt *transpath[32];
@@ -721,7 +729,7 @@
  * \return A pointer to the conference struct, or NULL if it wasn't found and
  *         make or dynamic were not set.
  */
-static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
+static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount, const struct ast_channel *chan)
 {
 	struct ast_conference *cnf;
 	struct zt_confinfo ztc = { 0, };
@@ -746,6 +754,7 @@
 	ast_copy_string(cnf->confno, confno, sizeof(cnf->confno));
 	ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
 	ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
+	ast_copy_string(cnf->uniqueid, chan->uniqueid, sizeof(cnf->uniqueid));
 	cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
 	if (cnf->chan) {
 		ast_set_read_format(cnf->chan, AST_FORMAT_SLINEAR);
@@ -1462,6 +1471,9 @@
 
 	ast_mutex_unlock(&conf->playlock);
 
+	/* return the unique ID of the conference */
+	pbx_builtin_setvar_helper(chan, "MEETMEUNIQUEID", conf->uniqueid);
+
 	if (confflags & CONFFLAG_EXIT_CONTEXT) {
 		if ((agifile = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT"))) 
 			ast_copy_string(exitcontext, agifile, sizeof(exitcontext));
@@ -1694,7 +1706,7 @@
 			x = 1;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}	
-		if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER) && !(dsp = ast_dsp_new())) {
+		if (!(dsp = ast_dsp_new())) {
 			ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
 			res = -1;
 		}
@@ -1893,7 +1905,7 @@
 					if (user->talk.actual)
 						ast_frame_adjust_volume(f, user->talk.actual);
 
-					if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER)) {
+					{
 						int totalsilence;
 
 						if (user->talking == -1)
@@ -1936,7 +1948,7 @@
 						   don't want to block, but we do want to at least *try*
 						   to write out all the samples.
 						 */
-						if (user->talking || !(confflags & CONFFLAG_OPTIMIZETALKER))
+						if (user->talking)
 							careful_write(fd, f->data, f->datalen, 0);
 					}
 				} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
@@ -2138,11 +2150,10 @@
 					fr.samples = res/2;
 					fr.data = buf;
 					fr.offset = AST_FRIENDLY_OFFSET;
-					if (!user->listen.actual && 
+					if ( !user->listen.actual && 
 						((confflags & CONFFLAG_MONITOR) || 
 						 (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) ||
-						 (!user->talking && (confflags & CONFFLAG_OPTIMIZETALKER))
-						 )) {
+						 (!user->talking)) ) {
 						int index;
 						for (index=0;index<AST_FRAME_BITS;index++)
 							if (chan->rawwriteformat & (1 << index))
@@ -2306,7 +2317,7 @@
 		}
 		ast_variables_destroy(var);
 		
-		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
+		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan);
 	}
 
 	if (cnf) {
@@ -2363,9 +2374,9 @@
 					if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, pin_buf_len - 1, 0) < 0)
 						return NULL;
 				}
-				cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount);
+				cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan);
 			} else {
-				cnf = build_conf(confno, "", "", make, dynamic, refcount);
+				cnf = build_conf(confno, "", "", make, dynamic, refcount, chan);
 			}
 		} else {
 			/* Check the config */
@@ -2387,7 +2398,7 @@
 					cnf = build_conf(args.confno,
 							S_OR(args.pin, ""),
 							S_OR(args.pinadmin, ""),
-							make, dynamic, refcount);
+							make, dynamic, refcount, chan);
 					break;
 				}
 			}
@@ -2757,17 +2768,16 @@
 
 	u = ast_module_user_add(chan);
 
-	AST_LIST_LOCK(&confs);
-	
 	params = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, params);
 
 	if (!args.command) {
 		ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
-		AST_LIST_UNLOCK(&confs);
 		ast_module_user_remove(u);
 		return -1;
 	}
+
+	AST_LIST_LOCK(&confs);
 	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		if (!strcmp(cnf->confno, args.confno))
 			break;
@@ -2892,6 +2902,78 @@
 	return 0;
 }
 
+/*--- channel_admin_exec: The MeetMeChannelAdmin application */
+/* MeetMeChannelAdmin(channel, command) */
+static int channel_admin_exec(struct ast_channel *chan, void *data) {
+	char *params;
+	struct ast_conference *conf = NULL;
+	struct ast_conf_user *user = NULL;
+	struct ast_module_user *u;
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(channel);
+		AST_APP_ARG(command);
+	);
+
+	if (ast_strlen_zero(data)) {
+		ast_log(LOG_WARNING, "MeetMeChannelAdmin requires two arguments!\n");
+		return -1;
+	}
+	
+	u = ast_module_user_add(chan);
+
+	params = ast_strdupa(data);
+	AST_STANDARD_APP_ARGS(args, params);
+
+	if (!args.channel) {
+		ast_log(LOG_WARNING, "MeetMeChannelAdmin requires a channel name!\n");
+		ast_module_user_remove(u);
+		return -1;
+	}
+
+	if (!args.command) {
+		ast_log(LOG_WARNING, "MeetMeChannelAdmin requires a command!\n");
+		ast_module_user_remove(u);
+		return -1;
+	}
+
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, conf, list) {
+		AST_LIST_TRAVERSE(&conf->userlist, user, list) {
+			if (!strcmp(user->chan->name, args.channel))
+				break;
+		}
+	}
+	
+	if (!user) {
+		ast_log(LOG_NOTICE, "Specified user (%s) not found\n", args.channel);
+		AST_LIST_UNLOCK(&confs);
+		ast_module_user_remove(u);
+		return 0;
+	}
+	
+	/* perform the specified action */
+	switch (*args.command) {
+		case 77: /* M: Mute */ 
+			user->adminflags |= ADMINFLAG_MUTED;
+			break;
+		case 109: /* m: Unmute */ 
+			user->adminflags &= ~ADMINFLAG_MUTED;
+			break;
+		case 107: /* k: Kick user */ 
+			user->adminflags |= ADMINFLAG_KICKME;
+			break;
+		default: /* unknown command */
+			ast_log(LOG_WARNING, "Unknown MeetMeChannelAdmin command '%s'\n", args.command);
+			break;
+	}
+
+	AST_LIST_UNLOCK(&confs);
+
+	ast_module_user_remove(u);
+	
+	return 0;
+}
+
 static int meetmemute(struct mansession *s, const struct message *m, int mute)
 {
 	struct ast_conference *conf;
@@ -3232,7 +3314,7 @@
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
 	ast_answer(trunk_ref->chan);
-	conf = build_conf(conf_name, "", "", 0, 0, 1);
+	conf = build_conf(conf_name, "", "", 0, 0, 1, trunk_ref->chan);
 	if (conf) {
 		conf_run(trunk_ref->chan, conf, conf_flags.flags, NULL);
 		dispose_conf(conf);
@@ -4050,7 +4132,7 @@
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER | 
 		CONFFLAG_PASS_DTMF | CONFFLAG_SLA_TRUNK);
-	conf = build_conf(conf_name, "", "", 1, 1, 1);
+	conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan);
 
 	ast_mutex_lock(args->cond_lock);
 	ast_cond_signal(args->cond);
@@ -4199,7 +4281,7 @@
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
 	ast_answer(chan);
-	conf = build_conf(conf_name, "", "", 0, 0, 1);
+	conf = build_conf(conf_name, "", "", 0, 0, 1, chan);
 	if (conf) {
 		conf_run(chan, conf, conf_flags.flags, NULL);
 		dispose_conf(conf);
@@ -4285,7 +4367,7 @@
 	}
 
 	snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_name);
-	conf = build_conf(conf_name, "", "", 1, 1, 1);
+	conf = build_conf(conf_name, "", "", 1, 1, 1, chan);
 	if (!conf) {
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
 		return 0;
@@ -4756,6 +4838,7 @@
 	ast_cli_unregister_multiple(cli_meetme, ARRAY_LEN(cli_meetme));
 	res = ast_manager_unregister("MeetmeMute");
 	res |= ast_manager_unregister("MeetmeUnmute");
+	res |= ast_unregister_application(app4);
 	res |= ast_unregister_application(app3);
 	res |= ast_unregister_application(app2);
 	res |= ast_unregister_application(app);
@@ -4783,6 +4866,7 @@
 				    action_meetmemute, "Mute a Meetme user");
 	res |= ast_manager_register("MeetmeUnmute", EVENT_FLAG_CALL, 
 				    action_meetmeunmute, "Unmute a Meetme user");
+	res |= ast_register_application(app4, channel_admin_exec, synopsis4, descrip4);
 	res |= ast_register_application(app3, admin_exec, synopsis3, descrip3);
 	res |= ast_register_application(app2, count_exec, synopsis2, descrip2);
 	res |= ast_register_application(app, conf_exec, synopsis, descrip);

Modified: team/oej/videocaps/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_minivm.c?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/apps/app_minivm.c (original)
+++ team/oej/videocaps/apps/app_minivm.c Mon May 14 07:13:22 2007
@@ -2283,6 +2283,9 @@
 static void timezone_destroy_list(void)
 {
 	struct minivm_zone *this;
+
+	if (AST_LIST_EMPTY(&minivm_zones))
+		return;
 	AST_LIST_LOCK(&minivm_zones);
 	while ((this = AST_LIST_REMOVE_HEAD(&minivm_zones, list))) 
 		free(this);

Modified: team/oej/videocaps/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_queue.c?view=diff&rev=64186&r1=64185&r2=64186
==============================================================================
--- team/oej/videocaps/apps/app_queue.c (original)
+++ team/oej/videocaps/apps/app_queue.c Mon May 14 07:13:22 2007
@@ -116,6 +116,8 @@
 #define DEFAULT_TIMEOUT		15
 #define RECHECK			1		/* Recheck every second to see we we're at the top yet */
 #define MAX_PERIODIC_ANNOUNCEMENTS 10 /* The maximum periodic announcements we can have */
+#define DEFAULT_MIN_ANNOUNCE_FREQUENCY 15 /* The minimum number of seconds between position announcements
+                                             The default value of 15 provides backwards compatibility */
 
 #define	RES_OKAY	0		/* Action completed */
 #define	RES_EXISTS	(-1)		/* Entry already exists */
@@ -366,6 +368,7 @@
 	unsigned int maskmemberstatus:1;
 	unsigned int realtime:1;
 	int announcefrequency;              /*!< How often to announce their position */
+	int minannouncefrequency;           /*!< The minimum number of seconds between position announcements (def. 15) */
 	int periodicannouncefrequency;      /*!< How often to play periodic announcement */
 	int roundingseconds;                /*!< How many seconds do we round to? */
 	int holdtime;                       /*!< Current avg holdtime, based on recursive boxcar filter */
@@ -673,6 +676,7 @@
 	q->timeout = -1;
 	q->maxlen = 0;
 	q->announcefrequency = 0;
+	q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
 	q->announceholdtime = 0;
 	q->roundingseconds = 0; /* Default - don't announce seconds */
 	q->servicelevel = 0;
@@ -847,6 +851,9 @@
 		ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold));
 	} else if (!strcasecmp(param, "announce-frequency")) {
 		q->announcefrequency = atoi(val);
+	} else if (!strcasecmp(param, "min-announce-frequency")) {
+		q->minannouncefrequency = atoi(val);
+		ast_log(LOG_DEBUG, "%s=%s for queue '%s'\n", param, val, q->name);
 	} else if (!strcasecmp(param, "announce-round-seconds")) {
 		q->roundingseconds = atoi(val);
 		if (q->roundingseconds>60 || q->roundingseconds<0) {
@@ -1308,9 +1315,9 @@
 	int res = 0, avgholdmins, avgholdsecs;
 	time_t now;
 
-	/* Check to see if this is ludicrous -- if we just announced position, don't do it again*/
+	/* Let minannouncefrequency seconds pass between the start of each position announcement */
 	time(&now);
-	if ((now - qe->last_pos) < 15)
+	if ((now - qe->last_pos) < qe->parent->minannouncefrequency)
 		return 0;
 
 	/* If either our position has changed, or we are over the freq timer, say position */
@@ -2051,7 +2058,7 @@
 							if (in->cdr)
 								ast_cdr_busy(in->cdr);
 							do_hang(o);
-							endtime = (long)time(NULL);
+							endtime = (long) time(NULL);
 							endtime -= starttime;
 							rna(endtime*1000, qe, on, membername);
 							if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
@@ -2066,7 +2073,7 @@
 								ast_verbose( VERBOSE_PREFIX_3 "%s is circuit-busy\n", o->chan->name);
 							if (in->cdr)
 								ast_cdr_busy(in->cdr);
-							endtime = (long)time(NULL);
+							endtime = (long) time(NULL);
 							endtime -= starttime;
 							rna(endtime*1000, qe, on, membername);
 							do_hang(o);
@@ -2231,7 +2238,7 @@
 		/* leave the queue if no agents, if enabled */
 		if (qe->parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
 			*reason = QUEUE_LEAVEEMPTY;
-			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start);
+			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
 			break;
 		}
@@ -2239,13 +2246,13 @@
 		/* leave the queue if no reachable agents, if enabled */
 		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
 			*reason = QUEUE_LEAVEUNAVAIL;
-			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start);
+			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
 			break;
 		}
 		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
 			*reason = QUEUE_LEAVEUNAVAIL;
-			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start);
+			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
 			break;
 		}
@@ -2575,7 +2582,7 @@
 			} else if (res2) {
 				/* Caller must have hung up just before being connected*/
 				ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", peer->name);
-				ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start);
+				ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 				record_abandoned(qe);
 				ast_hangup(peer);
 				return -1;
@@ -2706,7 +2713,7 @@

[... 8778 lines stripped ...]


More information about the asterisk-commits mailing list