[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r135193 - in /team/sean...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 1 13:40:05 CDT 2008
Author: seanbright
Date: Fri Aug 1 13:40:04 2008
New Revision: 135193
URL: http://svn.digium.com/view/asterisk?view=rev&rev=135193
Log:
Merged revisions 134353,134355,134401,134442-134443,134476,134481,134483,134538,134541,134556,134596,134598,134650,134653,134703,134705,134759,134803,134815,134867,134916-134917,134919,134922,134925,134977,134980,135016,135056,135059,135061,135067-135068,135126,135128,135158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r134353 | tilghman | 2008-07-30 11:30:18 -0400 (Wed, 30 Jul 2008) | 8 lines
Add %u and %g to the ASTERISK_PROMPT settings, for username and group,
respectively. Also, take the opportunity to clean up the CLI prompt
generation code.
(closes issue #13175)
Reported by: eliel
Patches:
cliprompt.patch uploaded by eliel (license 64)
................
r134355 | kpfleming | 2008-07-30 11:32:14 -0400 (Wed, 30 Jul 2008) | 10 lines
Merged revisions 134352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134352 | kpfleming | 2008-07-30 10:29:17 -0500 (Wed, 30 Jul 2008) | 2 lines
use the proper method for building version.h
........
................
r134401 | tilghman | 2008-07-30 12:40:43 -0400 (Wed, 30 Jul 2008) | 7 lines
Move implementation of an attended-transfer-complete sound from one channel
driver into a common place for multiple channel drivers.
(closes issue #13152)
Reported by: caio1982
Patches:
atxfer_complete_sound3.diff uploaded by caio1982 (license 22)
................
r134442 | tilghman | 2008-07-30 13:32:28 -0400 (Wed, 30 Jul 2008) | 7 lines
Add adaptive capabilities to the sqlite realtime driver
(closes issue #13097)
Reported by: gknispel_proformatique
Patches:
20080730__bug13097.diff.txt uploaded by Corydon76 (license 14)
Tested by: Corydon76
................
r134443 | tilghman | 2008-07-30 13:36:31 -0400 (Wed, 30 Jul 2008) | 2 lines
Document adaptive capabilities
................
r134476 | mmichelson | 2008-07-30 14:33:12 -0400 (Wed, 30 Jul 2008) | 12 lines
Merged revisions 134475 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134475 | mmichelson | 2008-07-30 13:31:47 -0500 (Wed, 30 Jul 2008) | 4 lines
Fix a spot where a function could return without bringing
a channel out of autoservice.
........
................
r134481 | tilghman | 2008-07-30 15:05:35 -0400 (Wed, 30 Jul 2008) | 13 lines
Merged revisions 134480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134480 | tilghman | 2008-07-30 14:03:44 -0500 (Wed, 30 Jul 2008) | 5 lines
launch_netscript sometimes returns -1, which fails to set AGISTATUS. Map
failure to -1, so that AGISTATUS is always set.
(closes issue #13199)
Reported by: smw1218
........
................
r134483 | tilghman | 2008-07-30 15:17:38 -0400 (Wed, 30 Jul 2008) | 4 lines
Let "roundrobin" also reference rrmemory, for the 1.6 release (as described in
UPGRADE-1.4.txt)
(Closes issue #13181)
................
r134538 | tilghman | 2008-07-30 15:48:37 -0400 (Wed, 30 Jul 2008) | 12 lines
Merged revisions 134536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134536 | tilghman | 2008-07-30 14:47:16 -0500 (Wed, 30 Jul 2008) | 4 lines
Only override sysconfdir and mandir when prefix=/usr
(closes issue #13093)
Reported by: pabelanger
........
................
r134541 | russell | 2008-07-30 15:55:31 -0400 (Wed, 30 Jul 2008) | 12 lines
Merged revisions 134540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134540 | russell | 2008-07-30 14:52:53 -0500 (Wed, 30 Jul 2008) | 4 lines
Fix a memory leak in func_curl. Every thread that used this function leaked
an allocation the size of a pointer.
(reported by jmls in #asterisk-dev)
........
................
r134556 | mmichelson | 2008-07-30 16:24:40 -0400 (Wed, 30 Jul 2008) | 7 lines
Fix the parsing of the "reason" parameter in the
Diversion: header.
(closes issue #13195)
Reported by: woodsfsg
................
r134596 | russell | 2008-07-30 16:38:35 -0400 (Wed, 30 Jul 2008) | 14 lines
Merged revisions 134595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134595 | russell | 2008-07-30 15:37:17 -0500 (Wed, 30 Jul 2008) | 6 lines
Reduce stack consumption by 12.5% of the max stack size to fix a crash when
compiled with LOW_MEMORY.
(closes issue #13154)
Reported by: edantie
........
................
r134598 | mmichelson | 2008-07-30 17:05:37 -0400 (Wed, 30 Jul 2008) | 15 lines
Merged revisions 134556 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r134556 | mmichelson | 2008-07-30 15:24:40 -0500 (Wed, 30 Jul 2008) | 7 lines
Fix the parsing of the "reason" parameter in the
Diversion: header.
(closes issue #13195)
Reported by: woodsfsg
........
................
r134650 | tilghman | 2008-07-30 17:40:08 -0400 (Wed, 30 Jul 2008) | 12 lines
Merged revisions 134649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134649 | tilghman | 2008-07-30 16:38:50 -0500 (Wed, 30 Jul 2008) | 4 lines
Qwell pointed out, via IRC, that the previous fix only worked when explicitly
set. When nothing is set, and the option is implied, it breaks, because
configure sets the prefix to 'NONE'. Fixing.
........
................
r134653 | murf | 2008-07-30 18:04:07 -0400 (Wed, 30 Jul 2008) | 1 line
blocking 134652 from trunk because this problem only applies to 1.4
................
r134703 | tilghman | 2008-07-30 18:38:58 -0400 (Wed, 30 Jul 2008) | 2 lines
Oops, wrong define
................
r134705 | tilghman | 2008-07-30 18:40:48 -0400 (Wed, 30 Jul 2008) | 9 lines
Blocked revisions 134704 via svnmerge
........
r134704 | tilghman | 2008-07-30 17:39:57 -0500 (Wed, 30 Jul 2008) | 2 lines
Oops, wrong define
........
................
r134759 | mmichelson | 2008-07-31 12:05:12 -0400 (Thu, 31 Jul 2008) | 24 lines
Merged revisions 134758 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134758 | mmichelson | 2008-07-31 10:56:18 -0500 (Thu, 31 Jul 2008) | 16 lines
Add more timeout checks into app_queue, specifically
targeting areas where an unknown and potentially
long time has just elapsed. Also added a check
to try_calling() to return early if the timeout
has elapsed instead of potentially setting a negative
timeout for the call (thus making it have *no* timeout
at all).
(closes issue #13186)
Reported by: miquel_cabrespina
Patches:
13186.diff uploaded by putnopvut (license 60)
Tested by: miquel_cabrespina
........
................
r134803 | russell | 2008-07-31 12:37:08 -0400 (Thu, 31 Jul 2008) | 7 lines
Fix some tex errors
(closes issue #13211)
Reported by: eliel
Patches:
fixtexerrors.patch uploaded by eliel (license 64)
................
r134815 | russell | 2008-07-31 12:50:10 -0400 (Thu, 31 Jul 2008) | 15 lines
Merged revisions 134814 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134814 | russell | 2008-07-31 11:45:31 -0500 (Thu, 31 Jul 2008) | 7 lines
In case we have some processing threads that free more frames than they allocate,
do not let the frame cache grow forever.
(closes issue #13160)
Reported by: tavius
Tested by: tavius, russell
........
................
r134867 | tilghman | 2008-07-31 15:03:41 -0400 (Thu, 31 Jul 2008) | 4 lines
Optimize frame cache by realloc'ing the smallest frame when the cache is full.
This ensures that we don't just keep a cache of tiny frames, continually doing
an alloc/free for each data frame, thus negating the point of having a cache.
................
r134916 | russell | 2008-07-31 15:39:25 -0400 (Thu, 31 Jul 2008) | 2 lines
fix the potential use of an uninitialized variable
................
r134917 | russell | 2008-07-31 15:39:50 -0400 (Thu, 31 Jul 2008) | 17 lines
Merged revisions 134915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134915 | russell | 2008-07-31 14:37:26 -0500 (Thu, 31 Jul 2008) | 9 lines
Get app_ices working again
(closes issue #12981)
Reported by: dlogan
Patches:
20080709__app_ices_v2_update_trunk.diff uploaded by bbryant (license 36)
20080709__app_ices_v2_update_14.diff uploaded by bbryant (license 36)
Tested by: bbryant
........
................
r134919 | tilghman | 2008-07-31 15:43:02 -0400 (Thu, 31 Jul 2008) | 6 lines
Two errors:
1) If a function returns SQLITE_LOCKED, no recovery is possible.
2) An error message can be allocated, even when no error is signalled.
(closes issue #13109)
Reported by: gknispel_proformatique
................
r134922 | murf | 2008-07-31 15:48:08 -0400 (Thu, 31 Jul 2008) | 63 lines
Merged revisions 134883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134883 | murf | 2008-07-31 13:23:42 -0600 (Thu, 31 Jul 2008) | 51 lines
(closes issue #11849)
Reported by: greyvoip
Tested by: murf
OK, a few days of debugging, a bunch of instrumentation
in chan_sip, main/channel.c, main/pbx.c, etc. and 5 solid
notebook pages of notes later, I have made the small
tweek necc. to get the start time right on the second
CDR when:
A Calls B
B answ.
A hits Xfer button on sip phone,
A dials C and hits the OK button,
A hangs up
C answers ringing phone
B and C converse
B and/or C hangs up
But does not harm the scenario where:
A Calls B
B answ.
B hits xfer button on sip phone,
B dials C and hits the OK button,
B hangs up
C answers ringing phone
A and C converse
A and/or C hangs up
The difference in start times on the second CDR is because
of a Masquerade on the B channel when the xfer number is
sent. It ends up replacing the CDR on the B channel with
a duplicate, which ends up getting tossed out. We keep
a pointer to the first CDR, and update *that* after the
bridge closes. But, only if the CDR has changed.
I hope this change is specific enough not to muck
up any current CDR-based apps. In my defence, I
assert that the previous information was wrong,
and this change fixes it, and possibly other
similar scenarios.
I wonder if I should be doing the same thing
for the channel, as I did for the peer, but
I can't think of a scenario this might affect.
I leave it, then, as an exersize for the users,
to find the scenario where the chan's CDR
changes and loses the proper start time.
........
and as to 1.4 to trunk; have I expressed my
feelings about code shifting from one file
to another? Good.
................
r134925 | tilghman | 2008-07-31 16:10:39 -0400 (Thu, 31 Jul 2008) | 3 lines
Increase column size beyond the minimum required, since PostgreSQL won't let
us modify existing columns.
................
r134977 | tilghman | 2008-07-31 17:53:59 -0400 (Thu, 31 Jul 2008) | 2 lines
Switch command order, to meet with current specs
................
r134980 | tilghman | 2008-07-31 17:55:42 -0400 (Thu, 31 Jul 2008) | 16 lines
Blocked revisions 134976 via svnmerge
........
r134976 | tilghman | 2008-07-31 16:53:19 -0500 (Thu, 31 Jul 2008) | 9 lines
Specify codecs in callfiles and manager, to allow video calls to be set up
from callfiles and AMI.
(closes issue #9531)
Reported by: Geisj
Patches:
20080715__bug9531__1.4.diff.txt uploaded by Corydon76 (license 14)
20080715__bug9531__1.6.0.diff.txt uploaded by Corydon76 (license 14)
Tested by: Corydon76
........
................
r135016 | kpfleming | 2008-07-31 18:28:42 -0400 (Thu, 31 Jul 2008) | 11 lines
Merged revisions 134983 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r134983 | kpfleming | 2008-07-31 17:18:11 -0500 (Thu, 31 Jul 2008) | 3 lines
accomodate users who seem to lack a sense of humor :-)
........
................
r135056 | mvanbaak | 2008-08-01 07:00:13 -0400 (Fri, 01 Aug 2008) | 16 lines
Merged revisions 135055 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r135055 | mvanbaak | 2008-08-01 12:55:27 +0200 (Fri, 01 Aug 2008) | 8 lines
fix some potential deadlocks in chan_skinny
(closes issue #13215)
Reported by: qwell
Patches:
2008080100_bug13215.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak
........
................
r135059 | mvanbaak | 2008-08-01 07:47:34 -0400 (Fri, 01 Aug 2008) | 10 lines
Merged revisions 135058 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r135058 | mvanbaak | 2008-08-01 13:43:46 +0200 (Fri, 01 Aug 2008) | 2 lines
make app_ices compile on OpenBSD.
........
................
r135061 | mvanbaak | 2008-08-01 08:17:33 -0400 (Fri, 01 Aug 2008) | 8 lines
Make safe_asterisk work on dash/sh/bash etc.
(closes issue #13111)
Reported by: pabelanger
Patches:
2008071901_issue13111_safe_asterisk.diff uploaded by mvanbaak (license 7)
Tested by: mvanbaak, pabelanger
................
r135067 | mmichelson | 2008-08-01 10:29:48 -0400 (Fri, 01 Aug 2008) | 13 lines
IMAP storage functioned under the assumption that folders
such as "Work" and "Family" would be subfolders of the
INBOX. This is an invalid assumption to make, but it could
be desirable to set up folders in this manner, so a new
option for voicemail.conf, "imapparentfolder" has been
added to allow for this.
(closes issue #13142)
Reported by: jaroth
Patches:
parentfolder.patch uploaded by jaroth (license 50)
................
r135068 | mmichelson | 2008-08-01 10:42:24 -0400 (Fri, 01 Aug 2008) | 3 lines
IMAP-specific items must go in IMAP_STORAGE defines...
................
r135126 | tilghman | 2008-08-01 12:39:51 -0400 (Fri, 01 Aug 2008) | 9 lines
SIP should use the transport type set in the Moved Temporarily for the next
invite.
(closes issue #11843)
Reported by: pestermann
Patches:
20080723__issue11843_302_ignores_transport_16branch.diff uploaded by bbryant (license 36)
20080723__issue11843_302_ignores_transport_trunk.diff uploaded by bbryant (license 36)
Tested by: pabelanger
................
r135128 | tilghman | 2008-08-01 13:09:50 -0400 (Fri, 01 Aug 2008) | 2 lines
Picky, picky, buildbot
................
r135158 | russell | 2008-08-01 14:16:24 -0400 (Fri, 01 Aug 2008) | 14 lines
Merge changes from team/bbryant/keyrotation
This set of changes enhances IAX2 encryption support by adding key rotation
to provide enhanced security. The key used for encryption is rotated right
after the call gets set up, and then again every few minutes. This was
discussed at the last AstriDevCon. For interoperability with older versions
of Asterisk, there is an option that disables key rotation.
(closes issue #13018)
Reported by: bbryant
Patches:
07072008__iax2_key_rotation.diff uploaded by bbryant (license 36)
Tested by: russell, bbryant
................
Modified:
team/seanbright/resolve-shadow-warnings/ (props changed)
team/seanbright/resolve-shadow-warnings/CHANGES
team/seanbright/resolve-shadow-warnings/Makefile
team/seanbright/resolve-shadow-warnings/apps/app_ices.c
team/seanbright/resolve-shadow-warnings/apps/app_queue.c
team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
team/seanbright/resolve-shadow-warnings/channels/chan_skinny.c
team/seanbright/resolve-shadow-warnings/channels/iax2-parser.c
team/seanbright/resolve-shadow-warnings/channels/iax2.h
team/seanbright/resolve-shadow-warnings/configs/chan_dahdi.conf.sample
team/seanbright/resolve-shadow-warnings/configs/iax.conf.sample
team/seanbright/resolve-shadow-warnings/configs/sip.conf.sample
team/seanbright/resolve-shadow-warnings/configs/skinny.conf.sample
team/seanbright/resolve-shadow-warnings/configs/voicemail.conf.sample
team/seanbright/resolve-shadow-warnings/configure
team/seanbright/resolve-shadow-warnings/configure.ac
team/seanbright/resolve-shadow-warnings/contrib/scripts/safe_asterisk
team/seanbright/resolve-shadow-warnings/doc/tex/app-sms.tex
team/seanbright/resolve-shadow-warnings/doc/tex/cliprompt.tex
team/seanbright/resolve-shadow-warnings/doc/tex/queuelog.tex
team/seanbright/resolve-shadow-warnings/funcs/func_curl.c
team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in
team/seanbright/resolve-shadow-warnings/include/asterisk/sched.h
team/seanbright/resolve-shadow-warnings/main/app.c
team/seanbright/resolve-shadow-warnings/main/asterisk.c
team/seanbright/resolve-shadow-warnings/main/features.c
team/seanbright/resolve-shadow-warnings/main/http.c
team/seanbright/resolve-shadow-warnings/main/sched.c
team/seanbright/resolve-shadow-warnings/pbx/pbx_dundi.c
team/seanbright/resolve-shadow-warnings/res/res_agi.c
team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c
team/seanbright/resolve-shadow-warnings/res/res_config_sqlite.c
Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Aug 1 13:40:04 2008
@@ -1,1 +1,1 @@
-/trunk:1-134340
+/trunk:1-135179
Modified: team/seanbright/resolve-shadow-warnings/CHANGES
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/CHANGES?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/CHANGES (original)
+++ team/seanbright/resolve-shadow-warnings/CHANGES Fri Aug 1 13:40:04 2008
@@ -109,8 +109,6 @@
SIP Changes
-----------
- * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
- audio file to be played upon completion of an attended transfer.
* Added DNS manager support to registrations for peers referencing peer entries.
DNS manager runs in the background which allows DNS lookups to be run asynchronously
as well as periodically updating the IP address. These properties allow for
@@ -139,6 +137,10 @@
IAX Changes
-----------
* Existing DNS manager lookups extended to check for SRV records.
+ * IAX2 encryption support has been improved to support periodic key rotation
+ within a call for enhanced security. The option "keyrotate" has been
+ provided to disable this functionality to preserve backwards compatibility
+ with older versions of IAX2 that do not support key rotation.
CLI Changes
-----------
@@ -179,6 +181,22 @@
* A new configuration option, "timeoutpriority" has been added. Please see the section labeled
"QUEUE TIMING OPTIONS" in configs/queues.conf.sample for a detailed explanation of the option
as well as an explanation about timeout options in general
+
+Realtime changes
+----------------
+ * Several (ODBC, Postgres, MySQL, SQLite) realtime drivers have been given
+ adaptive capabilities. What this means in practical terms is that if your
+ realtime table lacks critical fields, Asterisk will now emit warnings to
+ that effect. Also, some of the realtime drivers have the ability (if
+ configured) to automatically add those columns to the table with the
+ correct type and length.
+
+Miscellaneous
+-------------
+ * The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using
+ the 'setvar' option to cause a given audio file to be played upon completion
+ of an attended transfer. Currently it works for DAHDI, IAX2, SIP, and
+ Skinny channels only.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0 -------------
Modified: team/seanbright/resolve-shadow-warnings/Makefile
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/Makefile?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/Makefile (original)
+++ team/seanbright/resolve-shadow-warnings/Makefile Fri Aug 1 13:40:04 2008
@@ -412,12 +412,12 @@
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-main/version.c:
+main/version.c: FORCE
@build_tools/make_version_c > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-include/asterisk/version.h:
+include/asterisk/version.h: FORCE
@build_tools/make_version_h > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
@@ -915,4 +915,7 @@
asterisk.pdf:
$(MAKE) -C doc/tex asterisk.pdf
-.PHONY: menuselect menuselect.makeopts main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell main/version.c include/asterisk/version.h installdirs
+.PHONY: menuselect menuselect.makeopts main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell installdirs
+
+FORCE:
+
Modified: team/seanbright/resolve-shadow-warnings/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_ices.c?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_ices.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_ices.c Fri Aug 1 13:40:04 2008
@@ -45,8 +45,8 @@
#include "asterisk/translate.h"
#include "asterisk/app.h"
-#define ICES "/usr/bin/ices"
-#define LOCAL_ICES "/usr/local/bin/ices"
+#define path_BIN "/usr/bin/"
+#define path_LOCAL "/usr/local/bin/"
static char *app = "ICES";
@@ -55,7 +55,9 @@
static char *descrip =
" ICES(config.xml) Streams to an icecast server using ices\n"
"(available separately). A configuration file must be supplied\n"
-"for ices (see examples/asterisk-ices.conf). \n";
+"for ices (see contrib/asterisk-ices.xml). \n"
+"\n"
+"- ICES version 2 cient and server required.\n";
static int icesencode(char *filename, int fd)
@@ -73,13 +75,23 @@
ast_set_priority(0);
dup2(fd, STDIN_FILENO);
ast_close_fds_above_n(STDERR_FILENO);
- /* Most commonly installed in /usr/local/bin */
- execl(ICES, "ices", filename, (char *)NULL);
- /* But many places has it in /usr/bin */
- execl(LOCAL_ICES, "ices", filename, (char *)NULL);
- /* As a last-ditch effort, try to use PATH */
- execlp("ices", "ices", filename, (char *)NULL);
- ast_log(LOG_WARNING, "Execute of ices failed\n");
+
+ /* Most commonly installed in /usr/local/bin
+ * But many places has it in /usr/bin
+ * As a last-ditch effort, try to use PATH
+ */
+ execl(path_LOCAL "ices2", "ices", filename, SENTINEL);
+ execl(path_BIN "ices2", "ices", filename, SENTINEL);
+ execlp("ices2", "ices", filename, SENTINEL);
+
+ ast_debug(1, "Couldn't find ices version 2, attempting to use ices version 1.");
+
+ execl(path_LOCAL "ices", "ices", filename, SENTINEL);
+ execl(path_BIN "ices", "ices", filename, SENTINEL);
+ execlp("ices", "ices", filename, SENTINEL);
+
+ ast_log(LOG_WARNING, "Execute of ices failed, could not find command.\n");
+ close(fd);
_exit(0);
}
@@ -139,7 +151,6 @@
if (c)
*c = '\0';
res = icesencode(filename, fds[0]);
- close(fds[0]);
if (res >= 0) {
pid = res;
for (;;) {
@@ -170,6 +181,7 @@
ast_frfree(f);
}
}
+ close(fds[0]);
close(fds[1]);
if (pid > -1)
Modified: team/seanbright/resolve-shadow-warnings/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_queue.c?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_queue.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_queue.c Fri Aug 1 13:40:04 2008
@@ -127,6 +127,7 @@
{ QUEUE_STRATEGY_FEWESTCALLS, "fewestcalls" },
{ QUEUE_STRATEGY_RANDOM, "random" },
{ QUEUE_STRATEGY_RRMEMORY, "rrmemory" },
+ { QUEUE_STRATEGY_RRMEMORY, "roundrobin" },
{ QUEUE_STRATEGY_LINEAR, "linear" },
{ QUEUE_STRATEGY_WRANDOM, "wrandom"},
};
@@ -2886,6 +2887,12 @@
(res = say_position(qe,ringing)))
break;
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
+ }
+
/* Make a periodic announcement, if enabled */
if (qe->parent->periodicannouncefrequency &&
(res = say_periodic_announcement(qe,ringing)))
@@ -2896,12 +2903,24 @@
update_qe_rule(qe);
}
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
+ }
+
/* Wait a second before checking again */
if ((res = ast_waitfordigit(qe->chan, RECHECK * 1000))) {
if (res > 0 && !valid_exit(qe, res))
res = 0;
else
break;
+ }
+
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
}
}
@@ -3219,6 +3238,15 @@
tmpid[0] = 0;
meid[0] = 0;
time(&now);
+
+ /* If we've already exceeded our timeout, then just stop
+ * This should be extremely rare. queue_exec will take care
+ * of removing the caller and reporting the timeout as the reason.
+ */
+ if (qe->expire && now > qe->expire) {
+ res = 0;
+ goto out;
+ }
for (; options && *options; options++)
switch (*options) {
@@ -4698,6 +4726,15 @@
if (qe.parent->periodicannouncefrequency)
if ((res = say_periodic_announcement(&qe,ringing)))
goto stop;
+
+ /* Leave if we have exceeded our queuetimeout */
+ if (qe.expire && (time(NULL) > qe.expire)) {
+ record_abandoned(&qe);
+ reason = QUEUE_TIMEOUT;
+ res = 0;
+ ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+ break;
+ }
/* see if we need to move to the next penalty level for this queue */
while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) {
@@ -4757,7 +4794,6 @@
/* If using dynamic realtime members, we should regenerate the member list for this queue */
update_realtime_members(qe.parent);
-
/* OK, we didn't get anybody; wait for 'retry' seconds; may get a digit to exit with */
res = wait_a_bit(&qe);
if (res)
@@ -5767,7 +5803,7 @@
/* List Queue Members */
mem_iter = ao2_iterator_init(q->members, 0);
while ((mem = ao2_iterator_next(&mem_iter))) {
- if (ast_strlen_zero(memberfilter) || !strcmp(mem->interface, memberfilter)) {
+ if (ast_strlen_zero(memberfilter) || !strcmp(mem->interface, memberfilter) || !strcmp(mem->membername, memberfilter)) {
astman_append(s, "Event: QueueMember\r\n"
"Queue: %s\r\n"
"Name: %s\r\n"
Modified: team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c Fri Aug 1 13:40:04 2008
@@ -125,6 +125,7 @@
static char imapport[8];
static char imapflags[128];
static char imapfolder[64];
+static char imapparentfolder[64] = "\0";
static char greetingfolder[64];
static char authuser[32];
static char authpassword[42];
@@ -5985,8 +5986,13 @@
snprintf(spec, len, "%s%s", tmp, use_folder? imapfolder: "INBOX");
else if (box == GREETINGS_FOLDER)
snprintf(spec, len, "%s%s", tmp, greetingfolder);
- else
- snprintf(spec, len, "%s%s%c%s", tmp, imapfolder, delimiter, mbox(box));
+ else /* Other folders such as Friends, Family, etc... */
+ if (!ast_strlen_zero(imapparentfolder)) {
+ /* imapparentfolder would typically be set to INBOX */
+ snprintf(spec, len, "%s%s%c%s", tmp, imapparentfolder, delimiter, mbox(box));
+ } else {
+ snprintf(spec, len, "%s%s", tmp, mbox(box));
+ }
}
static int init_mailstream(struct vm_state *vms, int box)
@@ -9575,7 +9581,9 @@
ast_clear_flag(&config_flags, CONFIG_FLAG_FILEUNCHANGED);
ucfg = ast_config_load("users.conf", config_flags);
}
-
+#ifdef IMAP_STORAGE
+ ast_copy_string(imapparentfolder, "\0", sizeof(imapparentfolder));
+#endif
/* set audio control prompts */
strcpy(listen_control_forward_key,DEFAULT_LISTEN_CONTROL_FORWARD_KEY);
strcpy(listen_control_reverse_key,DEFAULT_LISTEN_CONTROL_REVERSE_KEY);
@@ -9729,6 +9737,9 @@
ast_copy_string(imapfolder, val, sizeof(imapfolder));
} else {
ast_copy_string(imapfolder,"INBOX", sizeof(imapfolder));
+ }
+ if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) {
+ ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder));
}
if ((val = ast_variable_retrieve(cfg, "general", "imapgreetings"))) {
imapgreetings = ast_true(val);
Modified: team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c?view=diff&rev=135193&r1=135192&r2=135193
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c Fri Aug 1 13:40:04 2008
@@ -205,6 +205,23 @@
#define DEFAULT_FREQ_OK 60 * 1000 /* How often to check for the host to be up */
#define DEFAULT_FREQ_NOTOK 10 * 1000 /* How often to check, if the host is down... */
+/* if a pvt has encryption setup done and is running on the call */
+#define IAX_CALLENCRYPTED(pvt) \
+ (ast_test_flag(pvt, IAX_ENCRYPTED) && ast_test_flag(pvt, IAX_KEYPOPULATED))
+
+#define IAX_DEBUGDIGEST(msg, key) do { \
+ int idx; \
+ char digest[33] = ""; \
+ \
+ if (!iaxdebug) \
+ break; \
+ \
+ for (idx = 0; idx < 16; idx++) \
+ sprintf(digest + (idx << 1), "%2.2x", (unsigned char) key[idx]); \
+ \
+ ast_log(LOG_NOTICE, msg " IAX_COMMAND_RTKEY to rotate key to '%s'\n", digest); \
+ } while(0)
+
static struct io_context *io;
static struct sched_context *sched;
@@ -279,6 +296,7 @@
response, so that we've achieved a three-way handshake with
them before sending voice or anything else*/
IAX_ALLOWFWDOWNLOAD = (1 << 26), /*!< Allow the FWDOWNL command? */
+ IAX_NOKEYROTATE = (1 << 27), /*!< Disable key rotation with encryption */
};
static int global_rtautoclear = 120;
@@ -590,6 +608,9 @@
ast_aes_encrypt_key ecx;
/*! Decryption AES-128 Key */
ast_aes_decrypt_key dcx;
+ /*! scheduler id associated with iax_key_rotate
+ * for encrypted calls*/
+ int keyrotateid;
/*! 32 bytes of semi-random data */
unsigned char semirand[32];
/*! Associated registry */
@@ -1413,6 +1434,7 @@
AST_SCHED_DEL(sched, pvt->authid);
AST_SCHED_DEL(sched, pvt->initid);
AST_SCHED_DEL(sched, pvt->jbid);
+ AST_SCHED_DEL(sched, pvt->keyrotateid);
}
static void iax2_frame_free(struct iax_frame *fr)
@@ -1481,6 +1503,7 @@
tmp->autoid = -1;
tmp->authid = -1;
tmp->initid = -1;
+ tmp->keyrotateid = -1;
ast_string_field_set(tmp,exten, "s");
ast_string_field_set(tmp,host, host);
@@ -1770,7 +1793,7 @@
iaxs[x]->pingid = iax2_sched_add(sched, ping_time * 1000, send_ping, (void *)(long)x);
iaxs[x]->lagid = iax2_sched_add(sched, lagrq_time * 1000, send_lagrq, (void *)(long)x);
iaxs[x]->amaflags = amaflags;
- ast_copy_flags(iaxs[x], (&globalflags), IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
+ ast_copy_flags(iaxs[x], &globalflags, IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_NOKEYROTATE);
ast_string_field_set(iaxs[x], accountcode, accountcode);
ast_string_field_set(iaxs[x], mohinterpret, mohinterpret);
@@ -3386,7 +3409,7 @@
if (peer->maxms && ((peer->lastms > peer->maxms) || (peer->lastms < 0)))
goto return_unref;
- ast_copy_flags(cai, peer, IAX_SENDANI | IAX_TRUNK | IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
+ ast_copy_flags(cai, peer, IAX_SENDANI | IAX_TRUNK | IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_NOKEYROTATE);
cai->maxtime = peer->maxms;
cai->capability = peer->capability;
cai->encmethods = peer->encmethods;
@@ -3810,12 +3833,54 @@
return &ast_null_frame;
}
+static int iax2_key_rotate(const void *vpvt)
+{
+ int res = 0;
+ struct chan_iax2_pvt *pvt = (void *) vpvt;
+ struct MD5Context md5;
+ char key[17] = "";
+ struct iax_ie_data ied = {
+ .pos = 0,
+ };
+
+ ast_mutex_lock(&iaxsl[pvt->callno]);
+
+ pvt->keyrotateid =
+ ast_sched_add(sched, 120000 + (ast_random() % 180001), iax2_key_rotate, vpvt);
+
+ snprintf(key, sizeof(key), "%lX", ast_random());
+
+ MD5Init(&md5);
+ MD5Update(&md5, (unsigned char *) key, strlen(key));
+ MD5Final((unsigned char *) key, &md5);
+
+ IAX_DEBUGDIGEST("Sending", key);
+
+ iax_ie_append_raw(&ied, IAX_IE_CHALLENGE, key, 16);
+
+ res = send_command(pvt, AST_FRAME_IAX, IAX_COMMAND_RTKEY, 0, ied.buf, ied.pos, -1);
+
+ ast_aes_encrypt_key((unsigned char *) key, &pvt->ecx);
+
+ ast_mutex_unlock(&iaxsl[pvt->callno]);
+
+ return res;
+}
+
static int iax2_start_transfer(unsigned short callno0, unsigned short callno1, int mediaonly)
{
int res;
struct iax_ie_data ied0;
struct iax_ie_data ied1;
unsigned int transferid = (unsigned int)ast_random();
+
+ if (IAX_CALLENCRYPTED(iaxs[callno0]) || IAX_CALLENCRYPTED(iaxs[callno1])) {
+ ast_debug(1, "transfers are not supported for encrypted calls at this time");
+ ast_set_flag(iaxs[callno0], IAX_NOTRANSFER);
+ ast_set_flag(iaxs[callno1], IAX_NOTRANSFER);
+ return 0;
+ }
+
memset(&ied0, 0, sizeof(ied0));
iaxs[callno0]->transferid = transferid;
iax_ie_append_addr(&ied0, IAX_IE_APPARENT_ADDR, &iaxs[callno1]->addr);
@@ -4722,8 +4787,23 @@
* (the endpoint should detect the lost packet itself). But, we want to do this here, so that we
* increment the "predicted timestamps" for voice, if we're predicting */
if(f->frametype == AST_FRAME_VOICE && f->datalen == 0)
- return 0;
-
+ return 0;
+#if 0
+ ast_log(LOG_NOTICE,
+ "f->frametype %c= AST_FRAME_VOICE, %sencrypted, %srotation scheduled...\n",
+ *("=!" + (f->frametype == AST_FRAME_VOICE)),
+ IAX_CALLENCRYPTED(pvt) ? "" : "not ",
+ pvt->keyrotateid != -1 ? "" : "no "
+ );
+#endif
+
+ if (pvt->keyrotateid == -1 && f->frametype == AST_FRAME_VOICE && IAX_CALLENCRYPTED(pvt)) {
+ if (ast_test_flag(pvt, IAX_NOKEYROTATE)) {
+ pvt->keyrotateid = -2;
+ } else {
+ iax2_key_rotate(pvt);
+ }
+ }
if ((ast_test_flag(pvt, IAX_TRUNK) ||
(((fts & 0xFFFF0000L) == (lastsent & 0xFFFF0000L)) ||
@@ -5898,6 +5978,7 @@
ast_copy_flags(iaxs[callno], user, IAX_CODEC_USER_FIRST);
ast_copy_flags(iaxs[callno], user, IAX_CODEC_NOPREFS);
ast_copy_flags(iaxs[callno], user, IAX_CODEC_NOCAP);
+ ast_copy_flags(iaxs[callno], user, IAX_NOKEYROTATE);
iaxs[callno]->encmethods = user->encmethods;
/* Store the requested username if not specified */
if (ast_strlen_zero(iaxs[callno]->username))
@@ -9396,7 +9477,20 @@
iaxs[fr->callno]->transferring = TRANSFER_NONE;
iaxs[fr->callno]->mediareleased = 1;
}
- break;
+ break;
+ case IAX_COMMAND_RTKEY:
+ if (!IAX_CALLENCRYPTED(iaxs[fr->callno])) {
+ ast_log(LOG_WARNING,
+ "we've been told to rotate our encryption key, "
+ "but this isn't an encrypted call. bad things will happen.\n"
+ );
+ break;
+ }
+
+ IAX_DEBUGDIGEST("Receiving", ies.challenge);
+
+ ast_aes_decrypt_key((unsigned char *) ies.challenge, &iaxs[fr->callno]->dcx);
+ break;
case IAX_COMMAND_DPREP:
complete_dpreply(iaxs[fr->callno], &ies);
break;
@@ -9995,7 +10089,7 @@
memset(&cai, 0, sizeof(cai));
cai.capability = iax2_capability;
- ast_copy_flags(&cai, &globalflags, IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
+ ast_copy_flags(&cai, &globalflags, IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_NOKEYROTATE);
/* Populate our address from the given */
if (create_addr(pds.peer, NULL, &sin, &cai)) {
@@ -10014,7 +10108,7 @@
}
/* If this is a trunk, update it now */
- ast_copy_flags(iaxs[callno], &cai, IAX_TRUNK | IAX_SENDANI | IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
+ ast_copy_flags(iaxs[callno], &cai, IAX_TRUNK | IAX_SENDANI | IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_NOKEYROTATE);
if (ast_test_flag(&cai, IAX_TRUNK)) {
int new_callno;
if ((new_callno = make_trunk(callno, 1)) != -1)
@@ -10355,6 +10449,9 @@
if (peer) {
if (firstpass) {
+ if (ast_test_flag(&globalflags, IAX_NOKEYROTATE)) {
+ ast_copy_flags(peer, &globalflags, IAX_NOKEYROTATE);
+ }
ast_copy_flags(peer, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
peer->encmethods = iax2_encryption;
peer->adsi = adsi;
@@ -10405,6 +10502,11 @@
peer->authmethods = get_auth_methods(v->value);
} else if (!strcasecmp(v->name, "encryption")) {
peer->encmethods = get_encrypt_methods(v->value);
+ } else if (!strcasecmp(v->name, "keyrotate")) {
+ if (ast_false(v->value))
+ ast_set_flag(peer, IAX_NOKEYROTATE);
+ else
+ ast_clear_flag(peer, IAX_NOKEYROTATE);
} else if (!strcasecmp(v->name, "transfer")) {
if (!strcasecmp(v->value, "mediaonly")) {
ast_set_flags_to(peer, IAX_NOTRANSFER|IAX_TRANSFERMEDIA, IAX_TRANSFERMEDIA);
@@ -10627,7 +10729,7 @@
user->adsi = adsi;
ast_string_field_set(user, name, name);
ast_string_field_set(user, language, language);
- ast_copy_flags(user, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_CODEC_USER_FIRST | IAX_CODEC_NOPREFS | IAX_CODEC_NOCAP);
+ ast_copy_flags(user, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_CODEC_USER_FIRST | IAX_CODEC_NOPREFS | IAX_CODEC_NOCAP | IAX_NOKEYROTATE);
ast_clear_flag(user, IAX_HASCALLERID);
ast_string_field_set(user, cid_name, "");
ast_string_field_set(user, cid_num, "");
@@ -10673,6 +10775,11 @@
user->authmethods = get_auth_methods(v->value);
} else if (!strcasecmp(v->name, "encryption")) {
user->encmethods = get_encrypt_methods(v->value);
+ } else if (!strcasecmp(v->name, "keyrotate")) {
+ if (ast_false(v->value))
+ ast_set_flag(user, IAX_NOKEYROTATE);
+ else
+ ast_clear_flag(user, IAX_NOKEYROTATE);
} else if (!strcasecmp(v->name, "transfer")) {
if (!strcasecmp(v->value, "mediaonly")) {
ast_set_flags_to(user, IAX_NOTRANSFER|IAX_TRANSFERMEDIA, IAX_TRANSFERMEDIA);
@@ -11034,7 +11141,12 @@
authdebug = ast_true(v->value);
else if (!strcasecmp(v->name, "encryption"))
iax2_encryption = get_encrypt_methods(v->value);
- else if (!strcasecmp(v->name, "transfer")) {
+ else if (!strcasecmp(v->name, "keyrotate")) {
+ if (ast_false(v->value))
+ ast_set_flag((&globalflags), IAX_NOKEYROTATE);
+ else
+ ast_clear_flag((&globalflags), IAX_NOKEYROTATE);
+ } else if (!strcasecmp(v->name, "transfer")) {
if (!strcasecmp(v->value, "mediaonly")) {
[... 2189 lines stripped ...]
More information about the asterisk-commits
mailing list