Commit Graph

13621 Commits

Author SHA1 Message Date
Luigi Rizzo 04497db215 remove duplicate headers.
Properly check for netdb.h (there is actually tens of places to fix)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:28:19 +00:00
Luigi Rizzo 2a61f4bfd5 put back default optimization to -O6 (previously changed by mistake)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:15:21 +00:00
Luigi Rizzo fdb7f7ba3d 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.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Mark Michelson fd7b3e7261 Fixing a problem pointed out by Qwell
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 19:51:47 +00:00
Mark Michelson 3107395445 Added some locks that should have been around astman_send_error,
at least according to the comments.

(closes issue #11258, reported and patched by eliel)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 19:41:15 +00:00
Steve Murphy ab32ff2ad8 This corrects a hashtab removal, given a bad argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 19:26:54 +00:00
Steve Murphy 542f29ea0e 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 18:59:02 +00:00
Luigi Rizzo f8b60a665e 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).

1.4 will be fixed when we decide the issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 18:48:15 +00:00
Mark Michelson 68a805b70b 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 17:11:43 +00:00
Kevin P. Fleming 547306835e Merged revisions 89325 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89325 | kpfleming | 2007-11-16 10:47:46 -0600 (Fri, 16 Nov 2007) | 4 lines

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.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 16:56:59 +00:00
Mark Michelson 2f7440932c Merged revisions 89323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89323 | mmichelson | 2007-11-16 09:28:22 -0600 (Fri, 16 Nov 2007) | 5 lines

Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.

(closes issue #11271, reported and patched by atis, with small modifications from me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 15:44:27 +00:00
Luigi Rizzo 02733f3290 add a small new function to retrieve variables from a config
once we have a pointer to the category.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 10:07:24 +00:00
Christian Richter c00d3374ff fixed #10631, about one way audio. thanks IgorG again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 10:06:55 +00:00
Luigi Rizzo e6e98982c9 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.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 09:51:41 +00:00
Christian Richter 0bc0f6919f fixed compilation of chan_misdn, #11269, thanks IgorG.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 08:54:04 +00:00
Tilghman Lesher 8309f54e39 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?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 23:50:15 +00:00
Tilghman Lesher 7c4df5c827 Merged revisions 89302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89302 | tilghman | 2007-11-15 12:37:38 -0600 (Thu, 15 Nov 2007) | 2 lines

Start Asterisk in Debian at a more reasonable time (since zaptel is at level 20)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:49:31 +00:00
Tilghman Lesher f4d440e039 Merged revisions 89301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89301 | tilghman | 2007-11-15 12:23:14 -0600 (Thu, 15 Nov 2007) | 2 lines

Fix an uninitialized memory read found by valgrind

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:39:46 +00:00
Tilghman Lesher 8044dce3c0 Fix trunk breakage due to chan->lock being renamed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:15:48 +00:00
Tilghman Lesher fc74a46ee2 Merged revisions 89298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89298 | tilghman | 2007-11-15 12:05:56 -0600 (Thu, 15 Nov 2007) | 5 lines

Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:11:36 +00:00
Russell Bryant 1bf63d1c5b 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)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 17:27:27 +00:00
Steve Murphy eee92d0881 Get rid of a previously missed ast_log call for debug, no longer nec.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:50:16 +00:00
Steve Murphy 0bad49b3dd 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:30:13 +00:00
Luigi Rizzo 09d9cce1d8 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).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:20:47 +00:00
Joshua Colp 139978dbb7 Fix typo in UPGRADE.txt. 'increase' should have been used, not 'increasing'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 15:39:03 +00:00
Joshua Colp e7e208009f 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 15:21:04 +00:00
Mark Michelson 6260590ec2 Merged revisions 89288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89288 | mmichelson | 2007-11-15 08:57:28 -0600 (Thu, 15 Nov 2007) | 3 lines

Undoing previous commit since I realize it was wrong


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:58:30 +00:00
Mark Michelson eee4ed80cf Merged revisions 89286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89286 | mmichelson | 2007-11-15 08:54:10 -0600 (Thu, 15 Nov 2007) | 4 lines

Adding a missing mutex unlock.

(closes issue 11256, reported and patched by ys)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:55:35 +00:00
Olle Johansson 8740176dc3 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 12:21:57 +00:00
Olle Johansson a4ce44bda4 Merged revisions 89281 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89281 | oej | 2007-11-15 12:26:22 +0100 (Tor, 15 Nov 2007) | 6 lines

Don't send re-invites during pending INVITE transactions.

Patch by one47 - thanks!

Closes issue #9305

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:31:27 +00:00
Olle Johansson c698e39245 Merged revisions 89280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89280 | oej | 2007-11-15 12:15:09 +0100 (Tor, 15 Nov 2007) | 5 lines

Improve support for multipart messages. Code by gasparz, changes
by me (mostly formatting). Thanks, gasparz!

Closes issue #10947

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:27:19 +00:00
Olle Johansson 257b4fb41e Exit early instead of deciding to exit after processing the message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 10:26:00 +00:00
Olle Johansson eab6b00904 Add support for application/dtmf SIP INFO dtmf handling. Yep, another
way of handling DTMF in SIP. Totally undocumented, but implemented
in enough devices so we have to support it. 

Code by sergee, small changes by oej.

Closes issue #11049


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 10:21:41 +00:00
Steve Murphy 620e580ed6 Had trouble playing with parking; spent a long time trying to reason out MATCHMORE mode. made these updates and xfers on zaptel lines seem to work ok now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 01:42:12 +00:00
Tilghman Lesher 8820ae5b2e Merged revisions 89275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89275 | tilghman | 2007-11-14 17:23:58 -0600 (Wed, 14 Nov 2007) | 5 lines

When a recording ends with '#', we are improperly trimming an extra 200ms from the recording.
Reported by: sim
Patch by: tilghman
Closes issue #11247

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 00:01:22 +00:00
Tilghman Lesher 5112f2b7e9 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 23:08:54 +00:00
Tilghman Lesher 36d9a5aaf3 Add callerid to the Hangup manager event.
Reported by: outtolunc
Patch by: outtolunc
Closes issue #11248


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 22:59:05 +00:00
Steve Murphy 20d24e1027 Rescaled the weights of the patterns to give something more independent of pattern length; and make . less likely to win. Question: which should win for 14102241145-- _1xxxxxxx. or _XXXXXXXXXXX -- right now, the pure X pattern will win.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 18:05:50 +00:00
Steve Murphy 225c94d950 A further problem highlighted by 11233 has been resolved; a certain combination of patterns in a certain order, led to a malformed trie, due to a ptr not being initialized in the loop. Also, some tree printing prettifications.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 15:43:30 +00:00
Tilghman Lesher 0f6892419e One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 15:13:22 +00:00
Tilghman Lesher b4839d4d4a Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 14:46:45 +00:00
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +00:00
Russell Bryant d3414c7552 Fix up various coding guidelines issues ...
- handle memory allocation failures
 - add an ast_ prefix to a publicly exported function
 - put curly braces in the right places
 - add a bunch of spaces where they should be be used


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 03:22:09 +00:00
Russell Bryant 51377db4a5 - Use the ARRAY_LEN macro in a couple places
- return errors from load_module / unload_module


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 02:57:13 +00:00
Russell Bryant 0df5e50e97 Use BEGIN_OPTIONS / END_OPTIONS to make the syntax highlighting in my editor happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:40:47 +00:00
Russell Bryant 31512895ae Instead of reserving 800 bytes for periodic announcements, use an array of
ast_str pointers and only alloate space for the strings as needed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:35:28 +00:00
Joshua Colp 7d561b994c Merged revisions 89260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89260 | file | 2007-11-13 21:15:12 -0400 (Tue, 13 Nov 2007) | 4 lines

Return the proper value when the srv_callback function executes properly.
(closes issue #11240)
Reported by: jtodd

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:16:50 +00:00
Russell Bryant 76696ac65f Convert most of the strings in the call_queue struct to use stringfields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:15:26 +00:00
Kevin P. Fleming a34bbab643 use simpler technique for removing known entries from lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 00:54:38 +00:00
Russell Bryant b30b1bc46f - Simplify removing an item from a list
- move a verbose message to after the item is added to the list
- make use of the ARRAY_LEN macro in one spot


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 00:33:52 +00:00