[asterisk-commits] branch oej/test-this-branch r27341 - in
/team/oej/test-this-branch: ./ apps/ ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue May 16 06:52:48 MST 2006
Author: oej
Date: Tue May 16 08:52:47 2006
New Revision: 27341
URL: http://svn.digium.com/view/asterisk?rev=27341&view=rev
Log:
Update
Added:
team/oej/test-this-branch/sounds/vm-tempgreetactive.gsm
- copied unchanged from r26451, trunk/sounds/vm-tempgreetactive.gsm
Modified:
team/oej/test-this-branch/ (props changed)
team/oej/test-this-branch/Makefile
team/oej/test-this-branch/UPGRADE.txt
team/oej/test-this-branch/app.c
team/oej/test-this-branch/apps/app_amd.c
team/oej/test-this-branch/apps/app_authenticate.c
team/oej/test-this-branch/apps/app_chanspy.c
team/oej/test-this-branch/apps/app_db.c
team/oej/test-this-branch/apps/app_dial.c
team/oej/test-this-branch/apps/app_dictate.c
team/oej/test-this-branch/apps/app_directory.c
team/oej/test-this-branch/apps/app_disa.c
team/oej/test-this-branch/apps/app_exec.c
team/oej/test-this-branch/apps/app_externalivr.c
team/oej/test-this-branch/apps/app_festival.c
team/oej/test-this-branch/apps/app_hasnewvoicemail.c
team/oej/test-this-branch/apps/app_image.c
team/oej/test-this-branch/apps/app_meetme.c
team/oej/test-this-branch/apps/app_mixmonitor.c
team/oej/test-this-branch/apps/app_osplookup.c
team/oej/test-this-branch/apps/app_page.c
team/oej/test-this-branch/apps/app_playback.c
team/oej/test-this-branch/apps/app_privacy.c
team/oej/test-this-branch/apps/app_queue.c
team/oej/test-this-branch/apps/app_random.c
team/oej/test-this-branch/apps/app_read.c
team/oej/test-this-branch/apps/app_readfile.c
team/oej/test-this-branch/apps/app_realtime.c
team/oej/test-this-branch/apps/app_record.c
team/oej/test-this-branch/apps/app_sayunixtime.c
team/oej/test-this-branch/apps/app_senddtmf.c
team/oej/test-this-branch/apps/app_sendtext.c
team/oej/test-this-branch/apps/app_setcallerid.c
team/oej/test-this-branch/apps/app_skel.c
team/oej/test-this-branch/apps/app_speech_utils.c
team/oej/test-this-branch/apps/app_stack.c
team/oej/test-this-branch/apps/app_talkdetect.c
team/oej/test-this-branch/apps/app_transfer.c
team/oej/test-this-branch/apps/app_url.c
team/oej/test-this-branch/apps/app_userevent.c
team/oej/test-this-branch/apps/app_verbose.c
team/oej/test-this-branch/apps/app_voicemail.c
team/oej/test-this-branch/apps/app_while.c
team/oej/test-this-branch/apps/app_zapras.c
team/oej/test-this-branch/apps/app_zapscan.c
team/oej/test-this-branch/asterisk.c
team/oej/test-this-branch/build_tools/Makefile
team/oej/test-this-branch/build_tools/menuselect.c
team/oej/test-this-branch/build_tools/menuselect.h
team/oej/test-this-branch/build_tools/menuselect_curses.c
team/oej/test-this-branch/build_tools/prep_moduledeps
team/oej/test-this-branch/callerid.c
team/oej/test-this-branch/channel.c
team/oej/test-this-branch/channels/chan_agent.c
team/oej/test-this-branch/channels/chan_alsa.c
team/oej/test-this-branch/channels/chan_features.c
team/oej/test-this-branch/channels/chan_iax2.c
team/oej/test-this-branch/channels/chan_local.c
team/oej/test-this-branch/channels/chan_mgcp.c
team/oej/test-this-branch/channels/chan_nbs.c
team/oej/test-this-branch/channels/chan_oss.c
team/oej/test-this-branch/channels/chan_phone.c
team/oej/test-this-branch/channels/chan_sip.c
team/oej/test-this-branch/channels/chan_skinny.c
team/oej/test-this-branch/channels/chan_vpb.c
team/oej/test-this-branch/channels/chan_zap.c
team/oej/test-this-branch/channels/iax2.h
team/oej/test-this-branch/cli.c
team/oej/test-this-branch/codecs/codec_a_mu.c
team/oej/test-this-branch/codecs/codec_alaw.c
team/oej/test-this-branch/codecs/codec_ulaw.c
team/oej/test-this-branch/configs/func_odbc.conf.sample
team/oej/test-this-branch/configs/iax.conf.sample
team/oej/test-this-branch/configs/misdn.conf.sample
team/oej/test-this-branch/configs/queues.conf.sample
team/oej/test-this-branch/configs/sip.conf.sample
team/oej/test-this-branch/configs/voicemail.conf.sample
team/oej/test-this-branch/configure.ac
team/oej/test-this-branch/doc/channelvariables.txt
team/oej/test-this-branch/doc/iax.txt
team/oej/test-this-branch/doc/manager.txt
team/oej/test-this-branch/doc/queuelog.txt
team/oej/test-this-branch/dsp.c
team/oej/test-this-branch/file.c
team/oej/test-this-branch/frame.c
team/oej/test-this-branch/funcs/func_channel.c
team/oej/test-this-branch/funcs/func_cut.c
team/oej/test-this-branch/funcs/func_odbc.c
team/oej/test-this-branch/funcs/func_realtime.c (contents, props changed)
team/oej/test-this-branch/include/ (props changed)
team/oej/test-this-branch/include/asterisk/ael_structs.h
team/oej/test-this-branch/include/asterisk/app.h
team/oej/test-this-branch/include/asterisk/astosp.h
team/oej/test-this-branch/include/asterisk/cdr.h
team/oej/test-this-branch/include/asterisk/channel.h
team/oej/test-this-branch/include/asterisk/devicestate.h
team/oej/test-this-branch/include/asterisk/frame.h
team/oej/test-this-branch/include/asterisk/manager.h
team/oej/test-this-branch/include/asterisk/module.h
team/oej/test-this-branch/include/asterisk/options.h
team/oej/test-this-branch/include/asterisk/pbx.h
team/oej/test-this-branch/include/asterisk/rtp.h
team/oej/test-this-branch/include/asterisk/translate.h
team/oej/test-this-branch/include/asterisk/utils.h
team/oej/test-this-branch/indications.c
team/oej/test-this-branch/loader.c
team/oej/test-this-branch/logger.c
team/oej/test-this-branch/makeopts.in
team/oej/test-this-branch/manager.c
team/oej/test-this-branch/mxml/ (props changed)
team/oej/test-this-branch/netsock.c
team/oej/test-this-branch/pbx.c
team/oej/test-this-branch/pbx/ael/ (props changed)
team/oej/test-this-branch/pbx/pbx_config.c
team/oej/test-this-branch/pbx/pbx_dundi.c
team/oej/test-this-branch/pbx/pbx_spool.c
team/oej/test-this-branch/redhat/asterisk.spec
team/oej/test-this-branch/res/res_agi.c
team/oej/test-this-branch/res/res_clioriginate.c
team/oej/test-this-branch/res/res_config_odbc.c
team/oej/test-this-branch/res/res_config_pgsql.c
team/oej/test-this-branch/res/res_convert.c
team/oej/test-this-branch/res/res_features.c
team/oej/test-this-branch/res/res_monitor.c
team/oej/test-this-branch/res/res_smdi.c
team/oej/test-this-branch/rtp.c
team/oej/test-this-branch/say.c
team/oej/test-this-branch/sched.c
team/oej/test-this-branch/sounds.txt
team/oej/test-this-branch/static-http/ajamdemo.html
team/oej/test-this-branch/strcompat.c
team/oej/test-this-branch/utils/Makefile
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue May 16 08:52:47 2006
@@ -19,9 +19,4 @@
config.status
config.log
makeopts.xml
-install-sh
-configure
-mkinstalldirs
autom4te.cache
-missing
-aclocal.m4
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May 16 08:52:47 2006
@@ -1,1 +1,1 @@
-/trunk:1-24333
+/trunk:1-26454
Modified: team/oej/test-this-branch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/Makefile?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/Makefile (original)
+++ team/oej/test-this-branch/Makefile Tue May 16 08:52:47 2006
@@ -369,9 +369,9 @@
endif
ifeq ($(OSARCH),Linux)
- LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
+ LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv #-lnjamd
else
- LIBS+=-lncurses -lm
+ LIBS+=$(EDITLINE_LIBS) -lm
endif
ifeq ($(OSARCH),Darwin)
@@ -399,22 +399,23 @@
endif
ifeq ($(OSARCH),NetBSD)
- LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib -lncurses
+ LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
endif
ifeq ($(OSARCH),OpenBSD)
- LIBS+=-lcrypto -lpthread -lm -lncurses
+ LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
endif
ifeq ($(OSARCH),SunOS)
LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
OBJS+=strcompat.o
+ MENUSELECT_OBJS+=strcompat.o
ASTLINK=
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
endif
ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
- CFLAGS+=$(ASTCFLAGS) $(TOPDIR_CFLAGS)
+ CFLAGS+=$(TOPDIR_CFLAGS) $(ASTCFLAGS)
endif
# This is used when generating the doxygen documentation
@@ -435,12 +436,9 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: include/autoconfig.h menuselect.makeopts cleantest depend asterisk subdirs
-
-configure:
- - at ./bootstrap.sh
-
-include/autoconfig.h: configure
+all: config.status menuselect.makeopts cleantest depend asterisk subdirs
+
+config.status: configure
@CFLAGS="" ./configure
@echo "****"
@echo "**** The configure script was just executed, so 'make' needs to be"
@@ -485,11 +483,11 @@
include .tags-depend
endif
-ast_expr2.c:
- bison -d --name-prefix=ast_yy ast_expr2.y -o ast_expr2.c
+ast_expr2.c ast_expr2.h:
+ bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
ast_expr2f.c:
- flex --full ast_expr2.fl
+ flex -o $@ --full ast_expr2.fl
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
gcc -g -c -DSTANDALONE ast_expr2f.c
@@ -532,7 +530,7 @@
rm -f $@.tmp
stdtime/libtime.a:
- CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C stdtime libtime.a
+ CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
build_tools/make_build_h > include/asterisk/build.h.tmp
@@ -547,16 +545,16 @@
$(CC) $(AUDIO_LIBS) -o muted muted.o
subdirs:
- for x in $(MOD_SUBDIRS); do CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C $$x || exit 1 ; done
- CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C utils
- CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C agi
+ @for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
+ @CFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C utils
+ @CFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C agi
clean-depend:
- for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
+ @for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
rm -f .depend .tags-depend
clean: clean-depend
- for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
+ @for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
rm -f *.o *.so asterisk
rm -f defaults.h
rm -f include/asterisk/build.h
@@ -712,7 +710,7 @@
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
install-subdirs:
- for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
+ @for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
NEWMODS=$(notdir $(wildcard */*.so))
OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -888,19 +886,37 @@
$(MAKE) -C mpg123-0.59r $(MPG123TARG)
config:
- if [ -d /etc/rc.d/init.d ]; then \
- $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
- /sbin/chkconfig --add asterisk; \
- elif [ -d /etc/init.d ]; then \
- $(INSTALL) -m 755 init.asterisk /etc/init.d/asterisk; \
- fi
+ @if [ "${OSARCH}" = "Linux" ]; 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; \
+ 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 .; \
+ 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; \
+ 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; \
+ 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; \
+ elif [ -f /etc/slackware-version ]; then \
+ echo "Slackware is not currently supported, although an init script does exist for it." \
+ else \
+ echo "We could not install init scripts for your distribution."; \
+ fi \
+ else \
+ echo "We could not install init scripts for your operating system."; \
+ fi
dont-optimize: _all
valgrind: dont-optimize
depend: include/asterisk/version.h .depend defaults.h
- for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
+ @for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
.depend: include/asterisk/version.h defaults.h
build_tools/mkdep $(CFLAGS) $(wildcard *.c)
@@ -985,7 +1001,7 @@
menuselect: build_tools/menuselect makeopts.xml
- at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h include/autoconfig.h strcompat.o mxml/libmxml.a
+build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h include/autoconfig.h mxml/libmxml.a $(MENUSELECT_OBJS)
$(MAKE) -C build_tools menuselect
mxml/libmxml.a:
Modified: team/oej/test-this-branch/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/UPGRADE.txt?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/UPGRADE.txt (original)
+++ team/oej/test-this-branch/UPGRADE.txt Tue May 16 08:52:47 2006
@@ -73,6 +73,40 @@
queue member channel that is taking the call. This is useful when trying
to link recording filenames back to a particular call from the queue.
+* The old/current behavior of app_queue has a serial type behavior
+ in that the queue will make all waiting callers wait in the queue
+ even if there is more than one available member ready to take
+ calls until the head caller is connected with the member they
+ were trying to get to. The next waiting caller in line then
+ becomes the head caller, and they are then connected with the
+ next available member and all available members and waiting callers
+ waits while this happens. This cycle continues until there are
+ no more available members or waiting callers, whichever comes first.
+ The new behavior, enabled by setting autofill=yes in queues.conf
+ either at the [general] level to default for all queues or
+ to set on a per-queue level, makes sure that when the waiting
+ callers are connecting with available members in a parallel fashion
+ until there are no more available members or no more waiting callers,
+ whichever comes first. This is probably more along the lines of how
+ one would expect a queue should work and in most cases, you will want
+ to enable this new behavior. If you do not specify or comment out this
+ option, it will default to "no" to keep backward compatability with the old
+ behavior.
+
+* The app_queue application now has the ability to use MixMonitor to
+ record conversations queue members are having with queue callers. Please
+ see configs/queues.conf.sample for more information on this option.
+
+* ast_play_and_record would attempt to cancel the recording if a DTMF
+ '0' was received. This behavior was not documented in most of the
+ applications that used ast_play_and_record and the return codes from
+ ast_play_and_record weren't checked for properly.
+ ast_play_and_record has been changed so that '0' no longer cancels a
+ recording. If you want to allow DTMF digits to cancel an
+ in-progress recording use ast_play_and_record_full which allows you
+ to specify which DTMF digits can be used to accept a recording and
+ which digits can be used to cancel a recording.
+
Manager:
* After executing the 'status' manager action, the "Status" manager events
@@ -115,6 +149,11 @@
* The ENUMLOOKUP() function with the 'c' option (for counting the number of records),
but the lookup fails to match any records, the returned value will now be "0" instead of blank.
+* The REALTIME() function is now available in version 1.4 and app_realtime has
+ been deprecated in favor of the new function. app_realtime will be removed
+ completely with the version 1.6 release so please take the time between
+ releases to make any necessary changes
+
The IAX2 channel:
* The "mailboxdetail" option has been deprecated. Previously, if this option
Modified: team/oej/test-this-branch/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/app.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/app.c (original)
+++ team/oej/test-this-branch/app.c Tue May 16 08:52:47 2006
@@ -144,86 +144,6 @@
return res;
}
-int ast_app_getvoice(struct ast_channel *c, char *dest, char *dstfmt, char *prompt, int silence, int maxsec)
-{
- int res;
- struct ast_filestream *writer;
- int rfmt;
- int totalms=0, total;
-
- struct ast_frame *f;
- struct ast_dsp *sildet;
- /* Play prompt if requested */
- if (prompt) {
- res = ast_stream_and_wait(c, prompt, c->language, "");
- if (res < 0)
- return res;
- }
- rfmt = c->readformat;
- res = ast_set_read_format(c, AST_FORMAT_SLINEAR);
- if (res < 0) {
- ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
- return -1;
- }
- sildet = ast_dsp_new();
- if (!sildet) {
- ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
- return -1;
- }
- writer = ast_writefile(dest, dstfmt, "Voice file", 0, 0, 0666);
- if (!writer) {
- ast_log(LOG_WARNING, "Unable to open file '%s' in format '%s' for writing\n", dest, dstfmt);
- ast_dsp_free(sildet);
- return -1;
- }
- for(;;) {
- if ((res = ast_waitfor(c, 2000)) < 0) {
- ast_log(LOG_NOTICE, "Waitfor failed while recording file '%s' format '%s'\n", dest, dstfmt);
- break;
- }
- if (res) {
- f = ast_read(c);
- if (!f) {
- ast_log(LOG_NOTICE, "Hungup while recording file '%s' format '%s'\n", dest, dstfmt);
- break;
- }
- if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
- /* Ended happily with DTMF */
- ast_frfree(f);
- break;
- } else if (f->frametype == AST_FRAME_VOICE) {
- ast_dsp_silence(sildet, f, &total);
- if (total > silence) {
- /* Ended happily with silence */
- ast_frfree(f);
- break;
- }
- totalms += f->samples / 8;
- if (totalms > maxsec * 1000) {
- /* Ended happily with too much stuff */
- ast_log(LOG_NOTICE, "Constraining voice on '%s' to %d seconds\n", c->name, maxsec);
- ast_frfree(f);
- break;
- }
- res = ast_writestream(writer, f);
- if (res < 0) {
- ast_log(LOG_WARNING, "Failed to write to stream at %s!\n", dest);
- ast_frfree(f);
- break;
- }
-
- }
- ast_frfree(f);
- }
- }
- res = ast_set_read_format(c, rfmt);
- if (res)
- ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", c->name);
- ast_dsp_free(sildet);
- ast_closestream(writer);
- return 0;
-}
-
static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
static int (*ast_messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
@@ -603,7 +523,7 @@
ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
sfmt[0] = ast_strdupa(fmts);
- while((fmt = strsep(&stringp, "|"))) {
+ while ((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
break;
@@ -1172,13 +1092,12 @@
case AST_ACTION_BACKLIST:
res = 0;
c = ast_strdupa(option->adata);
- if (c) {
- while((n = strsep(&c, ";")))
- if ((res = ast_stream_and_wait(chan, n, chan->language,
- (option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
- break;
- ast_stopstream(chan);
- }
+ while ((n = strsep(&c, ";"))) {
+ if ((res = ast_stream_and_wait(chan, n, chan->language,
+ (option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
+ break;
+ }
+ ast_stopstream(chan);
return res;
default:
ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);
Modified: team/oej/test-this-branch/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_amd.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_amd.c (original)
+++ team/oej/test-this-branch/apps/app_amd.c Tue May 16 08:52:47 2006
@@ -140,12 +140,7 @@
ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
} else {
/* Some arguments have been passed. Lets parse them and overwrite the defaults. */
- if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory allocation failure\n");
- pbx_builtin_setvar_helper(chan , "AMDSTATUS" , "" );
- pbx_builtin_setvar_helper(chan , "AMDCAUSE" , "" );
- return;
- }
+ parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
Modified: team/oej/test-this-branch/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_authenticate.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_authenticate.c (original)
+++ team/oej/test-this-branch/apps/app_authenticate.c Tue May 16 08:52:47 2006
@@ -123,10 +123,7 @@
}
}
- if (!(argcopy = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ argcopy = ast_strdupa(data);
AST_STANDARD_APP_ARGS(arglist,argcopy);
Modified: team/oej/test-this-branch/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_chanspy.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_chanspy.c (original)
+++ team/oej/test-this-branch/apps/app_chanspy.c Tue May 16 08:52:47 2006
@@ -56,7 +56,7 @@
#define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
-static const char *synopsis = "Listen to the audio of an active channel";
+static const char *tdesc = "Listen to the audio of an active channel";
static const char *app = "ChanSpy";
static const char *desc =
" ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
@@ -584,12 +584,12 @@
static int load_module(void *mod)
{
__mod_desc = mod;
- return ast_register_application(app, chanspy_exec, synopsis, desc);
+ return ast_register_application(app, chanspy_exec, tdesc, desc);
}
static const char *description(void)
{
- return (char *) synopsis;
+ return (char *) tdesc;
}
static const char *key(void)
Modified: team/oej/test-this-branch/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_db.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_db.c (original)
+++ team/oej/test-this-branch/apps/app_db.c Tue May 16 08:52:47 2006
@@ -71,10 +71,7 @@
LOCAL_USER_ADD(u);
- if (!(argv = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return 0;
- }
+ argv = ast_strdupa(data);
if (strchr(argv, '/')) {
family = strsep(&argv, "/");
@@ -115,10 +112,7 @@
LOCAL_USER_ADD(u);
- if (!(argv = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return 0;
- }
+ argv = ast_strdupa(data);
if (strchr(argv, '/')) {
family = strsep(&argv, "/");
Modified: team/oej/test-this-branch/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_dial.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_dial.c (original)
+++ team/oej/test-this-branch/apps/app_dial.c Tue May 16 08:52:47 2006
@@ -113,7 +113,8 @@
" G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
" the specified priority and the called party to the specified priority+1.\n"
" Optionally, an extension, or extension and context may be specified. \n"
-" Otherwise, the current extension is used.\n"
+" Otherwise, the current extension is used. You cannot use any additional\n"
+" action post answer options in conjunction with this option.\n"
" h - Allow the called party to hang up by sending the '*' DTMF digit.\n"
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
" j - Jump to priority n+101 if all of the requested channels were busy.\n"
@@ -146,6 +147,8 @@
" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
" specified priority. Optionally, an extension, or\n"
" extension and priority can be specified.\n"
+" You cannot use any additional action post answer options in conjunction\n"
+" with this option.\n"
" n - This option is a modifier for the screen/privacy mode. It specifies\n"
" that no introductions are to be saved in the priv-callerintros\n"
" directory.\n"
@@ -479,7 +482,7 @@
ast_clear_flag(o, DIAL_STILLGOING);
HANDLE_CAUSE(cause, in);
} else {
- ast_rtp_make_compatible(c, in);
+ ast_rtp_make_compatible(c, in, single);
if (c->cid.cid_num)
free(c->cid.cid_num);
c->cid.cid_num = NULL;
@@ -547,6 +550,8 @@
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
DIAL_NOFORWARDHTML);
+ /* Setup early media if appropriate */
+ ast_rtp_early_media(in, peer);
}
/* If call has been answered, then the eventual hangup is likely to be normal hangup */
in->hangupcause = AST_CAUSE_NORMAL_CLEARING;
@@ -573,6 +578,9 @@
case AST_CONTROL_RINGING:
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "%s is ringing\n", c->name);
+ /* Setup early media if appropriate */
+ if (single)
+ ast_rtp_early_media(in, c);
if (!(*sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
ast_indicate(in, AST_CONTROL_RINGING);
(*sentringing)++;
@@ -581,6 +589,9 @@
case AST_CONTROL_PROGRESS:
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", c->name, in->name);
+ /* Setup early media if appropriate */
+ if (single)
+ ast_rtp_early_media(in, c);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROGRESS);
break;
@@ -592,6 +603,8 @@
case AST_CONTROL_PROCEEDING:
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", c->name, in->name);
+ if (single)
+ ast_rtp_early_media(in, c);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROCEEDING);
break;
@@ -774,8 +787,7 @@
LOCAL_USER_ADD(u);
- if (!(parse = ast_strdupa(data)))
- goto done;
+ parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -1053,7 +1065,7 @@
}
/* Setup outgoing SDP to match incoming one */
- ast_rtp_make_compatible(tmp->chan, chan);
+ ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
/* Inherit specially named variables from parent channel */
ast_channel_inherit_variables(chan, tmp->chan);
@@ -1547,6 +1559,7 @@
sentringing = 0;
ast_indicate(chan, -1);
}
+ ast_rtp_early_media(chan, NULL);
hanguptree(outgoing, NULL);
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
if (option_debug)
@@ -1582,8 +1595,7 @@
LOCAL_USER_ADD(u);
- if (!(announce = ast_strdupa(data)))
- goto done;
+ announce = ast_strdupa(data);
memset(&peerflags, 0, sizeof(peerflags));
Modified: team/oej/test-this-branch/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_dictate.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_dictate.c (original)
+++ team/oej/test-this-branch/apps/app_dictate.c Tue May 16 08:52:47 2006
@@ -107,8 +107,7 @@
snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
if (!ast_strlen_zero(data)) {
- if (!(parse = ast_strdupa(data)))
- return -1;
+ parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
} else
args.argc = 0;
Modified: team/oej/test-this-branch/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_directory.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_directory.c (original)
+++ team/oej/test-this-branch/apps/app_directory.c Tue May 16 08:52:47 2006
@@ -411,10 +411,7 @@
LOCAL_USER_ADD(u);
- if (!(parse = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
Modified: team/oej/test-this-branch/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_disa.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_disa.c (original)
+++ team/oej/test-this-branch/apps/app_disa.c Tue May 16 08:52:47 2006
@@ -158,10 +158,7 @@
ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
- if (!(tmp = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ tmp = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, tmp);
Modified: team/oej/test-this-branch/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_exec.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_exec.c (original)
+++ team/oej/test-this-branch/apps/app_exec.c Tue May 16 08:52:47 2006
@@ -80,8 +80,7 @@
"The channel variable TRYSTATUS will be set to:\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"
-" NOMEMORY if there was not enough memory to execute.\n";
+" NOAPP if the application was not found or was not specified\n";
static char *app_execif = "ExecIf";
static char *execif_synopsis = "Executes dialplan application, conditionally";
@@ -104,25 +103,23 @@
/* Check and parse arguments */
if (data) {
- if ((s = ast_strdupa(data))) {
- appname = strsep(&s, "(");
- if (s) {
- endargs = strrchr(s, ')');
- if (endargs)
- *endargs = '\0';
- pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+ s = ast_strdupa(data);
+ appname = strsep(&s, "(");
+ if (s) {
+ endargs = strrchr(s, ')');
+ if (endargs)
+ *endargs = '\0';
+ pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+ }
+ if (appname) {
+ app = pbx_findapp(appname);
+ if (app) {
+ res = pbx_exec(chan, app, args);
+ } else {
+ ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+ res = -1;
}
- if (appname) {
- app = pbx_findapp(appname);
- if (app) {
- res = pbx_exec(chan, app, args);
- } else {
- ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
- res = -1;
- }
- }
- } else
- res = -1;
+ }
}
LOCAL_USER_REMOVE(u);
@@ -140,27 +137,23 @@
/* Check and parse arguments */
if (data) {
- if ((s = ast_strdupa(data))) {
- appname = strsep(&s, "(");
- if (s) {
- endargs = strrchr(s, ')');
- if (endargs)
- *endargs = '\0';
- pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+ s = ast_strdupa(data);
+ appname = strsep(&s, "(");
+ if (s) {
+ endargs = strrchr(s, ')');
+ if (endargs)
+ *endargs = '\0';
+ pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+ }
+ if (appname) {
+ app = pbx_findapp(appname);
+ if (app) {
+ res = pbx_exec(chan, app, args);
+ pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
+ } else {
+ ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+ pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
}
- if (appname) {
- app = pbx_findapp(appname);
- if (app) {
- res = pbx_exec(chan, app, args);
- pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
- } else {
- ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
- pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
- }
- }
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
- pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOMEMORY");
}
}
@@ -178,10 +171,7 @@
LOCAL_USER_ADD(u);
- if (!(expr = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ expr = ast_strdupa(data);
if ((myapp = strchr(expr,'|'))) {
*myapp = '\0';
Modified: team/oej/test-this-branch/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_externalivr.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_externalivr.c (original)
+++ team/oej/test-this-branch/apps/app_externalivr.c Tue May 16 08:52:47 2006
@@ -275,10 +275,7 @@
return -1;
}
- if (!(buf = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(lu);
- return -1;
- }
+ buf = ast_strdupa(data);
argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
Modified: team/oej/test-this-branch/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_festival.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_festival.c (original)
+++ team/oej/test-this-branch/apps/app_festival.c Tue May 16 08:52:47 2006
@@ -305,6 +305,7 @@
char *data;
char *intstr;
struct ast_config *cfg;
+ char *newfestivalcommand;
if (ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "festival requires an argument (text)\n");
@@ -337,13 +338,25 @@
}
if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
- }
-
- if (!(data = ast_strdupa(vdata))) {
- ast_config_destroy(cfg);
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ } else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
+ int i, j;
+ newfestivalcommand = alloca(strlen(festivalcommand) + 1);
+
+ for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
+ if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
+ newfestivalcommand[j++] = '\n';
+ i++;
+ } else if (festivalcommand[i] == '\\') {
+ newfestivalcommand[j++] = festivalcommand[i + 1];
+ i++;
+ } else
+ newfestivalcommand[j++] = festivalcommand[i];
+ }
+ newfestivalcommand[j] = '\0';
+ festivalcommand = newfestivalcommand;
+ }
+
+ data = ast_strdupa(vdata);
intstr = strchr(data, '|');
if (intstr) {
Modified: team/oej/test-this-branch/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_hasnewvoicemail.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_hasnewvoicemail.c (original)
+++ team/oej/test-this-branch/apps/app_hasnewvoicemail.c Tue May 16 08:52:47 2006
@@ -126,10 +126,7 @@
LOCAL_USER_ADD(u);
- if (!(input = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ input = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, input);
Modified: team/oej/test-this-branch/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_image.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_image.c (original)
+++ team/oej/test-this-branch/apps/app_image.c Tue May 16 08:52:47 2006
@@ -76,10 +76,7 @@
LOCAL_USER_ADD(u);
- if (!(parse = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
- return -1;
- }
+ parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
Modified: team/oej/test-this-branch/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_meetme.c?rev=27341&r1=27340&r2=27341&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_meetme.c (original)
+++ team/oej/test-this-branch/apps/app_meetme.c Tue May 16 08:52:47 2006
@@ -648,11 +648,11 @@
}
} else if (strcmp(argv[1], "list") == 0) {
int concise = ( argc == 4 && ( !strcasecmp(argv[3], "concise") ) );
+ int concise = ( 4 == argc && ( !strcasecmp(argv[3], "concise") ) );
/* List all the users in a conference */
if (AST_LIST_EMPTY(&confs)) {
- if ( !concise ) {
+ if ( !concise )
ast_cli(fd, "No active conferences.\n");
- }
return RESULT_SUCCESS;
}
/* Find the right conference */
@@ -661,9 +661,8 @@
break;
}
if (!cnf) {
- if ( !concise ) {
+ if ( !concise )
ast_cli(fd, "No such conference: %s.\n",argv[2]);
- }
return RESULT_SUCCESS;
}
/* Show all the users */
@@ -672,7 +671,7 @@
hr = (now - user->jointime) / 3600;
min = ((now - user->jointime) % 3600) / 60;
sec = (now - user->jointime) % 60;
- if ( !concise ) {
+ if ( !concise )
ast_cli(fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %02d:%02d:%02d\n",
user->user_no,
S_OR(user->chan->cid.cid_num, "<unknown>"),
@@ -682,22 +681,20 @@
user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "",
user->adminflags & ADMINFLAG_MUTED ? "(Admn Muted)" : "",
istalking(user->talking), hr, min, sec);
- } else {
+ else
ast_cli(fd, "%d!%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, ""),
user->chan->name,
- user->userflags & CONFFLAG_ADMIN ? "1" : "0",
- user->userflags & CONFFLAG_MONITOR ? "1" : "0",
[... 12449 lines stripped ...]
More information about the asterisk-commits
mailing list