[asterisk-commits] eliel: branch eliel/cli-permissions r151875 - in /team/eliel/cli-permissions:...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 24 08:07:44 CDT 2008
Author: eliel
Date: Fri Oct 24 08:07:43 2008
New Revision: 151875
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151875
Log:
Fix conflicts and continue!
Added:
team/eliel/cli-permissions/autoconf/
- copied from r151830, trunk/autoconf/
team/eliel/cli-permissions/autoconf/acx_pthread.m4
- copied unchanged from r151830, trunk/autoconf/acx_pthread.m4
team/eliel/cli-permissions/autoconf/ast_c_compile_check.m4
- copied unchanged from r151830, trunk/autoconf/ast_c_compile_check.m4
team/eliel/cli-permissions/autoconf/ast_c_define_check.m4
- copied unchanged from r151830, trunk/autoconf/ast_c_define_check.m4
team/eliel/cli-permissions/autoconf/ast_check_gnu_make.m4
- copied unchanged from r151830, trunk/autoconf/ast_check_gnu_make.m4
team/eliel/cli-permissions/autoconf/ast_check_mandatory.m4
- copied unchanged from r151830, trunk/autoconf/ast_check_mandatory.m4
team/eliel/cli-permissions/autoconf/ast_check_openh323.m4
- copied unchanged from r151830, trunk/autoconf/ast_check_openh323.m4
team/eliel/cli-permissions/autoconf/ast_check_pwlib.m4
- copied unchanged from r151830, trunk/autoconf/ast_check_pwlib.m4
team/eliel/cli-permissions/autoconf/ast_ext_lib.m4
- copied unchanged from r151830, trunk/autoconf/ast_ext_lib.m4
team/eliel/cli-permissions/autoconf/ast_ext_tool_check.m4
- copied unchanged from r151830, trunk/autoconf/ast_ext_tool_check.m4
team/eliel/cli-permissions/autoconf/ast_func_fork.m4
- copied unchanged from r151830, trunk/autoconf/ast_func_fork.m4
team/eliel/cli-permissions/autoconf/ast_gcc_attribute.m4
- copied unchanged from r151830, trunk/autoconf/ast_gcc_attribute.m4
team/eliel/cli-permissions/autoconf/ast_prog_egrep.m4
- copied unchanged from r151830, trunk/autoconf/ast_prog_egrep.m4
team/eliel/cli-permissions/autoconf/ast_prog_ld.m4
- copied unchanged from r151830, trunk/autoconf/ast_prog_ld.m4
team/eliel/cli-permissions/autoconf/ast_prog_ld_gnu.m4
- copied unchanged from r151830, trunk/autoconf/ast_prog_ld_gnu.m4
team/eliel/cli-permissions/autoconf/ast_prog_sed.m4
- copied unchanged from r151830, trunk/autoconf/ast_prog_sed.m4
team/eliel/cli-permissions/codecs/ex_adpcm.h
- copied unchanged from r151830, trunk/codecs/ex_adpcm.h
team/eliel/cli-permissions/codecs/ex_alaw.h
- copied unchanged from r151830, trunk/codecs/ex_alaw.h
team/eliel/cli-permissions/codecs/ex_g722.h
- copied unchanged from r151830, trunk/codecs/ex_g722.h
team/eliel/cli-permissions/codecs/ex_g726.h
- copied unchanged from r151830, trunk/codecs/ex_g726.h
team/eliel/cli-permissions/codecs/ex_gsm.h
- copied unchanged from r151830, trunk/codecs/ex_gsm.h
team/eliel/cli-permissions/codecs/ex_ilbc.h
- copied unchanged from r151830, trunk/codecs/ex_ilbc.h
team/eliel/cli-permissions/codecs/ex_lpc10.h
- copied unchanged from r151830, trunk/codecs/ex_lpc10.h
team/eliel/cli-permissions/codecs/ex_speex.h
- copied unchanged from r151830, trunk/codecs/ex_speex.h
team/eliel/cli-permissions/codecs/ex_ulaw.h
- copied unchanged from r151830, trunk/codecs/ex_ulaw.h
team/eliel/cli-permissions/contrib/scripts/live_ast
- copied unchanged from r151830, trunk/contrib/scripts/live_ast
team/eliel/cli-permissions/include/asterisk/slin.h
- copied unchanged from r151830, trunk/include/asterisk/slin.h
Removed:
team/eliel/cli-permissions/acinclude.m4
team/eliel/cli-permissions/codecs/adpcm_slin_ex.h
team/eliel/cli-permissions/codecs/g722_slin_ex.h
team/eliel/cli-permissions/codecs/g726_slin_ex.h
team/eliel/cli-permissions/codecs/gsm_slin_ex.h
team/eliel/cli-permissions/codecs/ilbc_slin_ex.h
team/eliel/cli-permissions/codecs/lpc10_slin_ex.h
team/eliel/cli-permissions/codecs/slin_adpcm_ex.h
team/eliel/cli-permissions/codecs/slin_g722_ex.h
team/eliel/cli-permissions/codecs/slin_g726_ex.h
team/eliel/cli-permissions/codecs/slin_gsm_ex.h
team/eliel/cli-permissions/codecs/slin_ilbc_ex.h
team/eliel/cli-permissions/codecs/slin_lpc10_ex.h
team/eliel/cli-permissions/codecs/slin_resample_ex.h
team/eliel/cli-permissions/codecs/slin_speex_ex.h
team/eliel/cli-permissions/codecs/slin_ulaw_ex.h
team/eliel/cli-permissions/codecs/speex_slin_ex.h
team/eliel/cli-permissions/codecs/ulaw_slin_ex.h
Modified:
team/eliel/cli-permissions/ (props changed)
team/eliel/cli-permissions/CHANGES
team/eliel/cli-permissions/Makefile
team/eliel/cli-permissions/UPGRADE.txt
team/eliel/cli-permissions/apps/app_authenticate.c
team/eliel/cli-permissions/apps/app_dial.c
team/eliel/cli-permissions/apps/app_echo.c
team/eliel/cli-permissions/apps/app_externalivr.c
team/eliel/cli-permissions/apps/app_fax.c
team/eliel/cli-permissions/apps/app_meetme.c
team/eliel/cli-permissions/apps/app_mixmonitor.c
team/eliel/cli-permissions/apps/app_queue.c
team/eliel/cli-permissions/apps/app_skel.c
team/eliel/cli-permissions/apps/app_sms.c
team/eliel/cli-permissions/apps/app_speech_utils.c
team/eliel/cli-permissions/apps/app_stack.c
team/eliel/cli-permissions/apps/app_voicemail.c
team/eliel/cli-permissions/apps/app_waitforsilence.c
team/eliel/cli-permissions/bootstrap.sh
team/eliel/cli-permissions/build_tools/make_buildopts_h
team/eliel/cli-permissions/build_tools/menuselect-deps.in
team/eliel/cli-permissions/cdr/cdr_adaptive_odbc.c
team/eliel/cli-permissions/cdr/cdr_odbc.c
team/eliel/cli-permissions/channels/Makefile
team/eliel/cli-permissions/channels/chan_dahdi.c
team/eliel/cli-permissions/channels/chan_h323.c
team/eliel/cli-permissions/channels/chan_iax2.c
team/eliel/cli-permissions/channels/chan_local.c
team/eliel/cli-permissions/channels/chan_misdn.c
team/eliel/cli-permissions/channels/chan_oss.c
team/eliel/cli-permissions/channels/chan_sip.c
team/eliel/cli-permissions/channels/chan_skinny.c
team/eliel/cli-permissions/channels/chan_usbradio.c
team/eliel/cli-permissions/channels/console_gui.c
team/eliel/cli-permissions/channels/console_video.c
team/eliel/cli-permissions/channels/vcodecs.c
team/eliel/cli-permissions/codecs/codec_a_mu.c
team/eliel/cli-permissions/codecs/codec_adpcm.c
team/eliel/cli-permissions/codecs/codec_alaw.c
team/eliel/cli-permissions/codecs/codec_g722.c
team/eliel/cli-permissions/codecs/codec_g726.c
team/eliel/cli-permissions/codecs/codec_gsm.c
team/eliel/cli-permissions/codecs/codec_ilbc.c
team/eliel/cli-permissions/codecs/codec_lpc10.c
team/eliel/cli-permissions/codecs/codec_resample.c
team/eliel/cli-permissions/codecs/codec_speex.c
team/eliel/cli-permissions/codecs/codec_ulaw.c
team/eliel/cli-permissions/codecs/lpc10/lpcini.c
team/eliel/cli-permissions/configs/agents.conf.sample
team/eliel/cli-permissions/configs/chan_dahdi.conf.sample
team/eliel/cli-permissions/configs/extensions.conf.sample
team/eliel/cli-permissions/configs/iax.conf.sample
team/eliel/cli-permissions/configs/modules.conf.sample
team/eliel/cli-permissions/configs/musiconhold.conf.sample
team/eliel/cli-permissions/configs/phoneprov.conf.sample
team/eliel/cli-permissions/configs/queues.conf.sample
team/eliel/cli-permissions/configs/res_ldap.conf.sample
team/eliel/cli-permissions/configs/sip.conf.sample
team/eliel/cli-permissions/configs/sip_notify.conf.sample
team/eliel/cli-permissions/configs/skinny.conf.sample
team/eliel/cli-permissions/configs/voicemail.conf.sample
team/eliel/cli-permissions/configure
team/eliel/cli-permissions/configure.ac
team/eliel/cli-permissions/contrib/init.d/rc.debian.asterisk
team/eliel/cli-permissions/contrib/init.d/rc.mandriva.asterisk
team/eliel/cli-permissions/contrib/init.d/rc.redhat.asterisk
team/eliel/cli-permissions/contrib/init.d/rc.suse.asterisk
team/eliel/cli-permissions/contrib/scripts/safe_asterisk
team/eliel/cli-permissions/contrib/scripts/safe_asterisk_restart
team/eliel/cli-permissions/contrib/scripts/vmdb.sql
team/eliel/cli-permissions/doc/CODING-GUIDELINES
team/eliel/cli-permissions/doc/manager_1_1.txt
team/eliel/cli-permissions/doc/tex/channelvariables.tex
team/eliel/cli-permissions/funcs/func_callerid.c
team/eliel/cli-permissions/funcs/func_cdr.c
team/eliel/cli-permissions/funcs/func_curl.c
team/eliel/cli-permissions/funcs/func_groupcount.c
team/eliel/cli-permissions/funcs/func_math.c
team/eliel/cli-permissions/funcs/func_odbc.c
team/eliel/cli-permissions/funcs/func_timeout.c
team/eliel/cli-permissions/include/asterisk.h
team/eliel/cli-permissions/include/asterisk/audiohook.h
team/eliel/cli-permissions/include/asterisk/autoconfig.h.in
team/eliel/cli-permissions/include/asterisk/chanvars.h
team/eliel/cli-permissions/include/asterisk/config.h
team/eliel/cli-permissions/include/asterisk/endian.h
team/eliel/cli-permissions/include/asterisk/features.h
team/eliel/cli-permissions/include/asterisk/hashtab.h
team/eliel/cli-permissions/include/asterisk/options.h
team/eliel/cli-permissions/include/asterisk/sched.h
team/eliel/cli-permissions/include/asterisk/strings.h
team/eliel/cli-permissions/include/asterisk/tcptls.h
team/eliel/cli-permissions/include/asterisk/threadstorage.h
team/eliel/cli-permissions/main/asterisk.c
team/eliel/cli-permissions/main/astobj2.c
team/eliel/cli-permissions/main/audiohook.c
team/eliel/cli-permissions/main/chanvars.c
team/eliel/cli-permissions/main/cli.c
team/eliel/cli-permissions/main/config.c
team/eliel/cli-permissions/main/cryptostub.c
team/eliel/cli-permissions/main/features.c
team/eliel/cli-permissions/main/hashtab.c
team/eliel/cli-permissions/main/http.c
team/eliel/cli-permissions/main/manager.c
team/eliel/cli-permissions/main/pbx.c
team/eliel/cli-permissions/main/rtp.c
team/eliel/cli-permissions/main/tcptls.c
team/eliel/cli-permissions/main/tdd.c
team/eliel/cli-permissions/main/term.c
team/eliel/cli-permissions/main/translate.c
team/eliel/cli-permissions/makeopts.in
team/eliel/cli-permissions/pbx/pbx_config.c
team/eliel/cli-permissions/pbx/pbx_spool.c
team/eliel/cli-permissions/phoneprov/000000000000.cfg
team/eliel/cli-permissions/phoneprov/polycom.xml
team/eliel/cli-permissions/res/res_agi.c
team/eliel/cli-permissions/res/res_config_curl.c
team/eliel/cli-permissions/res/res_config_ldap.c
team/eliel/cli-permissions/res/res_config_odbc.c
team/eliel/cli-permissions/res/res_config_pgsql.c
team/eliel/cli-permissions/res/res_config_sqlite.c
team/eliel/cli-permissions/res/res_http_post.c
team/eliel/cli-permissions/res/res_indications.c
team/eliel/cli-permissions/res/res_musiconhold.c
team/eliel/cli-permissions/res/res_odbc.c
team/eliel/cli-permissions/res/res_phoneprov.c
team/eliel/cli-permissions/res/res_realtime.c
team/eliel/cli-permissions/res/res_smdi.c
team/eliel/cli-permissions/sounds/Makefile
team/eliel/cli-permissions/sounds/sounds.xml
team/eliel/cli-permissions/utils/Makefile
team/eliel/cli-permissions/utils/extconf.c
team/eliel/cli-permissions/utils/muted.c
Propchange: team/eliel/cli-permissions/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/eliel/cli-permissions/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/eliel/cli-permissions/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Oct 24 08:07:43 2008
@@ -1,1 +1,1 @@
-/trunk:1-146132
+/trunk:1-151874
Modified: team/eliel/cli-permissions/CHANGES
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/CHANGES?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/CHANGES (original)
+++ team/eliel/cli-permissions/CHANGES Fri Oct 24 08:07:43 2008
@@ -7,6 +7,16 @@
* Added support for SUBSCRIBE/NOTIFY with dialog-info based call pickups.
Snom phones use this for call pickup of extensions that the phone is
subscribed to.
+ * Added support for subscribing to a voice mailbox on a remote server and
+ making the new/old message count available to local devices.
+ * Added support for setting the domain in the URI for caller of an
+ outbound call by using the SIPFROMDOMAIN channel variable.
+
+Skinny Changes
+--------------
+ * The configuration file now holds seperate sections for devices and lines.
+ Please have a look at configs/skinny.conf.sample and change your skinny.conf
+ accordingly.
Dialplan Functions
------------------
@@ -15,17 +25,27 @@
cookies, proxies, connection timeouts, passwords, etc.
* Permit the syntax and synopsis fields of the corresponding dialplan
functions to be individually set from func_odbc.conf.
+ * Added debugging CLI functions to func_odbc, 'odbc read' and 'odbc write'.
Applications
------------
* Scheduled meetme conferences may now have their end times extended by
using MeetMeAdmin.
+ * app_authenticate now gives the ability to select a prompt other than
+ the default.
Miscellaneous
-------------
* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
that would end up being interpreted as a bug once Asterisk started removing
the contacts from a user list.
+ * extensions.conf now allows you to use keyword "same" to define an extension
+ without actually specifying an extension. It uses exactly the same pattern
+ as previously used on the last "exten" line. For example:
+ exten => 123,1,NoOp(something)
+ same => n,SomethingElse()
+ * musiconhold.conf classes of type 'files' can now use relative directory paths,
+ which are interpreted as relative to the astvarlibdir setting in asterisk.conf.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.0 to Asterisk 1.6.1 -------------
@@ -138,6 +158,8 @@
'UNSUPPORTED'. This change makes SendImage() more consistent with other
applications.
* Park has a new option, 's', which silences the announcement of the parking space number.
+ * A non-numeric, zero, or negative timeout specified to Dial() will now be interpreted as
+ invalid input and will be assumed to mean that no timeout is desired.
SIP Changes
-----------
@@ -199,6 +221,7 @@
--------------------------------
* The Status command now takes an optional list of variables to display
along with channel status.
+ * The QueueEntry event now also includes the channel's uniqueid
ODBC Changes
------------
@@ -297,6 +320,8 @@
* Originate now accepts codec settings with "Codecs: alaw, ulaw, h264"
* New command: Atxfer. See doc/manager_1_1.txt for more details or
manager show command Atxfer from the CLI
+ * New command: IAXregistry. See doc/manager_1_1.txt for more details or
+ manager show command IAXregistry from the CLI
Dialplan functions
------------------
@@ -358,7 +383,7 @@
driver is.
* Added 'skinny show lines verbose' CLI command. This will show the subs for every channel.
* Cleanup another bunch of CLI commands. Now all modules follow the same schema.
- (Done by lmadsen, junky and mvanbaak during the AstriDevCon)
+ (Done by lmadsen, junky and mvanbaak during the devcon 2008)
SIP changes
-----------
@@ -613,6 +638,10 @@
when a realtime queue member is removed. Since there is no calling channel associated
with these events, the string "REALTIME" is placed where the channel's unique id
is typically placed.
+ * The configuration method for the "joinempty" and "leavewhenempty" options has
+ changed to a comma-separated list of methods of determining member availability
+ instead of vague terms such as "yes," "loose," "no," and "strict." These old four
+ values are still accepted for backwards-compatibility, though.
MeetMe Changes
--------------
Modified: team/eliel/cli-permissions/Makefile
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/Makefile?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/Makefile (original)
+++ team/eliel/cli-permissions/Makefile Fri Oct 24 08:07:43 2008
@@ -262,7 +262,7 @@
endif
ifeq ($(OSARCH),OpenBSD)
- ASTCFLAGS+=-pthread
+ ASTCFLAGS+=-pthread -ftrampolines
endif
ifeq ($(OSARCH),SunOS)
@@ -296,11 +296,11 @@
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
ifneq ($(findstring darwin,$(OSARCH)),)
- ASTCFLAGS+=-D__Darwin__
+ ASTCFLAGS+=-D__Darwin__ -fnested-functions
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
else
# These are used for all but Darwin
- SOLINK=-shared -Xlinker -x
+ SOLINK=-shared
ifneq ($(findstring BSD,$(OSARCH)),)
LDFLAGS+=-L/usr/local/lib
endif
@@ -308,6 +308,10 @@
ifeq ($(OSARCH),SunOS)
SOLINK=-shared -fpic -L/usr/local/ssl/lib -lrt
+endif
+
+ifeq ($(OSARCH),OpenBSD)
+ SOLINK=-shared -fpic
endif
# comment to print directories during submakes
Modified: team/eliel/cli-permissions/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/UPGRADE.txt?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/UPGRADE.txt (original)
+++ team/eliel/cli-permissions/UPGRADE.txt Fri Oct 24 08:07:43 2008
@@ -77,6 +77,13 @@
had any significance). Since this violates the Principle of Least Surprise,
it has been changed.
+* The default console now will use colors according to the default background
+ color, instead of forcing the background color to black. If you are using a
+ light colored background for your console, you may wish to use the option
+ flag '-W' to present better color choices for the various messages. However,
+ if you'd prefer the old method of forcing colors to white text on a black
+ background, the compatiblity option -B is provided for this purpose.
+
Voicemail:
* The voicemail configuration values 'maxmessage' and 'minmessage' have
@@ -258,6 +265,10 @@
to differentiate your variable from the append operator. This potential
conflict is unlikely, but is documented here to be thorough.
+* skinny.conf now has seperate sections for lines and devices.
+ Please have a look at configs/skinny.conf.sample and update
+ your skinny.conf.
+
Manager:
* Manager has been upgraded to version 1.1 with a lot of changes.
Modified: team/eliel/cli-permissions/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_authenticate.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_authenticate.c (original)
+++ team/eliel/cli-permissions/apps/app_authenticate.c Fri Oct 24 08:07:43 2008
@@ -58,7 +58,7 @@
static char *synopsis = "Authenticate a user";
static char *descrip =
-" Authenticate(password[,options[,maxdigits]]): This application asks the caller\n"
+" Authenticate(password[,options[,maxdigits[,prompt]]]): This application asks the caller\n"
"to enter a given password in order to continue dialplan execution. If the password\n"
"begins with the '/' character, it is interpreted as a file which contains a list of\n"
"valid passwords, listed 1 password per line in the file.\n"
@@ -76,6 +76,8 @@
" maxdigits have been entered (without requiring the user to\n"
" press the '#' key).\n"
" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
+" prompt - Override the agent-pass prompt file.\n"
+ ;
;
static int auth_exec(struct ast_channel *chan, void *data)
@@ -88,6 +90,7 @@
AST_APP_ARG(password);
AST_APP_ARG(options);
AST_APP_ARG(maxdigits);
+ AST_APP_ARG(prompt);
);
if (ast_strlen_zero(data)) {
@@ -115,6 +118,12 @@
maxdigits = sizeof(passwd) - 2;
}
+ if (!ast_strlen_zero(arglist.prompt)) {
+ prompt = arglist.prompt;
+ } else {
+ prompt = "agent-pass";
+ }
+
/* Start asking for password */
for (retries = 0; retries < 3; retries++) {
if ((res = ast_app_getdata(chan, prompt, passwd, maxdigits, 0)) < 0)
Modified: team/eliel/cli-permissions/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_dial.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_dial.c (original)
+++ team/eliel/cli-permissions/apps/app_dial.c Fri Oct 24 08:07:43 2008
@@ -1589,8 +1589,10 @@
to = atoi(args.timeout);
if (to > 0)
to *= 1000;
- else
- ast_log(LOG_WARNING, "Invalid timeout specified: '%s'\n", args.timeout);
+ else {
+ ast_log(LOG_WARNING, "Invalid timeout specified: '%s'. Setting timeout to infinite\n", args.timeout);
+ to = -1;
+ }
}
if (!outgoing) {
@@ -1926,11 +1928,7 @@
res = -1;
goto done;
}
- if (opermode && !strncmp(chan->tech->type, "DAHDI", 3) && !strncmp(peer->name, "DAHDI", 3)) {
- /* what's this special handling for dahdi <-> dahdi ?
- * A: dahdi to dahdi calls are natively bridged at the kernel driver
- * level, so we need to ensure that this mode gets propagated
- * all the way down. */
+ if (opermode) {
struct oprmode oprmode;
oprmode.peer = peer;
Modified: team/eliel/cli-permissions/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_echo.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_echo.c (original)
+++ team/eliel/cli-permissions/apps/app_echo.c Fri Oct 24 08:07:43 2008
@@ -54,8 +54,9 @@
while (ast_waitfor(chan, -1) > -1) {
struct ast_frame *f = ast_read(chan);
- if (!f)
+ if (!f) {
break;
+ }
f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0;
if (ast_write(chan, f)) {
Modified: team/eliel/cli-permissions/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_externalivr.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_externalivr.c (original)
+++ team/eliel/cli-permissions/apps/app_externalivr.c Fri Oct 24 08:07:43 2008
@@ -46,6 +46,7 @@
#include "asterisk/app.h"
#include "asterisk/utils.h"
#include "asterisk/tcptls.h"
+#include "asterisk/astobj2.h"
static const char *app = "ExternalIVR";
@@ -419,7 +420,7 @@
}
if (!strncmp(app_args[0], "ivr://", 6)) {
- struct server_args ivr_desc = {
+ struct ast_tcptls_session_args ivr_desc = {
.accept_fd = -1,
.name = "IVR",
};
@@ -438,9 +439,9 @@
}
ast_gethostbyname(hostname, &hp);
- ivr_desc.sin.sin_family = AF_INET;
- ivr_desc.sin.sin_port = htons(port);
- memmove(&ivr_desc.sin.sin_addr.s_addr, hp.hp.h_addr, hp.hp.h_length);
+ ivr_desc.local_address.sin_family = AF_INET;
+ ivr_desc.local_address.sin_port = htons(port);
+ memcpy(&ivr_desc.local_address.sin_addr.s_addr, hp.hp.h_addr, hp.hp.h_length);
ser = ast_tcptls_client_start(&ivr_desc);
if (!ser) {
Modified: team/eliel/cli-permissions/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_fax.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_fax.c (original)
+++ team/eliel/cli-permissions/apps/app_fax.c Fri Oct 24 08:07:43 2008
@@ -29,6 +29,7 @@
#include <tiffio.h>
#include <spandsp.h>
+#include <spandsp/version.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -310,6 +311,7 @@
int original_read_fmt = AST_FORMAT_SLINEAR;
int original_write_fmt = AST_FORMAT_SLINEAR;
fax_state_t fax;
+ t30_state_t *t30state;
struct ast_dsp *dsp = NULL;
int detect_tone = 0;
struct ast_frame *inf = NULL;
@@ -318,6 +320,14 @@
struct timeval now, start, state_change;
enum ast_control_t38 t38control;
+#if SPANDSP_RELEASE_DATE >= 20081012
+ /* for spandsp shaphots 0.0.6 and higher */
+ t30state = &fax.t30;
+#else
+ /* for spandsp release 0.0.5 */
+ t30state = &fax.t30_state;
+#endif
+
original_read_fmt = s->chan->readformat;
if (original_read_fmt != AST_FORMAT_SLINEAR) {
res = ast_set_read_format(s->chan, AST_FORMAT_SLINEAR);
@@ -341,16 +351,16 @@
/* Setup logging */
set_logging(&fax.logging);
- set_logging(&fax.t30_state.logging);
+ set_logging(&t30state->logging);
/* Configure terminal */
- set_local_info(&fax.t30_state, s);
- set_file(&fax.t30_state, s);
- set_ecm(&fax.t30_state, TRUE);
+ set_local_info(t30state, s);
+ set_file(t30state, s);
+ set_ecm(t30state, TRUE);
fax_set_transmit_on_idle(&fax, TRUE);
- t30_set_phase_e_handler(&fax.t30_state, phase_e_handler, s);
+ t30_set_phase_e_handler(t30state, phase_e_handler, s);
if (s->t38state == T38_STATE_UNAVAILABLE) {
ast_debug(1, "T38 is unavailable on %s\n", s->chan->name);
@@ -415,9 +425,9 @@
}
/* Watchdog */
- if (last_state != fax.t30_state.state) {
+ if (last_state != t30state->state) {
state_change = ast_tvnow();
- last_state = fax.t30_state.state;
+ last_state = t30state->state;
}
} else if (inf->frametype == AST_FRAME_CONTROL && inf->subclass == AST_CONTROL_T38 &&
inf->datalen == sizeof(enum ast_control_t38)) {
@@ -456,10 +466,10 @@
by t30_terminate, display diagnostics and set status variables although no transmittion
has taken place yet. */
if (res > 0) {
- t30_set_phase_e_handler(&fax.t30_state, NULL, NULL);
- }
-
- t30_terminate(&fax.t30_state);
+ t30_set_phase_e_handler(t30state, NULL, NULL);
+ }
+
+ t30_terminate(t30state);
fax_release(&fax);
done:
@@ -486,6 +496,19 @@
struct timeval now, start, state_change, last_frame;
enum ast_control_t38 t38control;
+ t30_state_t *t30state;
+ t38_core_state_t *t38state;
+
+#if SPANDSP_RELEASE_DATE >= 20081012
+ /* for spandsp shaphots 0.0.6 and higher */
+ t30state = &t38.t30;
+ t38state = &t38.t38_fe.t38;
+#else
+ /* for spandsp releases 0.0.5 */
+ t30state = &t38.t30_state;
+ t38state = &t38.t38;
+#endif
+
/* Initialize terminal */
memset(&t38, 0, sizeof(t38));
if (t38_terminal_init(&t38, s->caller_mode, t38_tx_packet_handler, s->chan) == NULL) {
@@ -495,15 +518,15 @@
/* Setup logging */
set_logging(&t38.logging);
- set_logging(&t38.t30_state.logging);
- set_logging(&t38.t38.logging);
+ set_logging(&t30state->logging);
+ set_logging(&t38state->logging);
/* Configure terminal */
- set_local_info(&t38.t30_state, s);
- set_file(&t38.t30_state, s);
- set_ecm(&t38.t30_state, TRUE);
-
- t30_set_phase_e_handler(&t38.t30_state, phase_e_handler, s);
+ set_local_info(t30state, s);
+ set_file(t30state, s);
+ set_ecm(t30state, TRUE);
+
+ t30_set_phase_e_handler(t30state, phase_e_handler, s);
now = start = state_change = ast_tvnow();
@@ -529,12 +552,12 @@
ast_debug(10, "frame %d/%d, len=%d\n", inf->frametype, inf->subclass, inf->datalen);
if (inf->frametype == AST_FRAME_MODEM && inf->subclass == AST_MODEM_T38) {
- t38_core_rx_ifp_packet(&t38.t38, inf->data.ptr, inf->datalen, inf->seqno);
+ t38_core_rx_ifp_packet(t38state, inf->data.ptr, inf->datalen, inf->seqno);
/* Watchdog */
- if (last_state != t38.t30_state.state) {
+ if (last_state != t30state->state) {
state_change = ast_tvnow();
- last_state = t38.t30_state.state;
+ last_state = t30state->state;
}
} else if (inf->frametype == AST_FRAME_CONTROL && inf->subclass == AST_CONTROL_T38 &&
inf->datalen == sizeof(enum ast_control_t38)) {
@@ -564,7 +587,7 @@
if (inf)
ast_frfree(inf);
- t30_terminate(&t38.t30_state);
+ t30_terminate(t30state);
t38_terminal_release(&t38);
return res;
Modified: team/eliel/cli-permissions/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_meetme.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_meetme.c (original)
+++ team/eliel/cli-permissions/apps/app_meetme.c Fri Oct 24 08:07:43 2008
@@ -389,6 +389,9 @@
char pinadmin[MAX_PIN]; /*!< If protected by a admin PIN */
char uniqueid[32];
long endtime; /*!< When to end the conf if scheduled */
+ const char *useropts; /*!< RealTime user flags */
+ const char *adminopts; /*!< RealTime moderator flags */
+ const char *bookid; /*!< RealTime conference id */
struct ast_frame *transframe[32];
struct ast_frame *origframe;
struct ast_trans_pvt *transpath[32];
@@ -2157,9 +2160,9 @@
for ( ; var; var = var->next) {
if (!strcasecmp(var->name, "endtime")) {
- struct ast_tm tm;
- ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &tm);
- tmp = ast_mktime(&tm, NULL);
+ struct ast_tm endtime_tm;
+ ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &endtime_tm);
+ tmp = ast_mktime(&endtime_tm, NULL);
localendtime = tmp.tv_sec;
}
}
@@ -2172,16 +2175,16 @@
extended = 1;
}
- if (conf->endtime && (now.tv_sec > conf->endtime)) {
+ if (conf->endtime && (now.tv_sec >= conf->endtime)) {
ast_verbose("Quitting time...\n");
goto outrun;
}
if (!announcement_played && conf->endalert) {
- if (now.tv_sec + conf->endalert > conf->endtime) {
+ if (now.tv_sec + conf->endalert >= conf->endtime) {
if (!ast_streamfile(chan, "conf-will-end-in", chan->language))
ast_waitstream(chan, "");
- ast_say_digits(chan, (now.tv_sec + conf->endalert - conf->endtime) / 60, "", chan->language);
+ ast_say_digits(chan, (conf->endtime - now.tv_sec) / 60, "", chan->language);
if (!ast_streamfile(chan, "minutes", chan->language))
ast_waitstream(chan, "");
announcement_played = 1;
@@ -2966,8 +2969,7 @@
}
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 *useropts, char *adminopts, int *too_early)
+ char *dynamic_pin, size_t pin_buf_len, int refcount, struct ast_flags *confflags, int *too_early)
{
struct ast_variable *var, *origvar;
struct ast_conference *cnf;
@@ -2991,6 +2993,10 @@
struct timeval now;
char currenttime[19] = "";
char eatime[19] = "";
+ char bookid[19] = "";
+ char recordingtmp[AST_MAX_EXTENSION] = "";
+ char useropts[OPTIONS_LEN]; /* Used for RealTime conferences */
+ char adminopts[OPTIONS_LEN];
struct ast_tm tm, etm;
struct timeval endtime = { .tv_sec = 0 };
@@ -3050,6 +3056,8 @@
pin = ast_strdupa(var->value);
} else if (!strcasecmp(var->name, "adminpin")) {
pinadmin = ast_strdupa(var->value);
+ } else if (!strcasecmp(var->name, "bookId")) {
+ ast_copy_string(bookid, var->value, sizeof(bookid));
} else if (!strcasecmp(var->name, "opts")) {
ast_copy_string(useropts, var->value, sizeof(char[OPTIONS_LEN]));
} else if (!strcasecmp(var->name, "maxusers")) {
@@ -3057,9 +3065,9 @@
} else if (!strcasecmp(var->name, "adminopts")) {
ast_copy_string(adminopts, var->value, sizeof(char[OPTIONS_LEN]));
} else if (!strcasecmp(var->name, "endtime")) {
- struct ast_tm tm;
- ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &tm);
- endtime = ast_mktime(&tm, NULL);
+ struct ast_tm endtime_tm;
+ ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &endtime_tm);
+ endtime = ast_mktime(&endtime_tm, NULL);
}
}
@@ -3071,6 +3079,12 @@
cnf->maxusers = maxusers;
cnf->endalert = endalert;
cnf->endtime = endtime.tv_sec;
+ cnf->useropts = ast_strdup(useropts);
+ cnf->adminopts = ast_strdup(adminopts);
+ cnf->bookid = ast_strdup(bookid);
+ snprintf(recordingtmp, sizeof(recordingtmp), "%s/meetme/meetme-conf-rec-%s-%s", ast_config_AST_SPOOL_DIR, confno, bookid);
+ cnf->recordingfilename = ast_strdup(recordingtmp);
+ cnf->recordingformat = ast_strdup("wav");
}
}
@@ -3391,8 +3405,6 @@
}
}
if (!ast_strlen_zero(confno)) {
- char useropts[OPTIONS_LEN];
- char adminopts[OPTIONS_LEN];
/* Check the validity of the conference */
cnf = find_conf(chan, confno, 1, dynamic, the_pin,
sizeof(the_pin), 1, &confflags);
@@ -3400,7 +3412,7 @@
int too_early = 0;
cnf = find_conf_realtime(chan, confno, 1, dynamic,
- the_pin, sizeof(the_pin), 1, &confflags, useropts, adminopts, &too_early);
+ the_pin, sizeof(the_pin), 1, &confflags,&too_early);
if (rt_schedule && too_early)
allowretry = 0;
}
@@ -3437,14 +3449,16 @@
/* Pin correct */
allowretry = 0;
if (!ast_strlen_zero(cnf->pinadmin) && !strcasecmp(pin, cnf->pinadmin)) {
- if(!ast_strlen_zero(adminopts))
- ast_app_parse_options(meetme_opts, &confflags, optargs, adminopts);
- ast_set_flag(&confflags, CONFFLAG_ADMIN);
+ if (!ast_strlen_zero(cnf->adminopts)) {
+ char *opts = ast_strdupa(cnf->adminopts);
+ ast_app_parse_options(meetme_opts, &confflags, optargs, opts);
+ }
} else {
- if(!ast_strlen_zero(useropts))
- ast_app_parse_options(meetme_opts, &confflags, optargs, useropts);
+ if (!ast_strlen_zero(cnf->useropts)) {
+ char *opts = ast_strdupa(cnf->useropts);
+ ast_app_parse_options(meetme_opts, &confflags, optargs, opts);
+ }
}
-
/* Run the conference */
res = conf_run(chan, cnf, confflags.flags, optargs);
break;
@@ -3453,8 +3467,7 @@
if (!ast_streamfile(chan, "conf-invalidpin", chan->language)) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
- }
- else {
+ } else {
ast_log(LOG_WARNING, "Couldn't play invalid pin msg!\n");
break;
}
Modified: team/eliel/cli-permissions/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_mixmonitor.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_mixmonitor.c (original)
+++ team/eliel/cli-permissions/apps/app_mixmonitor.c Fri Oct 24 08:07:43 2008
@@ -167,7 +167,7 @@
else
ext = "raw";
- if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644))) {
+ if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0666))) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
errflag = 1;
}
Modified: team/eliel/cli-permissions/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/apps/app_queue.c?view=diff&rev=151875&r1=151874&r2=151875
==============================================================================
--- team/eliel/cli-permissions/apps/app_queue.c (original)
+++ team/eliel/cli-permissions/apps/app_queue.c Fri Oct 24 08:07:43 2008
@@ -392,10 +392,18 @@
char rt_uniqueid[80]; /*!< Unique id of realtime member entry */
};
+enum empty_conditions {
+ QUEUE_EMPTY_PENALTY = (1 << 0),
+ QUEUE_EMPTY_PAUSED = (1 << 1),
+ QUEUE_EMPTY_INUSE = (1 << 2),
+ QUEUE_EMPTY_RINGING = (1 << 3),
+ QUEUE_EMPTY_UNAVAILABLE = (1 << 4),
+ QUEUE_EMPTY_INVALID = (1 << 5),
+ QUEUE_EMPTY_UNKNOWN = (1 << 6),
+ QUEUE_EMPTY_WRAPUP = (1 << 7),
+};
+
/* values used in multi-bit flags in call_queue */
-#define QUEUE_EMPTY_NORMAL 1
-#define QUEUE_EMPTY_STRICT 2
-#define QUEUE_EMPTY_LOOSE 3
#define ANNOUNCEHOLDTIME_ALWAYS 1
#define ANNOUNCEHOLDTIME_ONCE 2
#define QUEUE_EVENT_VARIABLES 3
@@ -458,9 +466,7 @@
/*! Sound files: Custom announce, no default */
struct ast_str *sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS];
unsigned int dead:1;
- unsigned int joinempty:2;
unsigned int eventwhencalled:2;
- unsigned int leavewhenempty:2;
unsigned int ringinuse:1;
unsigned int setinterfacevar:1;
unsigned int setqueuevar:1;
@@ -474,6 +480,8 @@
unsigned int maskmemberstatus:1;
unsigned int realtime:1;
unsigned int found:1;
+ enum empty_conditions joinempty;
+ enum empty_conditions leavewhenempty;
int announcepositionlimit; /*!< How many positions we announce? */
int announcefrequency; /*!< How often to announce their position */
int minannouncefrequency; /*!< The minimum number of seconds between position announcements (def. 15) */
@@ -630,53 +638,67 @@
new->opos = *pos;
}
-enum queue_member_status {
- QUEUE_NO_MEMBERS,
- QUEUE_NO_REACHABLE_MEMBERS,
- QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS,
- QUEUE_NORMAL
-};
-
/*! \brief Check if members are available
*
* This function checks to see if members are available to be called. If any member
- * is available, the function immediately returns QUEUE_NORMAL. If no members are available,
- * the appropriate reason why is returned
+ * is available, the function immediately returns 0. If no members are available,
+ * then -1 is returned.
*/
-static enum queue_member_status get_member_status(struct call_queue *q, int max_penalty, int min_penalty)
+static int get_member_status(struct call_queue *q, int max_penalty, int min_penalty, enum empty_conditions conditions)
{
struct member *member;
struct ao2_iterator mem_iter;
- enum queue_member_status result = QUEUE_NO_MEMBERS;
ao2_lock(q);
mem_iter = ao2_iterator_init(q->members, 0);
for (; (member = ao2_iterator_next(&mem_iter)); ao2_ref(member, -1)) {
- if ((max_penalty && (member->penalty > max_penalty)) || (min_penalty && (member->penalty < min_penalty)))
- continue;
+ if ((max_penalty && (member->penalty > max_penalty)) || (min_penalty && (member->penalty < min_penalty))) {
+ if (conditions & QUEUE_EMPTY_PENALTY) {
+ ast_debug(4, "%s is unavailable because his penalty is not between %d and %d\n", member->membername, min_penalty, max_penalty);
+ continue;
+ }
+ }
switch (member->status) {
case AST_DEVICE_INVALID:
- /* nothing to do */
- break;
+ if (conditions & QUEUE_EMPTY_INVALID) {
+ ast_debug(4, "%s is unavailable because his device state is 'invalid'\n", member->membername);
+ break;
+ }
case AST_DEVICE_UNAVAILABLE:
- if (result != QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)
- result = QUEUE_NO_REACHABLE_MEMBERS;
- break;
+ if (conditions & QUEUE_EMPTY_UNAVAILABLE) {
+ ast_debug(4, "%s is unavailable because his device state is 'unavailable'\n", member->membername);
+ break;
+ }
+ case AST_DEVICE_INUSE:
+ if (conditions & QUEUE_EMPTY_INUSE) {
+ ast_debug(4, "%s is unavailable because his device state is 'inuse'\n", member->membername);
+ break;
+ }
+ case AST_DEVICE_UNKNOWN:
+ if (conditions & QUEUE_EMPTY_UNKNOWN) {
+ ast_debug(4, "%s is unavailable because his device state is 'unknown'\n", member->membername);
+ break;
+ }
default:
- if (member->paused) {
- result = QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS;
+ if (member->paused && (conditions & QUEUE_EMPTY_PAUSED)) {
[... 15702 lines stripped ...]
More information about the asterisk-commits
mailing list