Luigi Rizzo [Mon, 19 Nov 2007 19:36:32 +0000 (19:36 +0000)]
move the declaration of struct ast_channel ast_frame and ast_module
to compat.h so it is always available - hopefully this will let
us reduce the number of inclusions of channel.h and frame.h
Print out the correct filename (features.conf) in the log message when parkpos options are incorrect.
(closes issue #11295)
Reported by: Laureano
Patches:
res_features.c.patch uploaded by Laureano (license 265)
Clarify documentation a bit, include that a frame has to pass through the core in order for the Local channel optimization to happen.
(closes issue #11246)
Reported by: jon
Olle Johansson [Mon, 19 Nov 2007 08:34:26 +0000 (08:34 +0000)]
Make some notes about a problem I found with the OPTIONs handler while working with
the bug tracker. Since we don't authenticate devices (peers/users) on OPTIONS we don't
have the proper context set for the user/peer.
However, we might not want to process an authentication for every OPTIONS, so we could
have a config option for this, "optionsforceok" to always answer 200 OK on the request
and not check device or destination, nor add a SDP. If Asterisk sends the OPTIONs request,
it doesn't care about the reply. Some devices use OPTIONs to discover capabilities,
since we should answer like an INVITE from the device and we need to support that properly
too, which we don't today.
Joshua Colp [Sun, 18 Nov 2007 17:01:41 +0000 (17:01 +0000)]
Change how we handle alloca to conform with how it is suggested in the autoconf manual for AC_FUNC_ALLOCA. FreeBSD 6 now builds again and no other platforms should be broken by this.
Joshua Colp [Sat, 17 Nov 2007 23:03:16 +0000 (23:03 +0000)]
Use autoconf logic to determine the presence of PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP and PTHREAD_MUTEX_RECURSIVE_NP. Enclose error message from network.h in "
Steve Murphy [Sat, 17 Nov 2007 17:46:36 +0000 (17:46 +0000)]
a quick fix to pbx_dundi.c to make it so it will compile. Hope I did the right thing. And some additions to removal of extens to take care of hashtab pointers in all cases.
Luigi Rizzo [Sat, 17 Nov 2007 17:27:26 +0000 (17:27 +0000)]
as discussed some time ago on the -dev list, create embedde object
with a .eo suffix even if they are coming from .cc sources.
This simplifies the handling in the build scripts.
Luigi Rizzo [Sat, 17 Nov 2007 09:54:54 +0000 (09:54 +0000)]
add a return NULL to a function that is expected to return a value
so compilers that don't understand that this code is NOTREACHED
will not complain (the fault is not much on the compiler but on the
declaration of pthread_exit on certain platforms)
s/certain platform/cygwin/ if you are really curious
Luigi Rizzo [Sat, 17 Nov 2007 09:51:45 +0000 (09:51 +0000)]
define RTLD_LOCAL for platforms that don't have it.
This is only to complete the build, clearly the linker
behaviour will be completely different and likely to
cause trouble in those cases.
Luigi Rizzo [Sat, 17 Nov 2007 09:48:45 +0000 (09:48 +0000)]
filter out modules that do not compile under windows
(this should be handled with the dependencies generated by
configure and menuselect, but will be fixed later)
Russell Bryant [Sat, 17 Nov 2007 06:33:07 +0000 (06:33 +0000)]
Update the configure script check for sys/poll.h to also provide the result in
include/asterisk/autoconfig.h. Also, move the conditional include of sys/poll.h
or asterisk/poll-compat.h into asterisk/config.h instead of the two headers it
existed in before.
Russell Bryant [Sat, 17 Nov 2007 06:07:57 +0000 (06:07 +0000)]
Use the fix suggested by Tilghman on the -dev to make cutting up the BUILDSUM
friendly to non-bash shells. I think this should work for BSD/mingw as well,
but did not yet remove the switch statement.
Luigi Rizzo [Sat, 17 Nov 2007 01:49:26 +0000 (01:49 +0000)]
acinclude.m4: add a function to help checking sdl-config, gtk-config
and the like (this could be used for gtk and gtk2 as well)
Other files: add tests for sdl, sdl_image and avcodec and regenerate
configure and autoconfig.h.in
Steve Murphy [Fri, 16 Nov 2007 23:33:32 +0000 (23:33 +0000)]
My goodness, haven't handled an extension deletion. Add code to ast_context_remove_extension2() to remove an extension from the trie. Done by marking it deleted. The scoreboard won't update for it any more. Also, a couple of calls to insert hashtab had a spurious ->exten, which was removed.
Luigi Rizzo [Fri, 16 Nov 2007 22:37:17 +0000 (22:37 +0000)]
whitespace only change - adjust indentation and add some
comments on the content of these two files.
utils.h (which is included in over 150 files) contains a lot of
unrelated functions which require the inclusion of a large number
of other headers. At some point we should partition its content
in a better way.
Russell Bryant [Fri, 16 Nov 2007 22:33:24 +0000 (22:33 +0000)]
Blocked revisions 89339 via svnmerge
........
r89339 | russell | 2007-11-16 16:26:44 -0600 (Fri, 16 Nov 2007) | 5 lines
Temporarily revert revision 89325, which added md5 magic for keeping track of
what build options were used. We agreed that we should remove this before
making a 1.4 release, and then we can put it back in. Then, we can take a
month or so to play around with it to get it how we want it.
Luigi Rizzo [Fri, 16 Nov 2007 20:04:58 +0000 (20:04 +0000)]
Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.
In this change:
use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h
Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.
Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better.
For the time being I have left alone second-level directories
(main/db1-ast, etc.).
Steve Murphy [Fri, 16 Nov 2007 18:59:02 +0000 (18:59 +0000)]
This fixes a problem with pattern ranges; and corrects a situation in res_features, where an extension would be created with the name Zap/51, as an example. THe / is bad because it would tend to mean that the 51 is to be cid matched.
Luigi Rizzo [Fri, 16 Nov 2007 18:48:15 +0000 (18:48 +0000)]
both md5sum and variable substitutions such as ${BUILDSUM:0:8}
are not available in FreeBSD.
For the time being, put in a workaround so we can build the system,
and wait for the result of the discussion on whether we can store
the md5 as a string rather than 4 ints (if so, we won't need more
complex tricks with awk or sed for splitting the md5).
Mark Michelson [Fri, 16 Nov 2007 17:11:43 +0000 (17:11 +0000)]
Adding confirmation playback when forwarding voicemail messages. This will attempt
to play the name(s) of the person(s) to whom you are forwarding the message prior to
prompting for prepending. If no name is found, the extension is read back verbatim.
(closes issue #9046, reported and patched by jaroth)
To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash.
If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer.
Luigi Rizzo [Fri, 16 Nov 2007 09:51:41 +0000 (09:51 +0000)]
move the inner part of config file parsing to a separate function,
so it can be reused in the implementation of cli commands when
they have a similar syntax.
Tilghman Lesher [Thu, 15 Nov 2007 23:50:15 +0000 (23:50 +0000)]
If we're going to be passing a negative value for the size of a stringfield,
in order to indicate something, then using an UNSIGNED parameter is bad,
mmmmmkay?
Russell Bryant [Thu, 15 Nov 2007 17:27:27 +0000 (17:27 +0000)]
Merged revisions 89296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89296 | russell | 2007-11-15 11:19:28 -0600 (Thu, 15 Nov 2007) | 8 lines
Update the SLAStation application to account for the case where the SLA thread
has a call out to the station, but the user has pressed a line button to answer
the call instead of picking up the handset. If they do, the phone sends out a
new INVITE. So, the SLAStation app must check to see if it is picking up a
ringing trunk, and ensure that the other stations stop ringing.
(reported internally, patched by me, tested by mogorman)
Steve Murphy [Thu, 15 Nov 2007 16:30:13 +0000 (16:30 +0000)]
Perhaps I went overboard on initializing things. I can remove unnecc. stuff later. A few bug fixes. Killing small bugs on the way to killing bigger ones. Removed locking on hashtabs; there's plenty of locks already being taken. A small bug in the root_tree hashtab compare func.
Luigi Rizzo [Thu, 15 Nov 2007 16:20:47 +0000 (16:20 +0000)]
access channel locks through ast_channel_lock/unlock/trylock and not
through ast_mutex primitives.
To detect all occurrences, I have renamed the lock field in struct ast_channel
so it is clear that it shouldn't be used directly.
There are some uses in res/res_features.c (see details of the diff)
that are error prone as they try and lock two channels without
caring about the order (or without explaining why it is safe).
Joshua Colp [Thu, 15 Nov 2007 15:21:04 +0000 (15:21 +0000)]
And file said... let trunk build again! Accomplished by some more constification, and marking a function in chan_sip as purposely unused until it is fixed up.
Olle Johansson [Thu, 15 Nov 2007 12:21:57 +0000 (12:21 +0000)]
Always relying on the responses when crossing NAT's are not a good
solution, it breaks communication.
Rizzo - you need to implement a configuration option for this
code. It's good, but maybe should be off by default.