[asterisk-commits] russell: branch russell/chan_console r87118 - in /team/russell/chan_console: ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 25 23:00:50 CDT 2007
Author: russell
Date: Thu Oct 25 23:00:49 2007
New Revision: 87118
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87118
Log:
resolve, reset
Added:
team/russell/chan_console/doc/tex/backtrace.tex
- copied unchanged from r87104, trunk/doc/tex/backtrace.tex
Modified:
team/russell/chan_console/ (props changed)
team/russell/chan_console/CHANGES
team/russell/chan_console/LICENSE
team/russell/chan_console/Makefile
team/russell/chan_console/Makefile.rules
team/russell/chan_console/UPGRADE.txt
team/russell/chan_console/apps/app_adsiprog.c
team/russell/chan_console/apps/app_controlplayback.c
team/russell/chan_console/apps/app_dial.c
team/russell/chan_console/apps/app_festival.c
team/russell/chan_console/apps/app_meetme.c
team/russell/chan_console/apps/app_minivm.c
team/russell/chan_console/apps/app_mixmonitor.c
team/russell/chan_console/apps/app_osplookup.c
team/russell/chan_console/apps/app_playback.c
team/russell/chan_console/apps/app_queue.c
team/russell/chan_console/apps/app_read.c
team/russell/chan_console/apps/app_rpt.c
team/russell/chan_console/apps/app_voicemail.c
team/russell/chan_console/apps/app_zapateller.c
team/russell/chan_console/apps/app_zapras.c
team/russell/chan_console/bootstrap.sh
team/russell/chan_console/channels/chan_agent.c
team/russell/chan_console/channels/chan_alsa.c
team/russell/chan_console/channels/chan_features.c
team/russell/chan_console/channels/chan_gtalk.c
team/russell/chan_console/channels/chan_h323.c
team/russell/chan_console/channels/chan_iax2.c
team/russell/chan_console/channels/chan_jingle.c
team/russell/chan_console/channels/chan_local.c
team/russell/chan_console/channels/chan_mgcp.c
team/russell/chan_console/channels/chan_misdn.c
team/russell/chan_console/channels/chan_oss.c
team/russell/chan_console/channels/chan_sip.c
team/russell/chan_console/channels/chan_skinny.c
team/russell/chan_console/channels/chan_usbradio.c
team/russell/chan_console/channels/chan_zap.c
team/russell/chan_console/channels/iax2-provision.c
team/russell/chan_console/channels/misdn/isdn_lib.c
team/russell/chan_console/channels/misdn/isdn_lib.h
team/russell/chan_console/channels/misdn/isdn_msg_parser.c
team/russell/chan_console/channels/xpmr/xpmr.c
team/russell/chan_console/codecs/codec_zap.c
team/russell/chan_console/configs/dundi.conf.sample
team/russell/chan_console/configs/features.conf.sample
team/russell/chan_console/configs/meetme.conf.sample
team/russell/chan_console/configs/queues.conf.sample
team/russell/chan_console/configs/zapata.conf.sample
team/russell/chan_console/configure.ac
team/russell/chan_console/doc/PEERING
team/russell/chan_console/doc/asterisk-mib.txt
team/russell/chan_console/doc/tex/ael.tex
team/russell/chan_console/doc/tex/ajam.tex
team/russell/chan_console/doc/tex/app-sms.tex
team/russell/chan_console/doc/tex/asterisk.tex
team/russell/chan_console/doc/tex/billing.tex
team/russell/chan_console/doc/tex/cdrdriver.tex
team/russell/chan_console/doc/tex/channelvariables.tex
team/russell/chan_console/doc/tex/cliprompt.tex
team/russell/chan_console/doc/tex/configuration.tex
team/russell/chan_console/doc/tex/dundi.tex
team/russell/chan_console/doc/tex/enum.tex
team/russell/chan_console/doc/tex/extensions.tex
team/russell/chan_console/doc/tex/ices.tex
team/russell/chan_console/doc/tex/imapstorage.tex
team/russell/chan_console/doc/tex/jitterbuffer.tex
team/russell/chan_console/doc/tex/localchannel.tex
team/russell/chan_console/doc/tex/manager.tex
team/russell/chan_console/doc/tex/misdn.tex
team/russell/chan_console/doc/tex/odbcstorage.tex
team/russell/chan_console/doc/tex/privacy.tex
team/russell/chan_console/doc/tex/qos.tex
team/russell/chan_console/doc/tex/queuelog.tex
team/russell/chan_console/doc/tex/queues-with-callback-members.tex
team/russell/chan_console/doc/tex/realtime.tex
team/russell/chan_console/doc/tex/security.tex
team/russell/chan_console/doc/tex/sla.tex
team/russell/chan_console/funcs/func_callerid.c
team/russell/chan_console/funcs/func_cut.c
team/russell/chan_console/funcs/func_devstate.c
team/russell/chan_console/funcs/func_logic.c
team/russell/chan_console/funcs/func_strings.c
team/russell/chan_console/funcs/func_vmcount.c
team/russell/chan_console/include/asterisk/app.h
team/russell/chan_console/include/asterisk/channel.h
team/russell/chan_console/include/asterisk/cli.h
team/russell/chan_console/include/asterisk/file.h
team/russell/chan_console/include/asterisk/frame.h
team/russell/chan_console/include/asterisk/linkedlists.h
team/russell/chan_console/include/asterisk/lock.h
team/russell/chan_console/include/asterisk/logger.h
team/russell/chan_console/include/asterisk/strings.h
team/russell/chan_console/main/Makefile
team/russell/chan_console/main/acl.c
team/russell/chan_console/main/app.c
team/russell/chan_console/main/ast_expr2.c
team/russell/chan_console/main/ast_expr2.h
team/russell/chan_console/main/ast_expr2.y
team/russell/chan_console/main/ast_expr2f.c
team/russell/chan_console/main/asterisk.c
team/russell/chan_console/main/astmm.c
team/russell/chan_console/main/astobj2.c
team/russell/chan_console/main/cdr.c
team/russell/chan_console/main/channel.c
team/russell/chan_console/main/cli.c
team/russell/chan_console/main/config.c
team/russell/chan_console/main/db.c
team/russell/chan_console/main/dnsmgr.c
team/russell/chan_console/main/file.c
team/russell/chan_console/main/frame.c
team/russell/chan_console/main/http.c
team/russell/chan_console/main/image.c
team/russell/chan_console/main/loader.c
team/russell/chan_console/main/logger.c
team/russell/chan_console/main/manager.c
team/russell/chan_console/main/pbx.c
team/russell/chan_console/main/rtp.c
team/russell/chan_console/main/say.c
team/russell/chan_console/main/stdtime/localtime.c
team/russell/chan_console/main/term.c
team/russell/chan_console/main/threadstorage.c
team/russell/chan_console/main/translate.c
team/russell/chan_console/main/udptl.c
team/russell/chan_console/main/utils.c
team/russell/chan_console/pbx/ael/ael-test/ref.ael-ntest22
team/russell/chan_console/pbx/ael/ael-test/ref.ael-test2
team/russell/chan_console/pbx/ael/ael-test/ref.ael-test3
team/russell/chan_console/pbx/ael/ael-test/ref.ael-test4
team/russell/chan_console/pbx/dundi-parser.c
team/russell/chan_console/pbx/pbx_ael.c
team/russell/chan_console/pbx/pbx_config.c
team/russell/chan_console/pbx/pbx_dundi.c
team/russell/chan_console/pbx/pbx_realtime.c
team/russell/chan_console/res/ael/ael.flex
team/russell/chan_console/res/ael/ael.tab.c
team/russell/chan_console/res/ael/ael.y
team/russell/chan_console/res/ael/ael_lex.c
team/russell/chan_console/res/res_agi.c
team/russell/chan_console/res/res_clioriginate.c
team/russell/chan_console/res/res_config_pgsql.c
team/russell/chan_console/res/res_config_sqlite.c
team/russell/chan_console/res/res_convert.c
team/russell/chan_console/res/res_crypto.c
team/russell/chan_console/res/res_features.c
team/russell/chan_console/res/res_indications.c
team/russell/chan_console/res/res_jabber.c
team/russell/chan_console/res/res_limit.c
team/russell/chan_console/res/res_musiconhold.c
team/russell/chan_console/res/res_odbc.c
team/russell/chan_console/res/res_realtime.c
team/russell/chan_console/res/res_smdi.c
team/russell/chan_console/utils/astman.c
team/russell/chan_console/utils/check_expr.c
team/russell/chan_console/utils/clicompat.c
team/russell/chan_console/utils/conf2ael.c
team/russell/chan_console/utils/hashtest2.c
Propchange: team/russell/chan_console/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/russell/chan_console/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/russell/chan_console/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Oct 25 23:00:49 2007
@@ -1,1 +1,1 @@
-/trunk:1-84954
+/trunk:1-87117
Modified: team/russell/chan_console/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/CHANGES?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/CHANGES (original)
+++ team/russell/chan_console/CHANGES Thu Oct 25 23:00:49 2007
@@ -141,9 +141,9 @@
* SMDI is now enabled in voicemail using the smdienable option.
* A "lockmode" option has been added to asterisk.conf to configure the file
locking method used for voicemail, and potentially other things in the
- future. The default is the old behavior, lockfile. However, there is a
- new method, "flock", that uses a different method for situations where the
- lockfile will not work, such as on SMB/CIFS mounts.
+ future. The default is the old behavior, lockfile. However, there is a
+ new method, "flock", that uses a different method for situations where the
+ lockfile will not work, such as on SMB/CIFS mounts.
Queue changes
-------------
@@ -179,6 +179,11 @@
This is a very useful feature in combination with the 'X' option to ChanSpy.
* Added 'C' option to Meetme which causes a caller to continue in the dialplan
when kicked out.
+ * Added new RealTime functionality to provide support for scheduled conferencing.
+ This includes optional messages to the caller if they attempt to join before
+ 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.
Music On Hold Changes
---------------------
@@ -289,3 +294,11 @@
to just UNKNOWN if the extension exists.
* When originating a call using AMI or pbx_spool that fails the reason for failure
will now be available in the failed extension using the REASON dialplan variable.
+ * Added jitterbuffer support for chan_local. This allows you to use the
+ generic jitterbuffer on incoming calls going to Asterisk applications.
+ For example, this would allow you to use a jitterbuffer for an incoming
+ SIP call to Voicemail by putting a Local channel in the middle. This
+ feature is enabled by using the 'j' option in the Dial string to the Local
+ channel in conjunction with the existing 'n' option for local channels.
+ * Added support for reading the TOUCH_MONITOR_PREFIX channel variable.
+ It allows you to configure a prefix for auto-monitor recordings.
Modified: team/russell/chan_console/LICENSE
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/LICENSE?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/LICENSE (original)
+++ team/russell/chan_console/LICENSE Thu Oct 25 23:00:49 2007
@@ -57,14 +57,13 @@
If you have any questions regarding our licensing policy, please
contact us:
-+1.877.546.8963 (via telephone in the USA)
++1.877.344.4861 (via telephone in the USA)
+1.256.428.6000 (via telephone outside the USA)
+1.256.864.0464 (via FAX inside or outside the USA)
IAX2/misery.digium.com/6000 (via IAX2)
licensing at digium.com (via email)
Digium, Inc.
-150 West Park Loop
-Suite 100
+445 Jan Davis Drive
Huntsville, AL 35806
USA
Modified: team/russell/chan_console/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/Makefile?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/Makefile (original)
+++ team/russell/chan_console/Makefile Thu Oct 25 23:00:49 2007
@@ -577,6 +577,17 @@
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 ";maxcalls = 10 ; Maximum amount of calls allowed" ; \
+ echo ";maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit" ; \
+ echo ";maxfiles = 1000 ; Maximum amount of openfiles" ; \
+ echo ";minmemfree = 1 ; in MBs, Asterisk stops accepting new calls if the amount of free memory falls below this watermark" ; \
+ echo ";cache_record_files = yes ; Cache recorded sound files to another directory during recording" ; \
+ echo ";record_cache_dir = /tmp ; Specify cache directory (used in cnjunction with cache_record_files)" ; \
+ echo ";transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded" ; \
+ echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
+ echo ";runuser = asterisk ; The user to run as" ; \
+ echo ";rungroup = asterisk ; The group to run as" ; \
+ echo "" ; \
echo "; Changing the following lines may compromise your security." ; \
echo ";[files]" ; \
echo ";astctlpermissions = 0660" ; \
@@ -637,20 +648,20 @@
config:
@if [ "${OSARCH}" = "linux-gnu" ]; then \
if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
- /sbin/chkconfig --add asterisk; \
+ $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \
+ if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
elif [ -f /etc/debian_version ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \
- /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \
+ $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk $(DESTDIR)/etc/init.d/asterisk; \
+ if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; fi; \
elif [ -f /etc/gentoo-release ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \
- /sbin/rc-update add asterisk default; \
+ $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk $(DESTDIR)/etc/init.d/asterisk; \
+ if [ -z "$(DESTDIR)" ]; then /sbin/rc-update add asterisk default; fi; \
elif [ -f /etc/mandrake-release ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \
- /sbin/chkconfig --add asterisk; \
+ $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \
+ if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \
- /sbin/chkconfig --add asterisk; \
+ $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk $(DESTDIR)/etc/init.d/asterisk; \
+ if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
elif [ -f /etc/slackware-version ]; then \
echo "Slackware is not currently supported, although an init script does exist for it." \
else \
Modified: team/russell/chan_console/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/Makefile.rules?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/Makefile.rules (original)
+++ team/russell/chan_console/Makefile.rules Thu Oct 25 23:00:49 2007
@@ -40,11 +40,7 @@
%.o: %.c
$(ECHO_PREFIX) echo " [CC] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
- $(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
%.o: %.i
$(ECHO_PREFIX) echo " [CC] $< -> $@"
@@ -64,19 +60,11 @@
%.o: %.s
$(ECHO_PREFIX) echo " [AS] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
- $(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
%.oo: %.cc
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
- $(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS))
-endif
%.c: %.y
$(ECHO_PREFIX) echo " [BISON] $< -> $@"
Modified: team/russell/chan_console/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/UPGRADE.txt?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/UPGRADE.txt (original)
+++ team/russell/chan_console/UPGRADE.txt Thu Oct 25 23:00:49 2007
@@ -1,11 +1,5 @@
Information for Upgrading From Previous Asterisk Releases
=========================================================
-
-Manager:
-
-* The CallerID fields across Manager events have now been made more
- consistent. CallerID Number will be sent as CallerIDNum and CallerID
- Name will be sent as CallerIDName wherever used.
AEL:
@@ -113,7 +107,17 @@
semicolon, in order to make the Local channel driver compatible with the comma
delimiter change in applications.
+Configuration:
+
+* pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,
+ lowcost and other is not acceptable now. Look into qos.tex for description of
+ this parameter.
+
Manager:
+
+* The CallerID fields across Manager events have now been made more
+ consistent. CallerID Number will be sent as CallerIDNum and CallerID
+ Name will be sent as CallerIDName wherever used.
* The IAXpeers command output has been changed to more closely resemble the
output of the SIPpeers command.
Modified: team/russell/chan_console/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_adsiprog.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_adsiprog.c (original)
+++ team/russell/chan_console/apps/app_adsiprog.c Thu Oct 25 23:00:49 2007
@@ -38,7 +38,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <errno.h>
Modified: team/russell/chan_console/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_controlplayback.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_controlplayback.c (original)
+++ team/russell/chan_console/apps/app_controlplayback.c Thu Oct 25 23:00:49 2007
@@ -142,7 +142,7 @@
res = ast_control_streamfile(chan, args.filename, args.fwd, args.rev, args.stop, args.pause, args.restart, skipms, &offsetms);
/* If we stopped on one of our stop keys, return 0 */
- if (args.stop && strchr(args.stop, res)) {
+ if (res > 0 && args.stop && strchr(args.stop, res)) {
res = 0;
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
} else {
Modified: team/russell/chan_console/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_dial.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_dial.c (original)
+++ team/russell/chan_console/apps/app_dial.c Thu Oct 25 23:00:49 2007
@@ -33,7 +33,6 @@
#include <errno.h>
#include <unistd.h>
#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/signal.h>
@@ -1406,6 +1405,7 @@
tc->cid.cid_pres = chan->cid.cid_pres;
tc->cid.cid_ton = chan->cid.cid_ton;
tc->cid.cid_tns = chan->cid.cid_tns;
+ tc->cid.cid_ani2 = chan->cid.cid_ani2;
tc->adsicpe = chan->adsicpe;
tc->transfercapability = chan->transfercapability;
Modified: team/russell/chan_console/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_festival.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_festival.c (original)
+++ team/russell/chan_console/apps/app_festival.c Thu Oct 25 23:00:49 2007
@@ -36,15 +36,12 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
Modified: team/russell/chan_console/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_meetme.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_meetme.c (original)
+++ team/russell/chan_console/apps/app_meetme.c Thu Oct 25 23:00:49 2007
@@ -76,10 +76,15 @@
/*! each buffer is 20ms, so this is 640ms total */
#define DEFAULT_AUDIO_BUFFERS 32
+/*! String format for scheduled conferences */
+#define DATE_FORMAT "%Y-%m-%d %H:%M:%S"
+
enum {
ADMINFLAG_MUTED = (1 << 1), /*!< User is muted */
ADMINFLAG_SELFMUTED = (1 << 2), /*!< User muted self */
- ADMINFLAG_KICKME = (1 << 3) /*!< User has been kicked */
+ ADMINFLAG_KICKME = (1 << 3), /*!< User has been kicked */
+ /*! User has requested to speak */
+ ADMINFLAG_T_REQUEST = (1 << 4),
};
#define MEETME_DELAYDETECTTALK 300
@@ -210,6 +215,15 @@
static const char *slastation_synopsis = "Shared Line Appearance Station";
static const char *slatrunk_synopsis = "Shared Line Appearance Trunk";
+/* Lookup RealTime conferences based on confno and current time */
+static int rt_schedule;
+static int fuzzystart;
+static int earlyalert;
+static int endalert;
+
+/* Log participant count to the RealTime backend */
+static int rt_log_members;
+
static const char *descrip =
" MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
"conference. If the conference number is omitted, the user will be prompted\n"
@@ -337,6 +351,8 @@
int zapconf; /*!< Zaptel Conf # */
int users; /*!< Number of active users */
int markedusers; /*!< Number of marked users */
+ int maxusers; /*!< Participant limit if scheduled */
+ int endalert; /*!< When to play conf ending message */
time_t start; /*!< Start time (s) */
int refcount; /*!< reference count of usage */
enum recording_state recording:2; /*!< recording status */
@@ -350,6 +366,7 @@
char pin[MAX_PIN]; /*!< If protected by a PIN */
char pinadmin[MAX_PIN]; /*!< If protected by a admin PIN */
char uniqueid[32];
+ char endtime[19]; /*!< When to end the conf if scheduled */
struct ast_frame *transframe[32];
struct ast_frame *origframe;
struct ast_trans_pvt *transpath[32];
@@ -828,6 +845,7 @@
/* Fill the conference struct */
cnf->start = time(NULL);
+ cnf->maxusers = 0x7fffffff;
cnf->isdynamic = dynamic ? 1 : 0;
ast_verb(3, "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
AST_LIST_INSERT_HEAD(&confs, cnf, list);
@@ -1034,7 +1052,7 @@
min = ((now - user->jointime) % 3600) / 60;
sec = (now - user->jointime) % 60;
if ( !concise )
- ast_cli(a->fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %02d:%02d:%02d\n",
+ ast_cli(a->fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %s %02d:%02d:%02d\n",
user->user_no,
S_OR(user->chan->cid.cid_num, "<unknown>"),
S_OR(user->chan->cid.cid_name, "<no name>"),
@@ -1042,9 +1060,10 @@
user->userflags & CONFFLAG_ADMIN ? "(Admin)" : "",
user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "",
user->adminflags & ADMINFLAG_MUTED ? "(Admin Muted)" : user->adminflags & ADMINFLAG_SELFMUTED ? "(Muted)" : "",
+ user->adminflags & ADMINFLAG_T_REQUEST ? "(Request to Talk)" : "",
istalking(user->talking), hr, min, sec);
else
- ast_cli(a->fd, "%d!%s!%s!%s!%s!%s!%s!%d!%02d:%02d:%02d\n",
+ ast_cli(a->fd, "%d!%s!%s!%s!%s!%s!%s!%s!%d!%02d:%02d:%02d\n",
user->user_no,
S_OR(user->chan->cid.cid_num, ""),
S_OR(user->chan->cid.cid_name, ""),
@@ -1052,6 +1071,7 @@
user->userflags & CONFFLAG_ADMIN ? "1" : "",
user->userflags & CONFFLAG_MONITOR ? "1" : "",
user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED) ? "1" : "",
+ user->adminflags & ADMINFLAG_T_REQUEST ? "1" : "",
user->talking, hr, min, sec);
}
@@ -1228,9 +1248,9 @@
}
static struct ast_cli_entry cli_meetme[] = {
- NEW_CLI(meetme_cmd, "Execute a command on a conference or conferee"),
- NEW_CLI(sla_show_trunks, "Show SLA Trunks"),
- NEW_CLI(sla_show_stations, "Show SLA Stations"),
+ AST_CLI_DEFINE(meetme_cmd, "Execute a command on a conference or conferee"),
+ AST_CLI_DEFINE(sla_show_trunks, "Show SLA Trunks"),
+ AST_CLI_DEFINE(sla_show_stations, "Show SLA Stations"),
};
static void conf_flush(int fd, struct ast_channel *chan)
@@ -1429,11 +1449,14 @@
int ret = -1;
int x;
int menu_active = 0;
+ int talkreq_manager = 0;
int using_pseudo = 0;
int duration=20;
int hr, min, sec;
int sent_event = 0;
- time_t now;
+ int checked = 0;
+ int announcement_played = 0;
+ struct timeval now;
struct ast_dsp *dsp=NULL;
struct ast_app *app;
const char *agifile;
@@ -1521,6 +1544,14 @@
else
user->user_no = AST_LIST_LAST(&conf->userlist)->user_no + 1;
+ if (rt_schedule && conf->maxusers)
+ if (user->user_no > conf->maxusers){
+ /* Sorry, but this confernce has reached the participant limit! */
+ if (!ast_streamfile(chan, "conf-full", chan->language))
+ ast_waitstream(chan, "");
+ goto outrun;
+ }
+
AST_LIST_INSERT_TAIL(&conf->userlist, user, list);
user->chan = chan;
@@ -1528,10 +1559,11 @@
user->adminflags = (confflags & CONFFLAG_STARTMUTED) ? ADMINFLAG_SELFMUTED : 0;
user->talking = -1;
conf->users++;
- /* Update table */
- snprintf(members, sizeof(members), "%d", conf->users);
- ast_update_realtime("meetme", "confno", conf->confno, "members", members , NULL);
-
+ if (rt_log_members) {
+ /* Update table */
+ snprintf(members, sizeof(members), "%d", conf->users);
+ ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
+ }
/* This device changed state now - if this is the first user */
if (conf->users == 1)
ast_devstate_changed(AST_DEVICE_INUSE, "meetme:%s", conf->confno);
@@ -1775,8 +1807,44 @@
ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
res = -1;
}
- for(;;) {
+ for (;;) {
int menu_was_active = 0;
+
+ if (rt_schedule) {
+ char currenttime[32];
+ struct ast_tm tm;
+
+ now = ast_tvnow();
+ if (now.tv_sec % 60 == 0) {
+ if (!checked) {
+ ast_localtime(&now, &tm, NULL);
+ ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
+ if (strcmp(currenttime, conf->endtime) > 0){
+ ast_verbose("Quitting time...\n");
+ goto outrun;
+ }
+
+ if (!announcement_played && conf->endalert) {
+ now.tv_sec += conf->endalert;
+ ast_localtime(&now, &tm, NULL);
+ ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
+ if (strcmp(currenttime, conf->endtime) > 0){
+ if (!ast_streamfile(chan, "conf-will-end-in", chan->language))
+ ast_waitstream(chan, "");
+ ast_say_digits(chan, conf->endalert / 60, "", chan->language);
+ if (!ast_streamfile(chan, "minutes", chan->language))
+ ast_waitstream(chan, "");
+ announcement_played = 1;
+
+ }
+ }
+ checked = 1;
+
+ }
+ } else {
+ checked = 0;
+ }
+ }
outfd = -1;
ms = -1;
@@ -1928,7 +1996,33 @@
"Status: off\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
}
-
+
+ if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
+ (user->adminflags & ADMINFLAG_T_REQUEST) && !(talkreq_manager)) {
+ talkreq_manager = 1;
+
+ manager_event(EVENT_FLAG_CALL, "MeetmeTalkRequest",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "Meetme: %s\r\n"
+ "Usernum: %i\r\n"
+ "Status: on\r\n",
+ chan->name, chan->uniqueid, conf->confno, user->user_no);
+ }
+
+
+ if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
+ !(user->adminflags & ADMINFLAG_T_REQUEST) && (talkreq_manager)) {
+ talkreq_manager = 0;
+ manager_event(EVENT_FLAG_CALL, "MeetmeTalkRequest",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "Meetme: %s\r\n"
+ "Usernum: %i\r\n"
+ "Status: off\r\n",
+ chan->name, chan->uniqueid, conf->confno, user->user_no);
+ }
+
/* If I have been kicked, exit the conference */
if (user->adminflags & ADMINFLAG_KICKME) {
//You have been kicked.
@@ -2163,6 +2257,15 @@
if (!ast_streamfile(chan, "conf-unmuted", chan->language))
ast_waitstream(chan, "");
}
+ break;
+ case '2':
+ menu_active = 0;
+ if (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED))
+ user->adminflags |= ADMINFLAG_T_REQUEST;
+
+ if (user->adminflags & ADMINFLAG_T_REQUEST)
+ if (!ast_streamfile(chan, "beep", chan->language))
+ ast_waitstream(chan, "");
break;
case '4':
tweak_listen_volume(user, VOL_DOWN);
@@ -2315,10 +2418,10 @@
ast_dsp_free(dsp);
if (user->user_no) { /* Only cleanup users who really joined! */
- now = time(NULL);
- hr = (now - user->jointime) / 3600;
- min = ((now - user->jointime) % 3600) / 60;
- sec = (now - user->jointime) % 60;
+ now = ast_tvnow();
+ hr = (now.tv_sec - user->jointime) / 3600;
+ min = ((now.tv_sec - user->jointime) % 3600) / 60;
+ sec = (now.tv_sec - user->jointime) % 60;
if (sent_event) {
manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
@@ -2333,13 +2436,15 @@
user->user_no,
S_OR(user->chan->cid.cid_num, "<unknown>"),
S_OR(user->chan->cid.cid_name, "<unknown>"),
- (long)(now - user->jointime));
+ (long)(now.tv_sec - user->jointime));
}
conf->users--;
- /* Update table */
- snprintf(members, sizeof(members), "%d", conf->users);
- ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
+ if (rt_log_members){
+ /* Update table */
+ snprintf(members, sizeof(members), "%d", conf->users);
+ ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
+ }
if (confflags & CONFFLAG_MARKEDUSER)
conf->markedusers--;
/* Remove ourselves from the list */
@@ -2360,10 +2465,13 @@
}
static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic,
- char *dynamic_pin, size_t pin_buf_len, int refcount, struct ast_flags *confflags)
+ char *dynamic_pin, size_t pin_buf_len, int refcount, struct ast_flags *confflags,
+ char *optargs[], int *too_early)
{
struct ast_variable *var;
struct ast_conference *cnf;
+
+ *too_early = 0;
/* Check first in the conference list */
AST_LIST_LOCK(&confs);
@@ -2378,8 +2486,40 @@
if (!cnf) {
char *pin = NULL, *pinadmin = NULL; /* For temp use */
-
- var = ast_load_realtime("meetme", "confno", confno, NULL);
+ int maxusers = 0;
+ struct timeval now;
+ char currenttime[19] = "";
+ char startTime[19] = "";
+ char endtime[19] = "";
+ char eatime[19] = "";
+ char userOpts[32] = "";
+ char adminOpts[32] = "";
+ struct ast_tm tm, etm;
+
+ if (rt_schedule){
+ now = ast_tvnow();
+
+ if (fuzzystart)
+ now.tv_sec += fuzzystart;
+
+ ast_localtime(&now, &tm, NULL);
+ ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
+
+ if (earlyalert){
+ now.tv_sec += earlyalert;
+ ast_localtime(&now, &etm, NULL);
+ ast_strftime(eatime, sizeof(eatime), DATE_FORMAT, &etm);
+ } else {
+ ast_copy_string(eatime, currenttime, sizeof(eatime));
+ }
+
+ ast_debug(1, "Looking for conference %s that starts after %s\n", confno, eatime);
+
+ var = ast_load_realtime("meetme", "confno",
+ confno, "startTime<= ", eatime, "endtime>= ",
+ currenttime, NULL);
+ } else
+ var = ast_load_realtime("meetme", "confno", confno, NULL);
if (!var)
return NULL;
@@ -2389,12 +2529,39 @@
pin = ast_strdupa(var->value);
} else if (!strcasecmp(var->name, "adminpin")) {
pinadmin = ast_strdupa(var->value);
+ } else if (!strcasecmp(var->name, "opts")) {
+ ast_copy_string(userOpts, var->value, sizeof(userOpts));
+ } else if (!strcasecmp(var->name, "maxusers")) {
+ maxusers = atoi(var->value);
+ } else if (!strcasecmp(var->name, "adminopts")) {
+ ast_copy_string(adminOpts, var->value, sizeof(adminOpts));
+ } else if (!strcasecmp(var->name, "endtime")) {
+ ast_copy_string(endtime, var->value, sizeof(endtime));
+ } else if (!strcasecmp(var->name, "starttime")) {
+ ast_copy_string(startTime, var->value, sizeof(startTime));
}
+
var = var->next;
}
ast_variables_destroy(var);
-
+
+ if (earlyalert) {
+ if (strcmp(startTime, currenttime) > 0) {
+ /* Announce that the caller is early and exit */
+ if (!ast_streamfile(chan, "conf-has-not-started", chan->language))
+ ast_waitstream(chan, "");
+ *too_early = 1;
+ return NULL;
+ }
+ }
+
cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan);
+
+ if (cnf) {
+ cnf->maxusers = maxusers;
+ cnf->endalert = endalert;
+ ast_copy_string(cnf->endtime, endtime, sizeof(cnf->endtime));
+ }
}
if (cnf) {
@@ -2472,7 +2639,7 @@
return NULL;
AST_STANDARD_APP_ARGS(args, parse);
- ast_debug(3,"Will conf %s match %s?\n", confno, args.confno);
+ ast_debug(3, "Will conf %s match %s?\n", confno, args.confno);
if (!strcasecmp(args.confno, confno)) {
/* Bingo it's a valid conference */
cnf = build_conf(args.confno,
@@ -2713,17 +2880,21 @@
cnf = find_conf(chan, confno, 1, dynamic, the_pin,
sizeof(the_pin), 1, &confflags);
if (!cnf) {
+ int too_early = 0;
cnf = find_conf_realtime(chan, confno, 1, dynamic,
- the_pin, sizeof(the_pin), 1, &confflags);
+ the_pin, sizeof(the_pin), 1, &confflags, optargs, &too_early);
+ if (rt_schedule && too_early)
+ allowretry = 0;
}
if (!cnf) {
- res = ast_streamfile(chan, "conf-invalid", chan->language);
- if (!res)
- ast_waitstream(chan, "");
- res = -1;
- if (allowretry)
+ if (allowretry) {
confno[0] = '\0';
+ res = ast_streamfile(chan, "conf-invalid", chan->language);
+ if (!res)
+ ast_waitstream(chan, "");
+ res = -1;
+ }
} else {
if ((!ast_strlen_zero(cnf->pin) &&
!ast_test_flag(&confflags, CONFFLAG_ADMIN)) ||
@@ -2891,13 +3062,13 @@
break;
case 109: /* m: Unmute */
if (user) {
- user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED);
+ user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED | ADMINFLAG_T_REQUEST);
} else
ast_log(LOG_NOTICE, "Specified User not found!\n");
break;
case 110: /* n: Unmute all users */
AST_LIST_TRAVERSE(&cnf->userlist, user, list)
- user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED);
+ user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED | ADMINFLAG_T_REQUEST);
break;
case 107: /* k: Kick user */
if (user)
@@ -3079,7 +3250,7 @@
if (mute)
user->adminflags |= ADMINFLAG_MUTED; /* request user muting */
else
- user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED); /* request user unmuting */
+ user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED | ADMINFLAG_T_REQUEST); /* request user unmuting */
AST_LIST_UNLOCK(&confs);
@@ -3267,10 +3438,19 @@
struct ast_flags config_flags = { 0 };
const char *val;
- audio_buffers = DEFAULT_AUDIO_BUFFERS;
-
if (!(cfg = ast_config_load(CONFIG_FILE_NAME, config_flags)))
return;
+
+ audio_buffers = DEFAULT_AUDIO_BUFFERS;
+
+ /* Scheduling support is off by default */
+ rt_schedule = 0;
+ fuzzystart = 0;
+ earlyalert = 0;
+ endalert = 0;
+
+ /* Logging of participants defaults to ON for compatibility reasons */
+ rt_log_members = 1;
if ((val = ast_variable_retrieve(cfg, "general", "audiobuffers"))) {
if ((sscanf(val, "%d", &audio_buffers) != 1)) {
@@ -3283,6 +3463,29 @@
}
if (audio_buffers != DEFAULT_AUDIO_BUFFERS)
ast_log(LOG_NOTICE, "Audio buffers per channel set to %d\n", audio_buffers);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "schedule")))
+ rt_schedule = ast_true(val);
+ if ((val = ast_variable_retrieve(cfg, "general", "logmembercount")))
+ rt_log_members = ast_true(val);
+ if ((val = ast_variable_retrieve(cfg, "general", "fuzzystart"))) {
+ if ((sscanf(val, "%d", &fuzzystart) != 1)) {
+ ast_log(LOG_WARNING, "fuzzystart must be a number, not '%s'\n", val);
+ fuzzystart = 0;
+ }
+ }
+ if ((val = ast_variable_retrieve(cfg, "general", "earlyalert"))) {
+ if ((sscanf(val, "%d", &earlyalert) != 1)) {
+ ast_log(LOG_WARNING, "earlyalert must be a number, not '%s'\n", val);
+ earlyalert = 0;
+ }
+ }
+ if ((val = ast_variable_retrieve(cfg, "general", "endalert"))) {
+ if ((sscanf(val, "%d", &endalert) != 1)) {
+ ast_log(LOG_WARNING, "endalert must be a number, not '%s'\n", val);
+ endalert = 0;
+ }
}
ast_config_destroy(cfg);
Modified: team/russell/chan_console/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/apps/app_minivm.c?view=diff&rev=87118&r1=87117&r2=87118
==============================================================================
--- team/russell/chan_console/apps/app_minivm.c (original)
+++ team/russell/chan_console/apps/app_minivm.c Thu Oct 25 23:00:49 2007
@@ -145,7 +145,6 @@
#include <errno.h>
#include <unistd.h>
#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/time.h>
@@ -2992,12 +2991,12 @@
/*! \brief CLI commands for Mini-voicemail */
static struct ast_cli_entry cli_minivm[] = {
- NEW_CLI(handle_minivm_show_users, "List defined mini-voicemail boxes"),
- NEW_CLI(handle_minivm_show_zones, "List zone message formats"),
- NEW_CLI(handle_minivm_list_templates, "List message templates"),
- NEW_CLI(handle_minivm_reload, "Reload Mini-voicemail configuration"),
- NEW_CLI(handle_minivm_show_stats, "Show some mini-voicemail statistics"),
- NEW_CLI(handle_minivm_show_settings, "Show mini-voicemail general settings"),
+ AST_CLI_DEFINE(handle_minivm_show_users, "List defined mini-voicemail boxes"),
+ AST_CLI_DEFINE(handle_minivm_show_zones, "List zone message formats"),
+ AST_CLI_DEFINE(handle_minivm_list_templates, "List message templates"),
+ AST_CLI_DEFINE(handle_minivm_reload, "Reload Mini-voicemail configuration"),
[... 27240 lines stripped ...]
More information about the asterisk-commits
mailing list