[asterisk-commits] branch group/asterisk-xmpp r29503 - in
/team/group/asterisk-xmpp: ./ apps/ bu...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 22 10:13:44 MST 2006
Author: russell
Date: Mon May 22 12:13:44 2006
New Revision: 29503
URL: http://svn.digium.com/view/asterisk?rev=29503&view=rev
Log:
resolve conflicts and update to trunk
Added:
team/group/asterisk-xmpp/cdr/cdr_radius.c
- copied unchanged from r29467, trunk/cdr/cdr_radius.c
team/group/asterisk-xmpp/contrib/dictionary.digium
- copied unchanged from r29467, trunk/contrib/dictionary.digium
team/group/asterisk-xmpp/doc/radius.txt
- copied unchanged from r29467, trunk/doc/radius.txt
Modified:
team/group/asterisk-xmpp/ (props changed)
team/group/asterisk-xmpp/CREDITS
team/group/asterisk-xmpp/Makefile
team/group/asterisk-xmpp/UPGRADE.txt
team/group/asterisk-xmpp/acinclude.m4
team/group/asterisk-xmpp/aclocal.m4
team/group/asterisk-xmpp/app.c
team/group/asterisk-xmpp/apps/app_dial.c
team/group/asterisk-xmpp/apps/app_directed_pickup.c
team/group/asterisk-xmpp/apps/app_hasnewvoicemail.c
team/group/asterisk-xmpp/apps/app_meetme.c
team/group/asterisk-xmpp/apps/app_queue.c
team/group/asterisk-xmpp/apps/app_record.c
team/group/asterisk-xmpp/apps/app_sms.c
team/group/asterisk-xmpp/apps/app_userevent.c
team/group/asterisk-xmpp/apps/app_voicemail.c
team/group/asterisk-xmpp/asterisk.c
team/group/asterisk-xmpp/build_tools/cflags.xml
team/group/asterisk-xmpp/build_tools/menuselect-deps.in
team/group/asterisk-xmpp/cdr/Makefile
team/group/asterisk-xmpp/cdr/cdr_pgsql.c
team/group/asterisk-xmpp/channels/chan_iax2.c
team/group/asterisk-xmpp/channels/chan_local.c
team/group/asterisk-xmpp/channels/chan_misdn.c
team/group/asterisk-xmpp/channels/chan_sip.c
team/group/asterisk-xmpp/channels/chan_skinny.c
team/group/asterisk-xmpp/channels/h323/Makefile
team/group/asterisk-xmpp/channels/misdn/chan_misdn_config.h
team/group/asterisk-xmpp/channels/misdn_config.c
team/group/asterisk-xmpp/cli.c
team/group/asterisk-xmpp/codecs/codec_a_mu.c
team/group/asterisk-xmpp/codecs/codec_adpcm.c
team/group/asterisk-xmpp/codecs/codec_alaw.c
team/group/asterisk-xmpp/codecs/codec_ulaw.c
team/group/asterisk-xmpp/configs/cdr.conf.sample
team/group/asterisk-xmpp/configs/features.conf.sample
team/group/asterisk-xmpp/configs/func_odbc.conf.sample
team/group/asterisk-xmpp/configs/misdn.conf.sample
team/group/asterisk-xmpp/configure
team/group/asterisk-xmpp/configure.ac
team/group/asterisk-xmpp/doc/cdrdriver.txt
team/group/asterisk-xmpp/funcs/func_odbc.c
team/group/asterisk-xmpp/funcs/func_realtime.c
team/group/asterisk-xmpp/include/asterisk/app.h
team/group/asterisk-xmpp/include/asterisk/channel.h
team/group/asterisk-xmpp/include/autoconfig.h.in
team/group/asterisk-xmpp/makeopts.in
team/group/asterisk-xmpp/manager.c
team/group/asterisk-xmpp/pbx.c
team/group/asterisk-xmpp/pbx/pbx_spool.c
team/group/asterisk-xmpp/res/res_features.c
team/group/asterisk-xmpp/sample.call
team/group/asterisk-xmpp/utils/Makefile
team/group/asterisk-xmpp/utils/ael_main.c
team/group/asterisk-xmpp/utils/smsq.c
Propchange: team/group/asterisk-xmpp/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/group/asterisk-xmpp/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/group/asterisk-xmpp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 22 12:13:44 2006
@@ -1,1 +1,1 @@
-/trunk:1-28708
+/trunk:1-29492
Modified: team/group/asterisk-xmpp/CREDITS
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/CREDITS?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/CREDITS (original)
+++ team/group/asterisk-xmpp/CREDITS Mon May 22 12:13:44 2006
@@ -92,8 +92,9 @@
Music provided by www.freeplaymusic.com
=== OTHER SOURCE CODE IN ASTERISK ===
-Asterisk uses libedit, the lightweight readline replacement from
-NetBSD. It is BSD-licensed and requires the following statement:
+Asterisk uses libedit, the lightweight readline replacement from NetBSD.
+The cdr_radius module uses libradiusclient-ng, which is also from NetBSD.
+They are BSD-licensed and require the following statement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
Modified: team/group/asterisk-xmpp/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/Makefile?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/Makefile (original)
+++ team/group/asterisk-xmpp/Makefile Mon May 22 12:13:44 2006
@@ -82,41 +82,27 @@
# Define standard directories for various platforms
# These apply if they are not redefined in asterisk.conf
ifeq ($(OSARCH),SunOS)
- ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
- ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
- ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
- ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
- ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+ ASTETCDIR=/etc/opt/asterisk
+ ASTLIBDIR=/opt/asterisk/lib
+ ASTVARLIBDIR=/var/opt/asterisk/lib
+ ASTSPOOLDIR=/var/opt/asterisk/spool
+ ASTLOGDIR=/var/opt/asterisk/log
+ ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
+ ASTBINDIR=/opt/asterisk/usr/bin
+ ASTSBINDIR=/opt/asterisk/usr/sbin
+ ASTVARRUNDIR=/var/opt/asterisk/run
+ ASTMANDIR=/opt/asterisk/usr/share/man
else
-ifeq ($(OSARCH),FreeBSD)
- PREFIX?=/usr/local
- ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
- ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
- ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
- ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
-else
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
- ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
- ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
- ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
-endif
+ ASTETCDIR=$(sysconfdir)/asterisk
+ ASTLIBDIR=$(libdir)/asterisk
+ ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+ ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+ ASTLOGDIR=$(localstatedir)/log/asterisk
+ ASTHEADERDIR=$(includedir)/asterisk
+ ASTBINDIR=$(bindir)
+ ASTSBINDIR=$(sbindir)
+ ASTVARRUNDIR=$(localstatedir)/run
+ ASTMANDIR=$(mandir)
endif
ASTDATADIR?=$(ASTVARLIBDIR)
@@ -279,9 +265,6 @@
endif
ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
-ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-ASTCFLAGS+=-fomit-frame-pointer
-endif
MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs
OTHER_SUBDIRS=utils stdtime agi
@@ -384,7 +367,7 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest defaults.h config.status menuselect.makeopts depend asterisk subdirs
config.status: configure
@CFLAGS="" ./configure
Modified: team/group/asterisk-xmpp/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/UPGRADE.txt?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/UPGRADE.txt (original)
+++ team/group/asterisk-xmpp/UPGRADE.txt Mon May 22 12:13:44 2006
@@ -107,6 +107,12 @@
to specify which DTMF digits can be used to accept a recording and
which digits can be used to cancel a recording.
+* ast_app_messagecount has been renamed to ast_app_inboxcount. There is now a
+ new ast_app_messagecount function which takes a single context/mailbox/folder
+ mailbox specification and returns the message count for that folder only.
+ This addresses the deficiency of not being able to count the number of
+ messages in folders other than INBOX and Old.
+
Manager:
* After executing the 'status' manager action, the "Status" manager events
@@ -120,6 +126,11 @@
which contains the unique ID of the 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.
+
+* app_userevent has been modified to always send Event: UserEvent with the
+ additional header UserEvent: <userspec>. Also, the Channel and UniqueID
+ headers are not automatically sent, unless you specify them as separate
+ arguments. Please see the application help for the new syntax.
Variables:
Modified: team/group/asterisk-xmpp/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/acinclude.m4?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/acinclude.m4 (original)
+++ team/group/asterisk-xmpp/acinclude.m4 Mon May 22 12:13:44 2006
@@ -5,35 +5,35 @@
AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
case ${withval} in
n|no)
- USE_$1=no
+ USE_$4=no
;;
y|ye|yes)
- $1_MANDATORY="yes"
+ $4_MANDATORY="yes"
;;
*)
- $1_DIR="${withval}"
- $1_MANDATORY="yes"
+ $4_DIR="${withval}"
+ $4_MANDATORY="yes"
;;
esac
])
-PBX_LIB$1=0
+PBX_LIB$4=0
-if test "${USE_$1}" != "no"; then
- libdir=""
- if test "x${$1_DIR}" != "x"; then
- libdir="-L${$1_DIR}/lib"
+if test "${USE_$4}" != "no"; then
+ pbxlibdir=""
+ if test "x${$4_DIR}" != "x"; then
+ pbxlibdir="-L${$1_DIR}/lib"
fi
- AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
+ AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
- if test "${ac_cv_lib_$1_$2}" = "yes"; then
- $1_LIB="-l$1 $6"
+ if test "${AST_$4_FOUND}" = "yes"; then
+ $4_LIB="-l$1 $6"
$4_HEADER_FOUND="1"
- if test "x${$1_DIR}" != "x"; then
- $1_LIB="${libdir} ${$1_LIB}"
- $1_INCLUDE="-I${$1_DIR}/include"
+ if test "x${$4_DIR}" != "x"; then
+ $4_LIB="${pbxlibdir} ${$4_LIB}"
+ $4_INCLUDE="-I${$4_DIR}/include"
if test "x$3" != "x" ; then
- AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+ AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
fi
else
if test "x$3" != "x" ; then
@@ -41,7 +41,7 @@
fi
fi
if test "x${$4_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${$1_MANDATORY}" ;
+ if test ! -z "${$4_MANDATORY}" ;
then
echo " ***"
echo " *** It appears that you do not have the $1 development package installed."
@@ -49,14 +49,14 @@
echo " *** without explicitly specifying --with-$1"
exit 1
fi
- $1_LIB=""
- $1_INCLUDE=""
- PBX_LIB$1=0
+ $4_LIB=""
+ $4_INCLUDE=""
+ PBX_LIB$4=0
else
- PBX_LIB$1=1
+ PBX_LIB$4=1
AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
fi
- elif test ! -z "${$1_MANDATORY}";
+ elif test ! -z "${$4_MANDATORY}";
then
echo "***"
echo "*** The $5 installation on this system appears to be broken."
@@ -65,9 +65,9 @@
exit 1
fi
fi
-AC_SUBST([$1_LIB])
-AC_SUBST([$1_INCLUDE])
-AC_SUBST([PBX_LIB$1])
+AC_SUBST([$4_LIB])
+AC_SUBST([$4_INCLUDE])
+AC_SUBST([PBX_LIB$4])
])
Modified: team/group/asterisk-xmpp/aclocal.m4
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/aclocal.m4?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/aclocal.m4 (original)
+++ team/group/asterisk-xmpp/aclocal.m4 Mon May 22 12:13:44 2006
@@ -1,7 +1,7 @@
-# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,94 +11,4 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
-
-AC_DEFUN([AST_EXT_LIB],
-[
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
-case ${withval} in
- n|no)
- USE_$1=no
- ;;
- y|ye|yes)
- $1_MANDATORY="yes"
- ;;
- *)
- $1_DIR="${withval}"
- $1_MANDATORY="yes"
- ;;
-esac
-])
-
-PBX_LIB$1=0
-
-if test "${USE_$1}" != "no"; then
- libdir=""
- if test "x${$1_DIR}" != "x"; then
- libdir="-L${$1_DIR}/lib"
- fi
- AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
-
- if test "${ac_cv_lib_$1_$2}" = "yes"; then
- $1_LIB="-l$1 $6"
- $4_HEADER_FOUND="1"
- if test "x${$1_DIR}" != "x"; then
- $1_LIB="${libdir} ${$1_LIB}"
- $1_INCLUDE="-I${$1_DIR}/include"
- if test "x$3" != "x" ; then
- AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
- fi
- else
- if test "x$3" != "x" ; then
- AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
- fi
- fi
- if test "x${$4_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${$1_MANDATORY}" ;
- then
- echo " ***"
- echo " *** It appears that you do not have the $1 development package installed."
- echo " *** Please install it to include $5 support, or re-run configure"
- echo " *** without explicitly specifying --with-$1"
- exit 1
- fi
- $1_LIB=""
- $1_INCLUDE=""
- PBX_LIB$1=0
- else
- PBX_LIB$1=1
- AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
- fi
- elif test ! -z "${$1_MANDATORY}";
- then
- echo "***"
- echo "*** The $5 installation on this system appears to be broken."
- echo "*** Either correct the installation, or run configure"
- echo "*** without explicity specifying --with-$1"
- exit 1
- fi
-fi
-AC_SUBST([$1_LIB])
-AC_SUBST([$1_INCLUDE])
-AC_SUBST([PBX_LIB$1])
-])
-
-
-AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
- GNU_MAKE='Not Found' ;
- for a in make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- GNU_MAKE=$a ;
- break;
- fi
- done ;
-) ;
-if test "x$GNU_MAKE" = "xNot Found" ; then
- echo " *** Please install GNU make. It is required to build Asterisk!"
- exit 1
-fi
-AC_SUBST([GNU_MAKE])
-])
-
+m4_include([acinclude.m4])
Modified: team/group/asterisk-xmpp/app.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/app.c?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/app.c (original)
+++ team/group/asterisk-xmpp/app.c Mon May 22 12:13:44 2006
@@ -145,23 +145,23 @@
}
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;
-static int (*ast_messagecount2_func)(const char *context, const char *mailbox, const char *folder) = NULL;
+static int (*ast_inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
+static int (*ast_messagecount_func)(const char *context, const char *mailbox, const char *folder) = NULL;
void ast_install_vm_functions(int (*has_voicemail_func)(const char *mailbox, const char *folder),
- int (*messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
- int (*messagecount2_func)(const char *context, const char *mailbox, const char *folder))
+ int (*inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
+ int (*messagecount_func)(const char *context, const char *mailbox, const char *folder))
{
ast_has_voicemail_func = has_voicemail_func;
+ ast_inboxcount_func = inboxcount_func;
ast_messagecount_func = messagecount_func;
- ast_messagecount2_func = messagecount2_func;
}
void ast_uninstall_vm_functions(void)
{
ast_has_voicemail_func = NULL;
+ ast_inboxcount_func = NULL;
ast_messagecount_func = NULL;
- ast_messagecount2_func = NULL;
}
int ast_app_has_voicemail(const char *mailbox, const char *folder)
@@ -178,15 +178,15 @@
}
-int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
+int ast_app_inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
{
static int warned = 0;
if (newmsgs)
*newmsgs = 0;
if (oldmsgs)
*oldmsgs = 0;
- if (ast_messagecount_func)
- return ast_messagecount_func(mailbox, newmsgs, oldmsgs);
+ if (ast_inboxcount_func)
+ return ast_inboxcount_func(mailbox, newmsgs, oldmsgs);
if (!warned && (option_verbose > 2)) {
warned++;
@@ -196,11 +196,11 @@
return 0;
}
-int ast_app_messagecount2(const char *context, const char *mailbox, const char *folder)
+int ast_app_messagecount(const char *context, const char *mailbox, const char *folder)
{
static int warned = 0;
- if (ast_messagecount2_func)
- return ast_messagecount2_func(context, mailbox, folder);
+ if (ast_messagecount_func)
+ return ast_messagecount_func(context, mailbox, folder);
if (!warned && (option_verbose > 2)) {
warned++;
@@ -549,8 +549,7 @@
sfmt[fmtcnt++] = ast_strdupa(fmt);
}
- time(&start);
- end = start; /* pre-initialize end to be same as start in case we never get into loop */
+ end = start = time(NULL); /* pre-initialize end to be same as start in case we never get into loop */
for (x = 0; x < fmtcnt; x++) {
others[x] = ast_writefile(prepend ? prependfile : recordfile, sfmt[x], comment, O_TRUNC, 0, 0700);
if (option_verbose > 2)
@@ -670,7 +669,7 @@
}
}
if (maxtime) {
- time(&end);
+ end = time(NULL);
if (maxtime < (end - start)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Took too long, cutting it short...\n");
@@ -689,7 +688,8 @@
} else {
ast_frfree(f);
}
- if (end == start) time(&end);
+ if (end == start)
+ end = time(NULL);
} else {
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", recordfile, sfmt[x]);
}
@@ -931,7 +931,7 @@
close(fd);
snprintf(s, strlen(path) + 9, "%s/.lock", path);
- time(&start);
+ start = time(NULL);
while (((res = link(fs, s)) < 0) && (errno == EEXIST) && (time(NULL) - start < 5))
usleep(1);
if (res) {
Modified: team/group/asterisk-xmpp/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/apps/app_dial.c?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/apps/app_dial.c (original)
+++ team/group/asterisk-xmpp/apps/app_dial.c Mon May 22 12:13:44 2006
@@ -183,7 +183,11 @@
" w - Allow the called party to enable recording of the call by sending\n"
" the DTMF sequence defined for one-touch recording in features.conf.\n"
" W - Allow the calling party to enable recording of the call by sending\n"
-" the DTMF sequence defined for one-touch recording in features.conf.\n";
+" the DTMF sequence defined for one-touch recording in features.conf.\n"
+" k - Allow the called party to enable parking of the call by sending\n"
+" the DTMF sequence defined for call parking in features.conf.\n"
+" K - Allow the calling party to enable parking of the call by sending\n"
+" the DTMF sequence defined for call parking in features.conf.\n";
/* RetryDial App by Anthony Minessale II <anthmct at yahoo.com> Jan/2005 */
static char *rapp = "RetryDial";
@@ -227,6 +231,8 @@
OPT_CALLER_MONITOR = (1 << 22),
OPT_GOTO = (1 << 23),
OPT_OPERMODE = (1 << 24),
+ OPT_CALLEE_PARK = (1 << 25),
+ OPT_CALLER_PARK = (1 << 26),
} dial_exec_option_flags;
#define DIAL_STILLGOING (1 << 30)
@@ -272,6 +278,8 @@
AST_APP_OPTION('T', OPT_CALLER_TRANSFER),
AST_APP_OPTION('w', OPT_CALLEE_MONITOR),
AST_APP_OPTION('W', OPT_CALLER_MONITOR),
+ AST_APP_OPTION('k', OPT_CALLEE_PARK),
+ AST_APP_OPTION('K', OPT_CALLER_PARK),
});
/* We define a custom "local user" structure because we
@@ -441,6 +449,7 @@
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
+ OPT_CALLEE_PARK | OPT_CALLER_PARK |
DIAL_NOFORWARDHTML);
}
continue;
@@ -551,6 +560,7 @@
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
+ OPT_CALLEE_PARK | OPT_CALLER_PARK |
DIAL_NOFORWARDHTML);
/* Setup early media if appropriate */
ast_rtp_early_media(in, peer);
@@ -1016,6 +1026,7 @@
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
+ OPT_CALLEE_PARK | OPT_CALLER_PARK |
OPT_RINGBACK | OPT_MUSICBACK | OPT_FORCECLID);
ast_set2_flag(tmp, args.url, DIAL_NOFORWARDHTML);
}
@@ -1497,6 +1508,10 @@
ast_set_flag(&(config.features_callee), AST_FEATURE_AUTOMON);
if (ast_test_flag(peerflags, OPT_CALLER_MONITOR))
ast_set_flag(&(config.features_caller), AST_FEATURE_AUTOMON);
+ if (ast_test_flag(peerflags, OPT_CALLEE_PARK))
+ ast_set_flag(&(config.features_callee), AST_FEATURE_PARKCALL);
+ if (ast_test_flag(peerflags, OPT_CALLER_PARK))
+ ast_set_flag(&(config.features_caller), AST_FEATURE_PARKCALL);
config.timelimit = timelimit;
config.play_warning = play_warning;
Modified: team/group/asterisk-xmpp/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/apps/app_directed_pickup.c?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/apps/app_directed_pickup.c (original)
+++ team/group/asterisk-xmpp/apps/app_directed_pickup.c Mon May 22 12:13:44 2006
@@ -20,7 +20,7 @@
*
* \brief Directed Call Pickup Support
*
- * \author Joshua Colp <jcolp at asterlink.com>
+ * \author Joshua Colp <jcolp at digium.com>
*
* \ingroup applications
*/
@@ -42,12 +42,16 @@
#include "asterisk/lock.h"
#include "asterisk/app.h"
+#define PICKUPMARK "PICKUPMARK"
+
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 pickup any ringing channel\n"
"that is calling the specified extension. If no context is specified, the current\n"
-"context will be used.\n";
+"context will be used. If you use the special string \"PICKUPMARK\" for the context parameter, for example\n"
+"10 at PICKUPMARK, this application tries to find a channel which has defined a channel variable with the same context\n"
+"as \"extension\".";
LOCAL_USER_DECL;
@@ -58,6 +62,7 @@
struct ast_channel *origin = NULL, *target = NULL;
char *tmp = NULL, *exten = NULL, *context = NULL, *rest=data;
char workspace[256] = "";
+ const char *tmp2 = NULL;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Pickup requires an argument (extension) !\n");
@@ -77,8 +82,21 @@
if (context)
*context++ = '\0';
- /* Find a channel to pickup */
- origin = ast_get_channel_by_exten_locked(exten, context);
+ /* If the context is the pickup mark, iterate through all channels finding the right origin one */
+ if (!strcmp(context, PICKUPMARK)) {
+ while ((origin = ast_channel_walk_locked(origin))) {
+ if (origin) {
+ tmp2 = pbx_builtin_getvar_helper(origin, PICKUPMARK);
+ if (tmp2 && !strcmp(tmp2, exten))
+ break;
+ ast_mutex_unlock(&origin->lock);
+ }
+ }
+ } else {
+ /* Use the classic mode of searching */
+ origin = ast_get_channel_by_exten_locked(exten, context);
+ }
+
if (origin) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0, 0);
Modified: team/group/asterisk-xmpp/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/apps/app_hasnewvoicemail.c?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/apps/app_hasnewvoicemail.c (original)
+++ team/group/asterisk-xmpp/apps/app_hasnewvoicemail.c Mon May 22 12:13:44 2006
@@ -128,7 +128,7 @@
priority_jump = 1;
}
- vmcount = ast_app_messagecount2(context, vmbox, vmfolder);
+ vmcount = ast_app_messagecount(context, vmbox, vmfolder);
/* Set the count in the channel variable */
if (varname) {
snprintf(tmp, sizeof(tmp), "%d", vmcount);
@@ -177,7 +177,7 @@
args.folder = "INBOX";
}
- snprintf(buf, len, "%d", ast_app_messagecount2(context, args.vmbox, args.folder));
+ snprintf(buf, len, "%d", ast_app_messagecount(context, args.vmbox, args.folder));
LOCAL_USER_REMOVE(u);
Modified: team/group/asterisk-xmpp/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/apps/app_meetme.c?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- team/group/asterisk-xmpp/apps/app_meetme.c (original)
+++ team/group/asterisk-xmpp/apps/app_meetme.c Mon May 22 12:13:44 2006
@@ -63,6 +63,120 @@
#include "asterisk/translate.h"
#include "asterisk/ulaw.h"
+#include "enter.h"
+#include "leave.h"
+
+LOCAL_USER_DECL;
+
+#define CONFIG_FILE_NAME "meetme.conf"
+
+/*! each buffer is 20ms, so this is 640ms total */
+#define DEFAULT_AUDIO_BUFFERS 32
+
+enum {
+ ADMINFLAG_MUTED = (1 << 1), /*!< User is muted */
+ ADMINFLAG_KICKME = (1 << 2) /*!< User has been kicked */
+};
+
+#define MEETME_DELAYDETECTTALK 300
+#define MEETME_DELAYDETECTENDTALK 1000
+
+#define AST_FRAME_BITS 32
+
+enum volume_action {
+ VOL_UP,
+ VOL_DOWN
+};
+
+enum entrance_sound {
+ ENTER,
+ LEAVE
+};
+
+enum recording_state {
+ MEETME_RECORD_OFF,
+ MEETME_RECORD_STARTED,
+ MEETME_RECORD_ACTIVE,
+ MEETME_RECORD_TERMINATE
+};
+
+#define CONF_SIZE 320
+
+enum {
+ /*! user has admin access on the conference */
+ CONFFLAG_ADMIN = (1 << 0),
+ /*! If set the user can only receive audio from the conference */
+ CONFFLAG_MONITOR = (1 << 1),
+ /*! If set asterisk will exit conference when '#' is pressed */
+ CONFFLAG_POUNDEXIT = (1 << 2),
+ /*! If set asterisk will provide a menu to the user when '*' is pressed */
+ CONFFLAG_STARMENU = (1 << 3),
+ /*! If set the use can only send audio to the conference */
+ CONFFLAG_TALKER = (1 << 4),
+ /*! If set there will be no enter or leave sounds */
+ CONFFLAG_QUIET = (1 << 5),
+ /*! If set, when user joins the conference, they will be told the number
+ * of users that are already in */
+ CONFFLAG_ANNOUNCEUSERCOUNT = (1 << 6),
+ /*! Set to run AGI Script in Background */
+ CONFFLAG_AGI = (1 << 7),
+ /*! Set to have music on hold when user is alone in conference */
+ CONFFLAG_MOH = (1 << 8),
+ /*! If set the MeetMe will return if all marked with this flag left */
+ CONFFLAG_MARKEDEXIT = (1 << 9),
+ /*! If set, the MeetMe will wait until a marked user enters */
+ CONFFLAG_WAITMARKED = (1 << 10),
+ /*! If set, the MeetMe will exit to the specified context */
+ CONFFLAG_EXIT_CONTEXT = (1 << 11),
+ /*! If set, the user will be marked */
+ CONFFLAG_MARKEDUSER = (1 << 12),
+ /*! If set, user will be ask record name on entry of conference */
+ CONFFLAG_INTROUSER = (1 << 13),
+ /*! If set, the MeetMe will be recorded */
+ CONFFLAG_RECORDCONF = (1<< 14),
+ /*! If set, the user will be monitored if the user is talking or not */
+ CONFFLAG_MONITORTALKER = (1 << 15),
+ CONFFLAG_DYNAMIC = (1 << 16),
+ CONFFLAG_DYNAMICPIN = (1 << 17),
+ CONFFLAG_EMPTY = (1 << 18),
+ CONFFLAG_EMPTYNOPIN = (1 << 19),
+ CONFFLAG_ALWAYSPROMPT = (1 << 20),
+ /*! If set, treats talking users as muted users */
+ CONFFLAG_OPTIMIZETALKER = (1 << 21),
+ /*! If set, won't speak the extra prompt when the first person
+ * enters the conference */
+ CONFFLAG_NOONLYPERSON = (1 << 22),
+ CONFFLAG_INTROUSERNOREVIEW = (1 << 23)
+ /*! If set, user will be asked to record name on entry of conference
+ * without review */
+};
+
+AST_APP_OPTIONS(meetme_opts, {
+ AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
+ AST_APP_OPTION('a', CONFFLAG_ADMIN ),
+ AST_APP_OPTION('b', CONFFLAG_AGI ),
+ AST_APP_OPTION('c', CONFFLAG_ANNOUNCEUSERCOUNT ),
+ AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
+ AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
+ AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
+ AST_APP_OPTION('e', CONFFLAG_EMPTY ),
+ AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
+ AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ),
+ AST_APP_OPTION('M', CONFFLAG_MOH ),
+ AST_APP_OPTION('m', CONFFLAG_MONITOR ),
+ AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
+ AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
+ AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
+ AST_APP_OPTION('q', CONFFLAG_QUIET ),
+ AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
+ AST_APP_OPTION('s', CONFFLAG_STARMENU ),
+ AST_APP_OPTION('T', CONFFLAG_MONITORTALKER ),
+ AST_APP_OPTION('t', CONFFLAG_TALKER ),
+ AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
+ AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
+ AST_APP_OPTION('x', CONFFLAG_MARKEDEXIT ),
+ AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
+});
static const char *app = "MeetMe";
static const char *app2 = "MeetMeCount";
@@ -137,31 +251,27 @@
" 'N' -- Mute entire conference (except admin)\n"
"";
-#define CONFIG_FILE_NAME "meetme.conf"
-
-LOCAL_USER_DECL;
-
struct ast_conference {
- ast_mutex_t playlock; /* Conference specific lock (players) */
- ast_mutex_t listenlock; /* Conference specific lock (listeners) */
- char confno[AST_MAX_EXTENSION]; /* Conference */
- struct ast_channel *chan; /* Announcements channel */
- struct ast_channel *lchan; /* Listen/Record channel */
- int fd; /* Announcements fd */
- int zapconf; /* Zaptel Conf # */
- int users; /* Number of active users */
- int markedusers; /* Number of marked users */
- time_t start; /* Start time (s) */
- int refcount; /* reference count of usage */
- unsigned int recording:2; /* recording status */
- unsigned int isdynamic:1; /* Created on the fly? */
- unsigned int locked:1; /* Is the conference locked? */
- pthread_t recordthread; /* thread for recording */
- pthread_attr_t attr; /* thread attribute */
- const char *recordingfilename; /* Filename to record the Conference into */
- const char *recordingformat; /* Format to record the Conference in */
- char pin[AST_MAX_EXTENSION]; /* If protected by a PIN */
- char pinadmin[AST_MAX_EXTENSION]; /* If protected by a admin PIN */
+ ast_mutex_t playlock; /*!< Conference specific lock (players) */
+ ast_mutex_t listenlock; /*!< Conference specific lock (listeners) */
+ char confno[AST_MAX_EXTENSION]; /*!< Conference */
+ struct ast_channel *chan; /*!< Announcements channel */
+ struct ast_channel *lchan; /*!< Listen/Record channel */
+ int fd; /*!< Announcements fd */
+ int zapconf; /*!< Zaptel Conf # */
+ int users; /*!< Number of active users */
+ int markedusers; /*!< Number of marked users */
+ time_t start; /*!< Start time (s) */
+ int refcount; /*!< reference count of usage */
+ enum recording_state recording:2; /*!< recording status */
+ unsigned int isdynamic:1; /*!< Created on the fly? */
+ unsigned int locked:1; /*!< Is the conference locked? */
+ pthread_t recordthread; /*!< thread for recording */
+ pthread_attr_t attr; /*!< thread attribute */
+ const char *recordingfilename; /*!< Filename to record the Conference into */
+ const char *recordingformat; /*!< Format to record the Conference in */
+ char pin[AST_MAX_EXTENSION]; /*!< If protected by a PIN */
+ char pinadmin[AST_MAX_EXTENSION]; /*!< If protected by a admin PIN */
struct ast_frame *transframe[32];
struct ast_frame *origframe;
struct ast_trans_pvt *transpath[32];
@@ -172,111 +282,52 @@
static AST_LIST_HEAD_STATIC(confs, ast_conference);
struct volume {
- int desired; /* Desired volume adjustment */
- int actual; /* Actual volume adjustment (for channels that can't adjust) */
+ int desired; /*!< Desired volume adjustment */
+ int actual; /*!< Actual volume adjustment (for channels that can't adjust) */
};
struct ast_conf_user {
- int user_no; /* User Number */
- int userflags; /* Flags as set in the conference */
- int adminflags; /* Flags set by the Admin */
- struct ast_channel *chan; /* Connected channel */
- int talking; /* Is user talking */
- int zapchannel; /* Is a Zaptel channel */
- char usrvalue[50]; /* Custom User Value */
- char namerecloc[AST_MAX_EXTENSION]; /* Name Recorded file Location */
- time_t jointime; /* Time the user joined the conference */
+ int user_no; /*!< User Number */
+ int userflags; /*!< Flags as set in the conference */
+ int adminflags; /*!< Flags set by the Admin */
+ struct ast_channel *chan; /*!< Connected channel */
+ int talking; /*!< Is user talking */
+ int zapchannel; /*!< Is a Zaptel channel */
+ char usrvalue[50]; /*!< Custom User Value */
+ char namerecloc[AST_MAX_EXTENSION]; /*!< Name Recorded file Location */
+ time_t jointime; /*!< Time the user joined the conference */
struct volume talk;
struct volume listen;
AST_LIST_ENTRY(ast_conf_user) list;
};
-static int audio_buffers; /* The number of audio buffers to be allocated on pseudo channels
- when in a conference
- */
-
-#define DEFAULT_AUDIO_BUFFERS 32 /* each buffer is 20ms, so this is 640ms total */
-
-#define ADMINFLAG_MUTED (1 << 1) /* User is muted */
-#define ADMINFLAG_KICKME (1 << 2) /* User is kicked */
-#define MEETME_DELAYDETECTTALK 300
-#define MEETME_DELAYDETECTENDTALK 1000
-
-#define AST_FRAME_BITS 32
-
-enum volume_action {
- VOL_UP,
- VOL_DOWN,
+/*! The number of audio buffers to be allocated on pseudo channels
+ * when in a conference */
+static int audio_buffers;
+
+/*! Map 'volume' levels from -5 through +5 into
+ * decibel (dB) settings for channel drivers
+ * Note: these are not a straight linear-to-dB
+ * conversion... the numbers have been modified
+ * to give the user a better level of adjustability
+ */
+static signed char gain_map[] = {
+ -15,
+ -13,
+ -10,
+ -6,
+ 0,
+ 0,
+ 0,
+ 6,
+ 10,
+ 13,
+ 15,
};
+
static int admin_exec(struct ast_channel *chan, void *data);
-
static void *recordthread(void *args);
-
-#include "enter.h"
-#include "leave.h"
-
-#define ENTER 0
-#define LEAVE 1
-
-#define MEETME_RECORD_OFF 0
-#define MEETME_RECORD_STARTED 1
-#define MEETME_RECORD_ACTIVE 2
-#define MEETME_RECORD_TERMINATE 3
-
-#define CONF_SIZE 320
-
-#define CONFFLAG_ADMIN (1 << 1) /* If set the user has admin access on the conference */
-#define CONFFLAG_MONITOR (1 << 2) /* If set the user can only receive audio from the conference */
-#define CONFFLAG_POUNDEXIT (1 << 3) /* If set asterisk will exit conference when '#' is pressed */
-#define CONFFLAG_STARMENU (1 << 4) /* If set asterisk will provide a menu to the user when '*' is pressed */
-#define CONFFLAG_TALKER (1 << 5) /* If set the use can only send audio to the conference */
-#define CONFFLAG_QUIET (1 << 6) /* If set there will be no enter or leave sounds */
-#define CONFFLAG_ANNOUNCEUSERCOUNT (1 << 7) /* If set, when user joins the conference, they will be told the number of users that are already in */
-#define CONFFLAG_AGI (1 << 8) /* Set to run AGI Script in Background */
-#define CONFFLAG_MOH (1 << 9) /* Set to have music on hold when user is alone in conference */
-#define CONFFLAG_MARKEDEXIT (1 << 10) /* If set the MeetMe will return if all marked with this flag left */
-#define CONFFLAG_WAITMARKED (1 << 11) /* If set, the MeetMe will wait until a marked user enters */
-#define CONFFLAG_EXIT_CONTEXT (1 << 12) /* If set, the MeetMe will exit to the specified context */
-#define CONFFLAG_MARKEDUSER (1 << 13) /* If set, the user will be marked */
-#define CONFFLAG_INTROUSER (1 << 14) /* If set, user will be ask record name on entry of conference */
-#define CONFFLAG_RECORDCONF (1<< 15) /* If set, the MeetMe will be recorded */
-#define CONFFLAG_MONITORTALKER (1 << 16) /* If set, the user will be monitored if the user is talking or not */
-#define CONFFLAG_DYNAMIC (1 << 17)
-#define CONFFLAG_DYNAMICPIN (1 << 18)
-#define CONFFLAG_EMPTY (1 << 19)
-#define CONFFLAG_EMPTYNOPIN (1 << 20)
-#define CONFFLAG_ALWAYSPROMPT (1 << 21)
-#define CONFFLAG_OPTIMIZETALKER (1 << 22) /* If set, treats talking users as muted users */
-#define CONFFLAG_NOONLYPERSON (1 << 23) /* If set, won't speak the extra prompt when the first person enters the conference */
-#define CONFFLAG_INTROUSERNOREVIEW (1 << 24) /* If set, user will be asked to record name on entry of conference without review */
-
-AST_APP_OPTIONS(meetme_opts, {
- AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
- AST_APP_OPTION('a', CONFFLAG_ADMIN ),
- AST_APP_OPTION('b', CONFFLAG_AGI ),
- AST_APP_OPTION('c', CONFFLAG_ANNOUNCEUSERCOUNT ),
- AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
- AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
- AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
- AST_APP_OPTION('e', CONFFLAG_EMPTY ),
- AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
- AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ),
- AST_APP_OPTION('M', CONFFLAG_MOH ),
- AST_APP_OPTION('m', CONFFLAG_MONITOR ),
- AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
- AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
- AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
- AST_APP_OPTION('q', CONFFLAG_QUIET ),
- AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
- AST_APP_OPTION('s', CONFFLAG_STARMENU ),
- AST_APP_OPTION('T', CONFFLAG_MONITORTALKER ),
- AST_APP_OPTION('t', CONFFLAG_TALKER ),
- AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
[... 11557 lines stripped ...]
More information about the asterisk-commits
mailing list