[asterisk-commits] russell: branch russell/chan_refcount r89503 - in /team/russell/chan_refcount...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 21 13:58:05 CST 2007
Author: russell
Date: Wed Nov 21 13:58:04 2007
New Revision: 89503
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89503
Log:
sync up to 89250
Removed:
team/russell/chan_refcount/configs/cdr_sqlite3_custom.conf
Modified:
team/russell/chan_refcount/ (props changed)
team/russell/chan_refcount/CHANGES
team/russell/chan_refcount/Makefile
team/russell/chan_refcount/apps/app_amd.c
team/russell/chan_refcount/apps/app_chanisavail.c
team/russell/chan_refcount/apps/app_chanspy.c
team/russell/chan_refcount/apps/app_directed_pickup.c
team/russell/chan_refcount/apps/app_exec.c
team/russell/chan_refcount/apps/app_festival.c
team/russell/chan_refcount/apps/app_followme.c
team/russell/chan_refcount/apps/app_forkcdr.c
team/russell/chan_refcount/apps/app_getcpeid.c
team/russell/chan_refcount/apps/app_macro.c
team/russell/chan_refcount/apps/app_meetme.c
team/russell/chan_refcount/apps/app_minivm.c
team/russell/chan_refcount/apps/app_mixmonitor.c
team/russell/chan_refcount/apps/app_morsecode.c
team/russell/chan_refcount/apps/app_mp3.c
team/russell/chan_refcount/apps/app_nbscat.c
team/russell/chan_refcount/apps/app_playback.c
team/russell/chan_refcount/apps/app_queue.c
team/russell/chan_refcount/apps/app_readfile.c
team/russell/chan_refcount/apps/app_sayunixtime.c
team/russell/chan_refcount/apps/app_sms.c
team/russell/chan_refcount/apps/app_softhangup.c
team/russell/chan_refcount/apps/app_speech_utils.c
team/russell/chan_refcount/apps/app_stack.c
team/russell/chan_refcount/apps/app_test.c
team/russell/chan_refcount/apps/app_voicemail.c
team/russell/chan_refcount/apps/app_waitforring.c
team/russell/chan_refcount/apps/app_waitforsilence.c
team/russell/chan_refcount/apps/app_while.c
team/russell/chan_refcount/cdr/cdr_manager.c
team/russell/chan_refcount/cdr/cdr_sqlite3_custom.c
team/russell/chan_refcount/cdr/cdr_tds.c
team/russell/chan_refcount/channels/chan_agent.c
team/russell/chan_refcount/channels/chan_features.c
team/russell/chan_refcount/channels/chan_gtalk.c
team/russell/chan_refcount/channels/chan_h323.c
team/russell/chan_refcount/channels/chan_iax2.c
team/russell/chan_refcount/channels/chan_jingle.c
team/russell/chan_refcount/channels/chan_mgcp.c
team/russell/chan_refcount/channels/chan_misdn.c
team/russell/chan_refcount/channels/chan_phone.c
team/russell/chan_refcount/channels/chan_sip.c
team/russell/chan_refcount/channels/chan_skinny.c
team/russell/chan_refcount/channels/chan_zap.c
team/russell/chan_refcount/channels/h323/ast_h323.cxx
team/russell/chan_refcount/channels/iax2-parser.c
team/russell/chan_refcount/channels/misdn/chan_misdn_config.h
team/russell/chan_refcount/channels/misdn/isdn_lib.c
team/russell/chan_refcount/channels/misdn/isdn_lib.h
team/russell/chan_refcount/channels/misdn/isdn_lib_intern.h
team/russell/chan_refcount/channels/misdn/isdn_msg_parser.c
team/russell/chan_refcount/channels/misdn_config.c
team/russell/chan_refcount/codecs/codec_g722.c
team/russell/chan_refcount/codecs/codec_zap.c
team/russell/chan_refcount/configs/cdr_adaptive_odbc.conf.sample
team/russell/chan_refcount/configs/extensions.ael.sample
team/russell/chan_refcount/configs/misdn.conf.sample
team/russell/chan_refcount/configs/queues.conf.sample
team/russell/chan_refcount/configs/res_odbc.conf.sample
team/russell/chan_refcount/configs/zapata.conf.sample
team/russell/chan_refcount/doc/tex/channelvariables.tex
team/russell/chan_refcount/doc/tex/imapstorage.tex
team/russell/chan_refcount/funcs/func_env.c
team/russell/chan_refcount/funcs/func_logic.c
team/russell/chan_refcount/funcs/func_strings.c
team/russell/chan_refcount/include/asterisk/agi.h
team/russell/chan_refcount/include/asterisk/cli.h
team/russell/chan_refcount/include/asterisk/config.h
team/russell/chan_refcount/include/asterisk/frame.h
team/russell/chan_refcount/include/asterisk/jabber.h
team/russell/chan_refcount/include/asterisk/linkedlists.h
team/russell/chan_refcount/include/asterisk/lock.h
team/russell/chan_refcount/include/asterisk/pbx.h
team/russell/chan_refcount/include/asterisk/stringfields.h
team/russell/chan_refcount/include/asterisk/tdd.h
team/russell/chan_refcount/include/asterisk/translate.h
team/russell/chan_refcount/main/Makefile
team/russell/chan_refcount/main/app.c
team/russell/chan_refcount/main/ast_expr2.fl
team/russell/chan_refcount/main/ast_expr2f.c
team/russell/chan_refcount/main/asterisk.c
team/russell/chan_refcount/main/astmm.c
team/russell/chan_refcount/main/astobj2.c
team/russell/chan_refcount/main/audiohook.c
team/russell/chan_refcount/main/autoservice.c
team/russell/chan_refcount/main/cdr.c
team/russell/chan_refcount/main/channel.c
team/russell/chan_refcount/main/cli.c
team/russell/chan_refcount/main/config.c
team/russell/chan_refcount/main/devicestate.c
team/russell/chan_refcount/main/event.c
team/russell/chan_refcount/main/file.c
team/russell/chan_refcount/main/frame.c
team/russell/chan_refcount/main/fskmodem.c
team/russell/chan_refcount/main/image.c
team/russell/chan_refcount/main/indications.c
team/russell/chan_refcount/main/loader.c
team/russell/chan_refcount/main/logger.c
team/russell/chan_refcount/main/manager.c
team/russell/chan_refcount/main/pbx.c
team/russell/chan_refcount/main/rtp.c
team/russell/chan_refcount/main/say.c
team/russell/chan_refcount/main/sched.c
team/russell/chan_refcount/main/srv.c
team/russell/chan_refcount/main/tdd.c
team/russell/chan_refcount/main/threadstorage.c
team/russell/chan_refcount/main/translate.c
team/russell/chan_refcount/main/utils.c
team/russell/chan_refcount/pbx/pbx_ael.c
team/russell/chan_refcount/pbx/pbx_dundi.c
team/russell/chan_refcount/pbx/pbx_realtime.c
team/russell/chan_refcount/res/ael/pval.c
team/russell/chan_refcount/res/res_agi.c
team/russell/chan_refcount/res/res_clioriginate.c
team/russell/chan_refcount/res/res_config_sqlite.c
team/russell/chan_refcount/res/res_convert.c
team/russell/chan_refcount/res/res_crypto.c
team/russell/chan_refcount/res/res_features.c
team/russell/chan_refcount/res/res_indications.c
team/russell/chan_refcount/res/res_jabber.c
team/russell/chan_refcount/res/res_monitor.c
team/russell/chan_refcount/res/res_musiconhold.c
team/russell/chan_refcount/res/res_odbc.c
team/russell/chan_refcount/res/res_smdi.c
team/russell/chan_refcount/res/res_speech.c
team/russell/chan_refcount/utils/Makefile
team/russell/chan_refcount/utils/astman.c
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 21 13:58:04 2007
@@ -1,1 +1,1 @@
-/trunk:1-89000
+/trunk:1-89250
Modified: team/russell/chan_refcount/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/CHANGES?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/CHANGES (original)
+++ team/russell/chan_refcount/CHANGES Wed Nov 21 13:58:04 2007
@@ -166,6 +166,7 @@
queue log.
* Added ability for non-realtime queues to have realtime members
* Added the "linear" strategy to queues.
+ * Added the "wrandom" strategy to queues.
MeetMe Changes
--------------
@@ -185,6 +186,14 @@
the schedule start time, or to allow the caller to join the conference early.
Also included is optional support for limiting the number of callers per
RealTime conference.
+ * Added the S() and L() options to the MeetMe application. These are pretty
+ much identical to the S() and L() options to Dial(). They let you set
+ timeouts for the conference, as well as have warning sounds played to
+ let the caller know how much time is left, and when it is running out.
+ * Added the ability to do "meetme concise" with the "meetme" CLI command.
+ This extends the concise capabilities of this CLI command to include
+ listing all conferences, instead of an addition to the other sub commands
+ for the "meetme" command.
Music On Hold Changes
---------------------
@@ -246,6 +255,9 @@
features.conf. This means that features can be written a single time, and
then mapped into groups of features for different key mappings or easier
access control.
+ * Updated the ParkedCall application to allow you to not specify a parking
+ extension. If you don't specify a parking space to pick up, it will grab
+ the first one available.
Language Support Changes
------------------------
@@ -307,4 +319,6 @@
configs/extensions.lua.sample for examples of how to do this.
* Added a new channel driver, chan_unistim. See doc/unistim.txt and
configs/unistim.conf.sample for details. This new channel driver allows
- you to use Nortel i2002, i2004, and i2050 phones with Asterisk.
+ you to use Nortel i2002, i2004, and i2050 phones with Asterisk.
+ * Enhanced "agi debug" to print the channel name as a prefix to the debug
+ output to make debugging on busy systems much easier.
Modified: team/russell/chan_refcount/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/Makefile?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/Makefile (original)
+++ team/russell/chan_refcount/Makefile Wed Nov 21 13:58:04 2007
@@ -338,14 +338,10 @@
main: $(filter-out main,$(MOD_SUBDIRS))
$(MOD_SUBDIRS):
- @echo " [enter MOD_SUBDIR $@/]"
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
- @echo " [exit MOD_SUBDIR $@/]"
$(OTHER_SUBDIRS):
- @echo " [enter SUBDIR $@/]"
@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
- @echo " [exit SUBDIR $@/]"
defaults.h: makeopts
@build_tools/make_defaults_h > $@.tmp
@@ -749,11 +745,15 @@
gmenuselect: menuselect/gmenuselect menuselect-tree
- at menuselect/gmenuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
-menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
+menuselect/menuselect: menuselect/makeopts
+ echo "doing menuselect with $(HOST_CC)"
@CC="$(HOST_CC)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
-menuselect/gmenuselect: makeopts menuselect/menuselect.c menuselect/menuselect_gtk.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
- @CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect _gmenuselect CONFIGURE_SILENT="--silent"
+menuselect/gmenuselect: menuselect/makeopts
+ @CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect gmenuselect CONFIGURE_SILENT="--silent"
+
+menuselect/makeopts:
+ @CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect makeopts CONFIGURE_SILENT="--silent"
menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml configure
@echo "Generating input for menuselect ..."
Modified: team/russell/chan_refcount/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_amd.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_amd.c (original)
+++ team/russell/chan_refcount/apps/app_amd.c Wed Nov 21 13:58:04 2007
@@ -69,7 +69,7 @@
"- 'maximumNumberOfWords'is the maximum number of words in the greeting. \n"
" If exceeded then MACHINE.\n"
"- 'silenceThreshold' is the silence threshold.\n"
-"This application sets the following channel variable upon completion:\n"
+"This application sets the following channel variables upon completion:\n"
" AMDSTATUS - This is the status of the answering machine detection.\n"
" Possible values are:\n"
" MACHINE | HUMAN | NOTSURE | HANGUP\n"
Modified: team/russell/chan_refcount/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_chanisavail.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_chanisavail.c (original)
+++ team/russell/chan_refcount/apps/app_chanisavail.c Wed Nov 21 13:58:04 2007
@@ -55,14 +55,15 @@
static char *descrip =
" ChanIsAvail(Technology/resource[&Technology2/resource2...][,options]): \n"
"This application will check to see if any of the specified channels are\n"
-"available. The following variables will be set by this application:\n"
-" ${AVAILCHAN} - the name of the available channel, if one exists\n"
-" ${AVAILORIGCHAN} - the canonical channel name that was used to create the channel\n"
-" ${AVAILSTATUS} - the status code for the available channel\n"
+"available.\n"
" Options:\n"
-" s - Consider the channel unavailable if the channel is in use at all\n"
+" s - Consider the channel unavailable if the channel is in use at all.\n"
" t - Simply checks if specified channels exist in the channel list\n"
-" (implies option s) \n";
+" (implies option s).\n"
+"This application sets the following channel variable upon completion:\n"
+" AVAILCHAN - the name of the available channel, if one exists\n"
+" AVAILORIGCHAN - the canonical channel name that was used to create the channel\n"
+" AVAILSTATUS - the status code for the available channel\n";
static int chanavail_exec(struct ast_channel *chan, void *data)
Modified: team/russell/chan_refcount/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_chanspy.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_chanspy.c (original)
+++ team/russell/chan_refcount/apps/app_chanspy.c Wed Nov 21 13:58:04 2007
@@ -73,7 +73,7 @@
" and a digit sequence.\n"
" Options:\n"
" b - Only spy on channels involved in a bridged call.\n"
-" g(grp) - Match only channels where their ${SPYGROUP} variable is set to\n"
+" g(grp) - Match only channels where their SPYGROUP variable is set to\n"
" contain 'grp' in an optional : delimited list.\n"
" q - Don't play a beep when beginning to spy on a channel, or speak the\n"
" selected channel name.\n"
Modified: team/russell/chan_refcount/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_directed_pickup.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_directed_pickup.c (original)
+++ team/russell/chan_refcount/apps/app_directed_pickup.c Wed Nov 21 13:58:04 2007
@@ -49,7 +49,7 @@
static const char *app = "Pickup";
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
-" Pickup([extension[@context][&extension2 at context...]]): This application can\n"
+" Pickup([extension[@context][&extension2@[context]...]]): This application can\n"
"pickup any ringing channel that is calling the specified extension. If no\n"
"context is specified, the current context will be used. If you use the special\n"
"string \"PICKUPMARK\" for the context parameter, for example 10 at PICKUPMARK,\n"
Modified: team/russell/chan_refcount/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_exec.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_exec.c (original)
+++ team/russell/chan_refcount/apps/app_exec.c Wed Nov 21 13:58:04 2007
@@ -61,8 +61,8 @@
static char *app_exec = "Exec";
static char *exec_synopsis = "Executes dialplan application";
static char *exec_descrip =
-"Usage: Exec(appname(arguments))\n"
-" Allows an arbitrary application to be invoked even when not\n"
+" Exec(appname(arguments)):\n"
+"Allows an arbitrary application to be invoked even when not\n"
"hardcoded into the dialplan. If the underlying application\n"
"terminates the dialplan, or if the application cannot be found,\n"
"Exec will terminate the dialplan.\n"
@@ -72,11 +72,11 @@
static char *app_tryexec = "TryExec";
static char *tryexec_synopsis = "Executes dialplan application, always returning";
static char *tryexec_descrip =
-"Usage: TryExec(appname(arguments))\n"
-" Allows an arbitrary application to be invoked even when not\n"
+" TryExec(appname(arguments)):\n"
+"Allows an arbitrary application to be invoked even when not\n"
"hardcoded into the dialplan. To invoke external applications\n"
"see the application System. Always returns to the dialplan.\n"
-"The channel variable TRYSTATUS will be set to:\n"
+"The channel variable TRYSTATUS will be set to one of:\n"
" SUCCESS if the application returned zero\n"
" FAILED if the application returned non-zero\n"
" NOAPP if the application was not found or was not specified\n";
@@ -84,7 +84,7 @@
static char *app_execif = "ExecIf";
static char *execif_synopsis = "Executes dialplan application, conditionally";
static char *execif_descrip =
-"Usage: ExecIF (<expr>?<app>(<data>):<app2>(<data2>))\n"
+" ExecIF (<expr>?<app>(<data>):<app2>(<data2>))\n"
"If <expr> is true, execute and return the result of <app>(<data>).\n"
"If <expr> is true, but <app> is not found, then the application\n"
"will return a non-zero value.\n";
@@ -99,6 +99,7 @@
return 0;
s = ast_strdupa(data);
+ args[0] = 0;
appname = strsep(&s, "(");
if (s) {
endargs = strrchr(s, ')');
@@ -129,6 +130,7 @@
return 0;
s = ast_strdupa(data);
+ args[0] = 0;
appname = strsep(&s, "(");
if (s) {
endargs = strrchr(s, ')');
Modified: team/russell/chan_refcount/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_festival.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_festival.c (original)
+++ team/russell/chan_refcount/apps/app_festival.c Wed Nov 21 13:58:04 2007
@@ -66,7 +66,7 @@
static char *synopsis = "Say text to the user";
static char *descrip =
-" Festival(text[,intkeys]): Connect to Festival, send the argument, get back the waveform,"
+" Festival(text[,intkeys]): Connect to Festival, send the argument, get back the waveform,\n"
"play it to the user, allowing any given interrupt keys to immediately terminate and return\n"
"the value, or 'any' to allow any number back (useful in dialplan)\n";
Modified: team/russell/chan_refcount/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_followme.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_followme.c (original)
+++ team/russell/chan_refcount/apps/app_followme.c Wed Nov 21 13:58:04 2007
@@ -61,7 +61,7 @@
static char *app = "FollowMe";
static char *synopsis = "Find-Me/Follow-Me application";
static char *descrip =
-" FollowMe(followmeid,options):\n"
+" FollowMe(followmeid[,options]):\n"
"This application performs Find-Me/Follow-Me functionality for the caller\n"
"as defined in the profile matching the <followmeid> parameter in\n"
"followme.conf. If the specified <followmeid> profile doesn't exist in\n"
@@ -840,13 +840,12 @@
winner = wait_for_winner(findme_user_list, nm, caller, tpargs->namerecloc, &status, tpargs);
- AST_LIST_TRAVERSE_SAFE_BEGIN(findme_user_list, fmuser, entry) {
+ while ((fmuser = AST_LIST_REMOVE_HEAD(findme_user_list, entry))) {
if (!fmuser->cleared && fmuser->ochan != winner)
clear_caller(fmuser);
- AST_LIST_REMOVE_CURRENT(findme_user_list, entry);
ast_free(fmuser);
}
- AST_LIST_TRAVERSE_SAFE_END
+
fmuser = NULL;
tmpuser = NULL;
headuser = NULL;
@@ -978,11 +977,8 @@
findmeexec(&targs);
- AST_LIST_TRAVERSE_SAFE_BEGIN(&targs.cnumbers, nm, entry) {
- AST_LIST_REMOVE_CURRENT(&targs.cnumbers, entry);
+ while ((nm = AST_LIST_REMOVE_HEAD(&targs.cnumbers, entry)))
ast_free(nm);
- }
- AST_LIST_TRAVERSE_SAFE_END
if (!ast_strlen_zero(namerecloc))
unlink(namerecloc);
Modified: team/russell/chan_refcount/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_forkcdr.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_forkcdr.c (original)
+++ team/russell/chan_refcount/apps/app_forkcdr.c Wed Nov 21 13:58:04 2007
@@ -47,8 +47,9 @@
"Forks the Call Data Record";
static char *descrip =
" ForkCDR([options]): Causes the Call Data Record to fork an additional\n"
- "cdr record starting from the time of the fork call\n"
-"If the option 'v' is passed all cdr variables will be passed along also.\n";
+"cdr record starting from the time of the fork call\n"
+" Options:\n"
+" v - If the option is passed all cdr variables will be passed along also.\n";
static void ast_cdr_fork(struct ast_channel *chan)
Modified: team/russell/chan_refcount/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_getcpeid.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_getcpeid.c (original)
+++ team/russell/chan_refcount/apps/app_getcpeid.c Wed Nov 21 13:58:04 2007
@@ -48,7 +48,7 @@
static char *synopsis = "Get ADSI CPE ID";
static char *descrip =
-" GetCPEID: Obtains and displays ADSI CPE ID and other information in order\n"
+" GetCPEID(): Obtains and displays ADSI CPE ID and other information in order\n"
"to properly setup zapata.conf for on-hook operations.\n";
Modified: team/russell/chan_refcount/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_macro.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_macro.c (original)
+++ team/russell/chan_refcount/apps/app_macro.c Wed Nov 21 13:58:04 2007
@@ -79,7 +79,7 @@
" MacroIf(<expr>?macroname_a[,arg1][:macroname_b[,arg1]])\n"
"Executes macro defined in <macroname_a> if <expr> is true\n"
"(otherwise <macroname_b> if provided)\n"
-"Arguments and return values as in application macro()\n";
+"Arguments and return values as in application Macro()\n";
static char *exclusive_descrip =
" MacroExclusive(macroname,arg1,arg2...):\n"
Modified: team/russell/chan_refcount/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_meetme.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_meetme.c (original)
+++ team/russell/chan_refcount/apps/app_meetme.c Wed Nov 21 13:58:04 2007
@@ -163,13 +163,17 @@
CONFFLAG_SLA_STATION = (1 << 26),
CONFFLAG_SLA_TRUNK = (1 << 27),
/*! If set, the user should continue in the dialplan if kicked out */
- CONFFLAG_KICK_CONTINUE = (1 << 28)
+ CONFFLAG_KICK_CONTINUE = (1 << 28),
+ CONFFLAG_DURATION_STOP = (1 << 29),
+ CONFFLAG_DURATION_LIMIT = (1 << 30),
};
enum {
OPT_ARG_WAITMARKED = 0,
OPT_ARG_EXITKEYS = 1,
- OPT_ARG_ARRAY_SIZE = 2,
+ OPT_ARG_DURATION_STOP = 2,
+ OPT_ARG_DURATION_LIMIT = 3,
+ OPT_ARG_ARRAY_SIZE = 4,
};
AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
@@ -199,6 +203,8 @@
AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
AST_APP_OPTION('x', CONFFLAG_MARKEDEXIT ),
AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
+ AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP),
+ AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
END_OPTIONS );
static const char *app = "MeetMe";
@@ -273,7 +279,15 @@
" 'X' -- allow user to exit the conference by entering a valid single\n"
" digit extension ${MEETME_EXIT_CONTEXT} or the current context\n"
" if that variable is not defined.\n"
-" '1' -- do not play message when first person enters\n";
+" '1' -- do not play message when first person enters\n"
+" 'S(x)' -- Kick the user 'x' seconds *after* he entered into the conference.\n"
+" 'L(x[:y][:z])' - Limit the conference to 'x' ms. Play a warning when 'y' ms are\n"
+" left. Repeat the warning every 'z' ms. The following special\n"
+" variables can be used with this option:\n"
+" * CONF_LIMIT_TIMEOUT_FILE File to play when time is up.\n"
+" * CONF_LIMIT_WARNING_FILE File to play as warning if 'y' is defined.\n"
+" The default is to say the time remaining.\n"
+"";
static const char *descrip2 =
" MeetMeCount(confno[,var]): Plays back the number of users in the specified\n"
@@ -394,6 +408,13 @@
char usrvalue[50]; /*!< Custom User Value */
char namerecloc[PATH_MAX]; /*!< Name Recorded file Location */
time_t jointime; /*!< Time the user joined the conference */
+ time_t kicktime; /*!< Time the user will be kicked from the conference */
+ struct timeval start_time; /*!< Time the user entered into the conference */
+ long timelimit; /*!< Time limit for the user to be in the conference L(x:y:z) */
+ long play_warning; /*!< Play a warning when 'y' ms are left */
+ long warning_freq; /*!< Repeat the warning every 'z' ms */
+ const char *warning_sound; /*!< File to play as warning if 'y' is defined */
+ const char *end_sound; /*!< File to play when time is up. */
struct volume talk;
struct volume listen;
AST_LIST_ENTRY(ast_conf_user) list;
@@ -866,7 +887,7 @@
static char *complete_meetmecmd(const char *line, const char *word, int pos, int state)
{
- static char *cmds[] = {"lock", "unlock", "mute", "unmute", "kick", "list", NULL};
+ static char *cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL};
int len = strlen(word);
int which = 0;
@@ -942,7 +963,7 @@
case CLI_INIT:
e->command = "meetme";
e->usage =
- "Usage: meetme (un)lock|(un)mute|kick|list [concise] <confno> <usernumber>\n"
+ "Usage: meetme concise|(un)lock|(un)mute|kick|list [concise] <confno> <usernumber>\n"
" Executes a command for the conference or on a conferee\n";
return NULL;
case CLI_GENERATE:
@@ -956,16 +977,19 @@
if (strlen(a->argv[i]) > 100)
ast_cli(a->fd, "Invalid Arguments.\n");
}
- if (a->argc == 1) {
+ if (a->argc == 1 || ( a->argc == 2 && !strcasecmp(a->argv[1], "concise") )) {
/* 'MeetMe': List all the conferences */
+ int concise = ( a->argc == 2 && !strcasecmp(a->argv[1], "concise") );
now = time(NULL);
AST_LIST_LOCK(&confs);
if (AST_LIST_EMPTY(&confs)) {
- ast_cli(a->fd, "No active MeetMe conferences.\n");
+ if (!concise)
+ ast_cli(a->fd, "No active MeetMe conferences.\n");
AST_LIST_UNLOCK(&confs);
return CLI_SUCCESS;
}
- ast_cli(a->fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked");
+ if (!concise)
+ ast_cli(a->fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked");
AST_LIST_TRAVERSE(&confs, cnf, list) {
if (cnf->markedusers == 0)
strcpy(cmdline, "N/A ");
@@ -974,13 +998,23 @@
hr = (now - cnf->start) / 3600;
min = ((now - cnf->start) % 3600) / 60;
sec = (now - cnf->start) % 60;
-
- ast_cli(a->fd, data_format, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
+ if (!concise)
+ ast_cli(a->fd, data_format, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
+ else {
+ ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n",
+ cnf->confno,
+ cnf->users,
+ cnf->markedusers,
+ hr, min, sec,
+ cnf->isdynamic,
+ cnf->locked);
+ }
total += cnf->users;
}
AST_LIST_UNLOCK(&confs);
- ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total);
+ if (!concise)
+ ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total);
return CLI_SUCCESS;
}
if (a->argc < 3)
@@ -1471,7 +1505,18 @@
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
char *buf = __buf + AST_FRIENDLY_OFFSET;
char *exitkeys = NULL;
-
+ time_t myt;
+ unsigned int calldurationlimit = 0;
+ long timelimit = 0;
+ long play_warning = 0;
+ long warning_freq = 0;
+ const char *warning_sound = NULL;
+ const char *end_sound = NULL;
+ char *parse;
+ long time_left_ms = 0;
+ struct timeval nexteventts = { 0, };
+ int to;
+
if (!(user = ast_calloc(1, sizeof(*user))))
return ret;
@@ -1482,7 +1527,64 @@
(opt_waitmarked_timeout > 0)) {
timeout = time(NULL) + opt_waitmarked_timeout;
}
-
+
+ if ((confflags & CONFFLAG_DURATION_STOP) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_STOP])) {
+ calldurationlimit = atoi(optargs[OPT_ARG_DURATION_STOP]);
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n",calldurationlimit);
+ }
+
+ if ((confflags & CONFFLAG_DURATION_LIMIT) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_LIMIT])) {
+ char *limit_str, *warning_str, *warnfreq_str;
+ const char *var;
+
+ parse = optargs[OPT_ARG_DURATION_LIMIT];
+ limit_str = strsep(&parse, ":");
+ warning_str = strsep(&parse, ":");
+ warnfreq_str = parse;
+
+ timelimit = atol(limit_str);
+ if (warning_str)
+ play_warning = atol(warning_str);
+ if (warnfreq_str)
+ warning_freq = atol(warnfreq_str);
+
+ if (!timelimit) {
+ timelimit = play_warning = warning_freq = 0;
+ warning_sound = NULL;
+ } else if (play_warning > timelimit) {
+ if (!warning_freq) {
+ play_warning = 0;
+ } else {
+ while (play_warning > timelimit)
+ play_warning -= warning_freq;
+ if (play_warning < 1)
+ play_warning = warning_freq = 0;
+ }
+ }
+
+ var = pbx_builtin_getvar_helper(chan,"CONF_LIMIT_WARNING_FILE");
+ warning_sound = var ? var : "timeleft";
+
+ var = pbx_builtin_getvar_helper(chan,"CONF_LIMIT_TIMEOUT_FILE");
+ end_sound = var ? var : NULL;
+
+ /* undo effect of S(x) in case they are both used */
+ calldurationlimit = 0;
+ /* more efficient do it like S(x) does since no advanced opts */
+ if (!play_warning && !end_sound && timelimit) {
+ calldurationlimit = timelimit / 1000;
+ timelimit = play_warning = warning_freq = 0;
+ } else {
+ ast_debug(2, "Limit Data for this call:\n");
+ ast_debug(2, "- timelimit = %ld\n", timelimit);
+ ast_debug(2, "- play_warning = %ld\n", play_warning);
+ ast_debug(2, "- warning_freq = %ld\n", warning_freq);
+ ast_debug(2, "- warning_sound = %s\n", warning_sound ? warning_sound : "UNDEF");
+ ast_debug(2, "- end_sound = %s\n", end_sound ? end_sound : "UNDEF");
+ }
+ }
+
/* Get exit keys */
if ((confflags & CONFFLAG_KEYEXIT)) {
if (!ast_strlen_zero(optargs[OPT_ARG_EXITKEYS]))
@@ -1526,6 +1628,26 @@
ast_mutex_unlock(&conf->recordthreadlock);
time(&user->jointime);
+
+ user->timelimit = timelimit;
+ user->play_warning = play_warning;
+ user->warning_freq = warning_freq;
+ user->warning_sound = warning_sound;
+ user->end_sound = end_sound;
+
+ if (calldurationlimit > 0) {
+ time(&user->kicktime);
+ user->kicktime = user->kicktime + calldurationlimit;
+ }
+
+ if (ast_tvzero(user->start_time))
+ user->start_time = ast_tvnow();
+ time_left_ms = user->timelimit;
+
+ if (user->timelimit) {
+ nexteventts = ast_tvadd(user->start_time, ast_samp2tv(user->timelimit, 1000));
+ nexteventts = ast_tvsub(nexteventts, ast_samp2tv(user->play_warning, 1000));
+ }
if (conf->locked && (!(confflags & CONFFLAG_ADMIN))) {
/* Sorry, but this conference is locked! */
@@ -1810,6 +1932,9 @@
for (;;) {
int menu_was_active = 0;
+ outfd = -1;
+ ms = -1;
+
if (rt_schedule) {
char currenttime[32];
struct ast_tm tm;
@@ -1846,8 +1971,70 @@
}
}
- outfd = -1;
- ms = -1;
+ time(&myt); /* get current time */
+ if (user->kicktime && (user->kicktime < myt))
+ break;
+
+ to = -1;
+ if (user->timelimit) {
+ struct timeval now;
+ int minutes = 0, seconds = 0, remain = 0;
+
+ now = ast_tvnow();
+ to = ast_tvdiff_ms(nexteventts, now);
+ if (to < 0)
+ to = 0;
+ time_left_ms = user->timelimit - ast_tvdiff_ms(now, user->start_time);
+ if (time_left_ms < to)
+ to = time_left_ms;
+
+ if (time_left_ms <= 0) {
+ if (user->end_sound){
+ res = ast_streamfile(chan, user->end_sound, chan->language);
+ res = ast_waitstream(chan, "");
+ }
+ break;
+ }
+
+ if (!to) {
+ if (time_left_ms >= 5000) {
+
+ remain = (time_left_ms + 500) / 1000;
+ if (remain / 60 >= 1) {
+ minutes = remain / 60;
+ seconds = remain % 60;
+ } else {
+ seconds = remain;
+ }
+
+ /* force the time left to round up if appropriate */
+ if (user->warning_sound && user->play_warning){
+ if (!strcmp(user->warning_sound,"timeleft")) {
+
+ res = ast_streamfile(chan, "vm-youhave", chan->language);
+ res = ast_waitstream(chan, "");
+ if (minutes) {
+ res = ast_say_number(chan, minutes, AST_DIGIT_ANY, chan->language, (char *) NULL);
+ res = ast_streamfile(chan, "queue-minutes", chan->language);
+ res = ast_waitstream(chan, "");
+ }
+ if (seconds) {
+ res = ast_say_number(chan, seconds, AST_DIGIT_ANY, chan->language, (char *) NULL);
+ res = ast_streamfile(chan, "queue-seconds", chan->language);
+ res = ast_waitstream(chan, "");
+ }
+ } else {
+ res = ast_streamfile(chan, user->warning_sound, chan->language);
+ res = ast_waitstream(chan, "");
+ }
+ }
+ }
+ if (user->warning_freq)
+ nexteventts = ast_tvadd(nexteventts, ast_samp2tv(user->warning_freq, 1000));
+ else
+ nexteventts = ast_tvadd(user->start_time, ast_samp2tv(user->timelimit, 1000));
+ }
+ }
if (timeout && time(NULL) >= timeout)
break;
@@ -3784,14 +3971,14 @@
continue;
if (remove)
- AST_LIST_REMOVE_CURRENT(&sla.ringing_trunks, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
if (trunk_ref)
*trunk_ref = s_trunk_ref;
break;
}
- AST_LIST_TRAVERSE_SAFE_END
+ AST_LIST_TRAVERSE_SAFE_END;
if (ringing_trunk)
break;
@@ -3819,11 +4006,11 @@
case AST_DIAL_RESULT_FAILED:
case AST_DIAL_RESULT_TIMEOUT:
case AST_DIAL_RESULT_UNANSWERED:
- AST_LIST_REMOVE_CURRENT(&sla.ringing_stations, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
sla_stop_ringing_station(ringing_station, SLA_STATION_HANGUP_NORMAL);
break;
case AST_DIAL_RESULT_ANSWERED:
- AST_LIST_REMOVE_CURRENT(&sla.ringing_stations, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
/* Find the appropriate trunk to answer. */
ast_mutex_lock(&sla.lock);
ringing_trunk = sla_choose_ringing_trunk(ringing_station->station, &s_trunk_ref, 1);
@@ -3868,7 +4055,7 @@
break;
}
}
- AST_LIST_TRAVERSE_SAFE_END
+ AST_LIST_TRAVERSE_SAFE_END;
}
/*! \brief Check to see if this station is already ringing
@@ -3898,7 +4085,7 @@
if (station != failed_station->station)
continue;
if (ast_tvdiff_ms(ast_tvnow(), failed_station->last_try) > 1000) {
- AST_LIST_REMOVE_CURRENT(&sla.failed_stations, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
ast_free(failed_station);
break;
}
@@ -4097,7 +4284,7 @@
break;
}
if (!trunk_ref) {
- AST_LIST_REMOVE_CURRENT(&sla.ringing_stations, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
ast_dial_join(ringing_station->station->dial);
ast_dial_destroy(ringing_station->station->dial);
ringing_station->station->dial = NULL;
@@ -4154,7 +4341,7 @@
time_left = (ringing_trunk->trunk->ring_timeout * 1000) - time_elapsed;
if (time_left <= 0) {
pbx_builtin_setvar_helper(ringing_trunk->trunk->chan, "SLATRUNK_STATUS", "RINGTIMEOUT");
- AST_LIST_REMOVE_CURRENT(&sla.ringing_trunks, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
sla_stop_ringing_trunk(ringing_trunk);
res = 1;
continue;
@@ -4162,7 +4349,7 @@
if (time_left < *timeout)
*timeout = time_left;
}
- AST_LIST_TRAVERSE_SAFE_END
+ AST_LIST_TRAVERSE_SAFE_END;
return res;
}
@@ -4235,7 +4422,7 @@
/* If there is no time left, the station needs to stop ringing */
if (time_left <= 0) {
- AST_LIST_REMOVE_CURRENT(&sla.ringing_stations, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
sla_stop_ringing_station(ringing_station, SLA_STATION_HANGUP_TIMEOUT);
res = 1;
continue;
@@ -4246,7 +4433,7 @@
if (time_left < *timeout)
*timeout = time_left;
}
- AST_LIST_TRAVERSE_SAFE_END
+ AST_LIST_TRAVERSE_SAFE_END;
return res;
}
@@ -4805,11 +4992,11 @@
ast_mutex_lock(&sla.lock);
AST_LIST_TRAVERSE_SAFE_BEGIN(&sla.ringing_trunks, ringing_trunk, entry) {
if (ringing_trunk->trunk == trunk) {
- AST_LIST_REMOVE_CURRENT(&sla.ringing_trunks, entry);
+ AST_LIST_REMOVE_CURRENT(entry);
break;
}
}
- AST_LIST_TRAVERSE_SAFE_END
+ AST_LIST_TRAVERSE_SAFE_END;
ast_mutex_unlock(&sla.lock);
if (ringing_trunk) {
sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
Modified: team/russell/chan_refcount/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_minivm.c?view=diff&rev=89503&r1=89502&r2=89503
==============================================================================
--- team/russell/chan_refcount/apps/app_minivm.c (original)
+++ team/russell/chan_refcount/apps/app_minivm.c Wed Nov 21 13:58:04 2007
@@ -230,7 +230,7 @@
static char *synopsis_minivm_record = "Receive Mini-Voicemail and forward via e-mail";
static char *descrip_minivm_record =
- "Syntax: MinivmRecord(username at domain[,options])\n"
+ " MinivmRecord(username at domain[,options]):\n"
"This application is part of the Mini-Voicemail system, configured in minivm.conf.\n"
"MiniVM records audio file in configured format and forwards message to e-mail and pager.\n"
[... 7881 lines stripped ...]
More information about the asterisk-commits
mailing list