dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

1287 Commits

Author SHA1 Message Date
russell 4d2ea03db9 Merged revisions 89594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89594 | russell | 2007-11-26 11:41:04 -0600 (Mon, 26 Nov 2007) | 3 lines

Add channel locking to a function that needed to be doing it.  This is just a
little something I noticed while working on a completely unrelated issue.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89596 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 17:49:47 +00:00
murf bbd5a3d02e closes issue #11356; Many thanks to snuffy for his code review and changes to cut down duplication. I tested this against hashtest, and it passes. I reviewed the changes, and they look reasonable. I had to remove a few const decls to make things compile on my workstation,
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89591 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 17:26:01 +00:00
kpfleming 9af283654a Merged revisions 89586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89586 | kpfleming | 2007-11-26 11:20:36 -0600 (Mon, 26 Nov 2007) | 2 lines

when parsing application options that take arguments, don't indicate that the option was supplied unless a non-zero-length argument was found for it

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89588 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 17:21:37 +00:00
murf 4f8e82fa2b Thanks to pnlarsson for noting the spelling error in the cli commands. Also, added some verbage about the new algorithm to CHANGES.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89583 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 16:24:27 +00:00
file 60d6d5e6e4 Revert change for 11348 until it can be looked at even more.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89582 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 16:20:04 +00:00
file 532589d879 Merged revisions 89577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89577 | file | 2007-11-26 11:34:38 -0400 (Mon, 26 Nov 2007) | 6 lines

If channel allocation fails because the alert pipe could not be created also free the scheduler context.
(closes issue #11355)
Reported by: eliel
Patches:
      main.channel.c.patch uploaded by eliel (license 64)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89578 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 15:36:27 +00:00
file 5219dc885e Make the behavior of using /dev/urandom for random numbers the same as random().
(closes issue #11348)
Reported by: sperreault
Patches:
      ast_random2.diff uploaded by sperreault (license 252)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89576 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 15:28:13 +00:00
oej bc21278887 Try to get channel.h and channel.c aligned in regards to ast_set_callerid as well
as change name of variables to follow the rest of the naming.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89564 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-25 19:33:33 +00:00
murf 2a36d53ce3 closes issue #11363; where the pattern _20x. buried in an included context, didn't match 2012; There were a small set of problems to fix: 1. I needed NOT to score patterns unless you are at the end of the data string. 2. Capital N,X,Z and small n,x,z are OK in patterns. I canonicalize the patterns in the trie to caps. 3. When a pattern ends with dot or exclamation, CANMATCH/MATCHMORE should always report this pattern, no matter the length. With this commit, I also supplied the wish of Luigi, where the user can select which pattern matching algorithm to use, the old (legacy) pattern matcher, or the new, trie based matcher. The OLD matcher is the default. A new [general] section variable, extenpatternmatchnew, is added to the extensions.conf, and the example config has it set to false. If true, the new matcher is used. In all other respects, the context/exten structs are the same; the tries and hashtabs are formed, but in the new mode the tries are not used. A new CLI command 'dialplan set extenpatternmatch true/false' is provided to allow switching at run time. I beg users that are forced to return to the old matcher to please report the reason in the bug tracker. Measured the speed benefit of the new matcher against an impossibly large context with 10,000 extensions: the new matcher is 374 times faster.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89547 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 21:00:26 +00:00
murf f0138f250b Added <sys/file.h> include to allow trunk to compile. Hope this doesn't louse thing up.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89544 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 16:53:24 +00:00
rizzo 999f881868 remove some unnecessary includes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89542 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 13:48:48 +00:00
tilghman cdbe5cdfb1 Merged revisions 89540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89540 | tilghman | 2007-11-24 00:19:23 -0600 (Sat, 24 Nov 2007) | 9 lines

Currently, zero-length voicemail messages cause a hangup in VoicemailMain.
This change fixes the problem, with a multi-faceted approach.  First, we
do our best to avoid these messages from being created in the first place,
and second, if that fails, we detect when the voicemail message is
zero-length and avoid exiting at that point.
Reported by: dtyoo
Patch by: gkloepfer,tilghman
(Closes issue #11083)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 06:24:46 +00:00
tilghman 8b1450abe3 Merged revisions 89536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89536 | tilghman | 2007-11-23 11:18:26 -0600 (Fri, 23 Nov 2007) | 10 lines

Up until this point, the XML output of the manager has been technically
invalid, due to the repetition of certain parameters in a single event.
This caused various issues for XML parsers, some of which refused to parse
at all, given the invalidity of the rendered XML.  So this commit fixes
the XML output, ensuring that each entity parameter has a unique name, thus
ensuring valid XML.
Reported by: msetim
Patch by: tilghman
(Closes issue #10220)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89537 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23 17:56:56 +00:00
rizzo 26ba1e961f more removal of fcntl.h and other system headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89517 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 01:13:46 +00:00
rizzo 8cd33321ef remove a number of #include <fcntl.h> which are either
useless or done elsewhere



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89516 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 01:03:02 +00:00
rizzo 9a04121e36 implement the split of file.h and mod_format.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89515 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 00:53:49 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo d5032599cd add a missing return
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89508 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 22:20:36 +00:00
murf a1c19a6b5c closes issue #11290; the proposed patch was a good guess, and would solve the bug to some extent, but was really masking the real issue, that there were bad entries in the table. This fix removes the condition that the hashtab updates be done on exten removal only when the pattern_tree was present, which is silly. The operations that apply to the pattern tree are instead made conditional. Also, threw back in routines that kpfleming deleted because of probs in the 64-bit world. Tested on both 32 and 64-bit machines (compile). Tested the reload problem with over 20 reloads, and no problems. If you find more problems, please reopen 11290.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89505 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 20:38:00 +00:00
russell 3564d92577 Remove obsolete OLD_DSP_ROUTINES code. Also, remove the FAX_DETECT define and
only do the calculations if fax detection is enabled on the dsp.

(closes issue #11331)
Reported by: dimas
Patches:
      dsp.patch uploaded by dimas (license 88)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89490 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 18:52:19 +00:00
mmichelson 40ff1f7b41 There existed about a 1 in 4 billion chance that reading from /dev/urandom
would return LONG_MIN (1 in 9 quintillion if using 64-bit longs). Since there
is no positive equivalent of LONG_MIN, the result of labs() in this case is
unpredictable. This fixes that situation.

(closes issue #11336, reported and patched by sperreault)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89487 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 18:19:22 +00:00
mmichelson a83ecf2fb3 I introduced a deadlock avoidance into 1.4, which I attempted to port to trunk as well.
Unfortunately, since trunk uses read/write locks for the context lock, it means that I have
actually *introduced* a deadlock condition since they are not recursive. Removing this change
for now and will look into introducing a different one.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89483 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 16:08:12 +00:00
kpfleming ffdbfcd8de remove some debugging code that doesn't compile on 64-bit platforms
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89480 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 15:29:39 +00:00
murf 675fa772c0 closes issue #11265; Thanks to snuffy for his work on neatening up the code and removing duplicated code.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89478 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 15:11:43 +00:00
rizzo 4b0514e37c add missing paths.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89476 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 01:35:30 +00:00
murf b1bcb60bea A free in add_pri was ultimately the source of the grief we were having with parking. This set of changes fixes that problem, and introduces some more error messages, and puts debugs into ifdefs for what could be short-term usage. Txs to Terry W. for his help, guidance, and especially patience.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89474 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 01:09:47 +00:00
rizzo 0043b6cd58 more header removal/normalization
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89473 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 00:23:49 +00:00
tilghman 07742d8fe2 Add support for new recorded character sounds
Closes issue #5208


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89467 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:28:57 +00:00
rizzo 89d8d78652 move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:16:15 +00:00
rizzo 8d3385f534 move internal function declarations to include/asterisk/_private.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 22:18:21 +00:00
kpfleming 7c35bb6a7f switch compile-time option checking to string storage mode in this branch too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 19:28:10 +00:00
mmichelson 8591091cd8 Merged revisions 89457 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89457 | mmichelson | 2007-11-20 11:50:31 -0600 (Tue, 20 Nov 2007) | 9 lines

According to comments in main/pbx.c, it is essential that if we are going to lock
the conlock as well as the hints lock, it must be locked in that respective order.
In order to prevent a potential deadlock, we need to lock the conlock prior to 
locking the hints lock in ast_hint_state_changed (see the call stack example on
issue #11323 for how this can happen).

(closes issue #11323, reported  by eelcob, suggestion for patch by eelcob, patch by me)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89458 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 17:59:00 +00:00
file 87a84acde8 Minor documentation tweak and if an incorrect parameter is given to core show translation return the usage information.
(closes issue #11316)
Reported by: eliel
Patches:
      translate.c.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89449 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 15:00:41 +00:00
rizzo e87c861cca initial makefile changes to build loadable modules under cygwin
(not complete yet - still need to sort out dependecies on res_*)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89443 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 07:42:38 +00:00
murf 594f71fdcb Get rid of some debug messages in pbx.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89442 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 00:17:15 +00:00
murf 096ab948ca These changes were made in response to niklas@tese.se's letter of 11-17-2007, where he had 20 and 201 in two different contexts, included in the same context. In that particular case, we were behaving the same as 1.4, but after experimenting, I quickly found that if 20 and 201 were in the same extension, 1.4 would return 201, and this code returns 20. These changes now enable the current code to replicate the behavior of 1.4 in respect to MATCHMORE in cases like this.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89438 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 22:55:38 +00:00
rizzo f21fd57280 another few errno.h removals
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89433 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 21:18:14 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
rizzo 9cf442d7f7 include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +00:00
murf b3e3d22496 a correction to code involved in an extension removal
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89422 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 17:18:26 +00:00
oej 3c9ab4b916 Add some debugging to the routines that finds our local IP address.
Related to bug #9225


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 08:41:14 +00:00
murf f5e86448ae 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.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89388 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 17:46:36 +00:00
rizzo 3136f24f36 trim more redundant headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89384 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 16:18:53 +00:00
rizzo d5c3a24242 remove unnecessary includes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89383 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:47:33 +00:00
rizzo 457e19cda1 fix breakage induced by previous mistake
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89382 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:45:46 +00:00
rizzo fb8143ad31 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:11:53 +00:00
rizzo 4856fc7b18 main is called main not amain!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89378 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 12:44:22 +00:00
rizzo a3fe6d2b0f conditional targets for building the windows version
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89377 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 12:33:15 +00:00
rizzo 163cc146a7 more cygwin/mingw32 compatibility fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89373 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 10:54:52 +00:00
rizzo 4dfe6b5327 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.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89367 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 09:51:45 +00:00
rizzo 8fde063b48 netdb.h is used for gethostbyname, and it was not included in some
platforms.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89365 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 09:44:14 +00:00
rizzo adfbbca7d5 Loader for cygwin where asterisk is really a big dll
(something like this is already in 1.2)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89364 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 09:37:12 +00:00
rizzo fda7338287 use poll as detected by configure
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89355 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 03:07:06 +00:00
rizzo 18911d90cb remove a bunch of duplicate includes
Reproduce with

grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr 



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 23:54:45 +00:00
murf c2f69c8067 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.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89346 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 23:33:32 +00:00
rizzo 977ebbedcd remove duplicate headers.
Properly check for netdb.h (there is actually tens of places to fix)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89335 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:28:19 +00:00
rizzo 883346d64a 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: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
mmichelson 4948a0f37c Fixing a problem pointed out by Qwell
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89332 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 19:51:47 +00:00
mmichelson b075ea8bbb 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: http://svn.digium.com/svn/asterisk/trunk@89331 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 19:41:15 +00:00
murf 414b63e284 This corrects a hashtab removal, given a bad argument
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89330 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 19:26:54 +00:00
murf 2efc505dda 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: http://svn.digium.com/svn/asterisk/trunk@89329 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 18:59:02 +00:00
kpfleming 3dc676ceb8 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: http://svn.digium.com/svn/asterisk/trunk@89326 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 16:56:59 +00:00
rizzo b483469ff7 add a small new function to retrieve variables from a config
once we have a pointer to the category.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89322 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 10:07:24 +00:00
tilghman 9f485cd0a3 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: http://svn.digium.com/svn/asterisk/trunk@89312 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 23:50:15 +00:00
murf 0030cdcdba Get rid of a previously missed ast_log call for debug, no longer nec.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89295 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 16:50:16 +00:00
murf c7d5cd8c55 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: http://svn.digium.com/svn/asterisk/trunk@89294 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 16:30:13 +00:00
rizzo 6a4d64e3ef 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: http://svn.digium.com/svn/asterisk/trunk@89293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 16:20:47 +00:00
mmichelson 5b4bf856a6 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: http://svn.digium.com/svn/asterisk/trunk@89289 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 14:58:30 +00:00
mmichelson c47553e084 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: http://svn.digium.com/svn/asterisk/trunk@89287 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 14:55:35 +00:00
murf f8c27db15a 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: http://svn.digium.com/svn/asterisk/trunk@89277 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 01:42:12 +00:00
tilghman 9aa591bc08 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: http://svn.digium.com/svn/asterisk/trunk@89276 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 00:01:22 +00:00
tilghman d671919ba0 Typo
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89274 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 23:08:54 +00:00
tilghman 4f48b54fbe Add callerid to the Hangup manager event.
Reported by: outtolunc
Patch by: outtolunc
Closes issue #11248


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89273 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 22:59:05 +00:00
murf bb05d8314e 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: http://svn.digium.com/svn/asterisk/trunk@89272 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 18:05:50 +00:00
murf b25337a583 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: http://svn.digium.com/svn/asterisk/trunk@89271 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 15:43:30 +00:00
tilghman 22206839a4 One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89270 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 15:13:22 +00:00
tilghman 4373e923a8 Typo
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89269 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 14:46:45 +00:00
rizzo ea0d4674a6 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: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
russell 2e70fd8720 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: http://svn.digium.com/svn/asterisk/trunk@89266 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 03:22:09 +00:00
file 850d5296b9 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: http://svn.digium.com/svn/asterisk/trunk@89262 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 01:16:50 +00:00
kpfleming cdae4a5591 use simpler technique for removing known entries from lists
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89259 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 00:54:38 +00:00
russell cc34f5c17e - 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: http://svn.digium.com/svn/asterisk/trunk@89258 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 00:33:52 +00:00
murf 726bcbdaa8 This hopefully will fix the re-opened 11233. Hadn't covered the case of a context with no patterns. (blush)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89257 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13 23:43:41 +00:00
murf 136bb5795b closes issue #11233 -- where some fine points in the algorithm to build the tree needed to be corrected. Many thanks for the test case, jtodd
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89256 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13 21:19:11 +00:00
tilghman 5f2ad1136a Merged revisions 89239 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89239 | tilghman | 2007-11-13 07:51:53 -0600 (Tue, 13 Nov 2007) | 4 lines

Debugging is running into the 16-lock limit.  Increase to avoid.
(This define is only effective when debugging is turned on, so there's
no effect for most installations.)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89240 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13 14:03:34 +00:00
qwell daf95de377 Doxygen fixes.
Also fix a common typo I kept seeing (arguement) in various files.

Closes issue #11222, patch by snuffy (with arguement > argument by me).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89202 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 23:44:20 +00:00
murf 52ab483cb5 Thanks to snuff-work, who brought up that these fixes might need to be made.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89196 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 20:49:27 +00:00
qwell 20836b39a7 Merged revisions 89194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89194 | qwell | 2007-11-12 14:46:52 -0600 (Mon, 12 Nov 2007) | 1 line

Fix a typo pointed out by De_Mon on #asterisk-dev
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89195 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 20:48:57 +00:00
murf 91879350be Based on a note in asterisk-dev by Brian Capouch, I determined I too agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 18:44:36 +00:00
tilghman cbb22ba26a Merged revisions 89184 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89184 | tilghman | 2007-11-12 11:29:17 -0600 (Mon, 12 Nov 2007) | 5 lines

Fix two cases of memory corruption caused by background threads.
Reported by: atis
Patch by: tilghman
Fixes issue #10923

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89185 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 17:44:04 +00:00
murf aef44ae684 This is the perhaps the biggest, boldest, most daring change I've ever committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
qwell ab163d8036 Merged revisions 89125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11203)
........
r89125 | qwell | 2007-11-08 17:52:35 -0600 (Thu, 08 Nov 2007) | 4 lines

Properly say the seconds here..

Issue 11203, fix described by vma.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89126 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 23:53:00 +00:00
mmichelson 02cd3d9528 AST_LIST_REMOVE_CURRENT takes only one argument.
Thanks to snuffy for pointing this out on IRC



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89122 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 21:31:06 +00:00
rizzo 7bc2521136 use %d and cast to int instead of %zd for size_t object,
this helps portability.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89109 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 09:20:05 +00:00
kpfleming 5dcb16ced9 Merged revisions 89105 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89105 | kpfleming | 2007-11-08 00:26:47 -0500 (Thu, 08 Nov 2007) | 2 lines

fix a glaring bug in the new SRV record handling that would cause incorrect weight sorting

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89107 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:36:28 +00:00
kpfleming a45a413db3 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
rizzo ea232993a0 remove a debugging message which i forgot in.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89083 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07 11:33:55 +00:00
russell 06d06cb846 Fix another CLI command so it doesn't run the real code when called for initialization.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89076 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07 00:16:03 +00:00
file f5b510445f Fix up some PBX logic that became broken. The code would exit prematurely when it should have been collecting more digits.
(closes issue #11175)
Reported by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89072 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 23:08:36 +00:00
tilghman 4b2fc9d3e7 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 22:51:48 +00:00
murf 561fc7b6a5 Merged revisions 89036 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89036 | murf | 2007-11-06 10:52:50 -0700 (Tue, 06 Nov 2007) | 1 line

closes issue #8786 - where the [catname](!) and [catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89062 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 21:08:38 +00:00
file cddff61a41 Remove native bridging check for DTMF based transfers. Thanks to the last batch of RTP changes it is no longer required for the media stream to go through Asterisk if DTMF is going over signalling. It will simply reinvite back as needed.
(closes issue #11172)
Reported by: ibc


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89057 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 20:55:58 +00:00
russell b8fd607d04 Fix the memory show allocations CLI command so that it doesn't spew out all
of the current memory allocations when you start Asterisk, when the command's
handler gets called for initialization.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89052 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:51:37 +00:00
murf f258e58444 Hoping to avoid a crash in OSX for a problem blitzrage found
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89051 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:40:33 +00:00
oej f063aa43f4 Formatting. Illegaly using some spare spaces from Russell's space-bucket.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89050 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:23:10 +00:00
oej beb1ba7813 Additional TDD changes (preparing for SIP changes - adding TDD support to SIP)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89048 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:10:26 +00:00
mmichelson 92ac6820ee "show application <foo>" changes for clarity.
(closes issue #11171, reported and patched by blitzrage)

Many thanks!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89044 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:04:45 +00:00
oej 15d67c4bef Merged revisions 89042 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89042 | oej | 2007-11-06 19:53:37 +0100 (Tis, 06 Nov 2007) | 2 lines

Bug fixes to tdd support in zaptel. 

........

(Small changes for trunk)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89043 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:04:29 +00:00
rizzo 38f484f179 Fix embedding of modules on FreeBSD:
the constructor for the list of modules was run
after the constructors for the embedded modules
(which appended entries to the list).
As a result, the list appeared empty when it was
time to use it.

On linux the order of execution of constructor
was evidently different (it may depend on the
ordering of modules in the ELF file).

This is only a workaround - there may be other
situations where the execution of constructors
causes problems, so if we manage to find a more
general solution this workaround can go away.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89031 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 17:05:13 +00:00
russell f36c90c199 Merged revisions 88805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88805 | russell | 2007-11-05 16:07:54 -0600 (Mon, 05 Nov 2007) | 12 lines

After seeing crashes related to channel variables, I went looking around at the
ways that channel variables are handled.  In general, they were not handled in
a thread-safe way.  The channel _must_ be locked when reading or writing from/to
the channel variable list.

What I have done to improve this situation is to make pbx_builtin_setvar_helper()
and friends lock the channel when doing their thing.  Asterisk API calls almost 
all lock the channel for you as necessary, but this family of functions did not.

(closes issue #10923, reported by atis)
(closes issue #11159, reported by 850t)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88934 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 14:08:54 +00:00
mmichelson b4fe14f9d0 Merged revisions 88826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88826 | mmichelson | 2007-11-05 17:29:29 -0600 (Mon, 05 Nov 2007) | 6 lines

Reworked deadlock avoidance in __ast_read. Restored audio to 
callback agents.

(closes issue #11071, reported by callguy, patched by me, tested by callguy and Ted Brown)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88827 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 23:31:00 +00:00
rizzo 9ed4fe37f7 Move the last instance of AST_LIBS to the only place it is used,
namely main/Makefile .

I am unclear where decisions on the build environment (CFLAGS,
LDFLAGS, LIBS and so on) should be made - right now they are
split here and there.

As a first step in cleaning up this situation, i am trying to at
least collect all instances of each variable in one place.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88767 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 21:27:04 +00:00
russell a7c35f1073 Merged revisions 88719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88719 | russell | 2007-11-05 14:40:01 -0600 (Mon, 05 Nov 2007) | 7 lines

Merge changes from asterisk/team/kpfleming/SRV-priority-handling

Previously, the SRV record support in Asterisk was broken.  There was no
guarantee on what record Asterisk would choose to actually use.  This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88740 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 20:44:05 +00:00
russell f2977f1903 Merged revisions 88709 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88709 | russell | 2007-11-05 14:11:04 -0600 (Mon, 05 Nov 2007) | 20 lines

Merge the last bit of changes from asterisk/team/russell/readq-1.4

The issue here is that the channel frame readq handling got broken when the
code was converted to use the linked list macros.  It caused corruption of the
list head and tail pointers.  So, I fixed up the usage of the linked list
macros and in passing, simplified the code.  I also documented what the code
is doing, as it was a bit difficult to figure out at first.

This bug showed itself with crashes showing messed up head/tail pointers for
the readq.  However, there are a couple of crashes that aren't quite as obvious,
but I think may be related.  So, if your bug gets closed by this commit, but
you still have a problem, please reopen or create a new bug report.

(closes issue #10936)
(closes issue #10595)
(closes issue #10368)
(closes issue #11084)
(closes issue #10040)
(closes issue #10840)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88710 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 20:14:48 +00:00
russell cc093e3faf Merged revisions 88624 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88624 | russell | 2007-11-05 11:46:02 -0600 (Mon, 05 Nov 2007) | 5 lines

Fix up datastore handling in ast_do_masquerade().  The code is intended to move
any channel datastores from the old channel to the new one.  However, it did
not use the linked list macros properly to accomplish the task.  The existing
code would only work if there was only a single datastore on the old channel.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88651 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 17:52:08 +00:00
rizzo bd07db1f95 remove a cygwin-specific function remap that does not work.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88525 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 15:15:22 +00:00
rizzo 5c6adf7951 Simplify the implementation and the API for stringfields;
details and examples are in include/asterisk/stringfields.h.

Not applicable to older branches except for 1.4 which will
receive a fix for the routines that free memory pools.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88454 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-04 19:44:31 +00:00
tilghman 69e206ffb4 Revert commit #86119. Some users intentionally do not want colorized terminals, so this was a misfeature.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88437 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-03 14:19:47 +00:00
jamesgolovich 661a6413fb Set CLI command to the correct name. Rev 85460 introduced two 'database show' commands when this one
should have been 'database showkey'



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88422 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-03 04:55:06 +00:00
russell 149e9c8fdc Show the channel unique ID in the "show channel concise" output
(closes issue #11148, requested by falves11, patched by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88370 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 21:25:55 +00:00
qwell 7e29240985 Merged revisions 88283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11147)
........
r88283 | qwell | 2007-11-02 11:51:08 -0500 (Fri, 02 Nov 2007) | 4 lines

We need to make sure to specify a language to ast_fileexists, otherwise it may fail for anything besides en

Issue 11147, fix discovered by both citats and myself (independently), with input from Corydon76

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88284 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 16:54:11 +00:00
tilghman bad99f6a2a Add pbx_lua as a method of doing extensions
Reported by: mnicholson
Patch by: mnicholson
Closes issue #11140


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88250 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 15:36:34 +00:00
tilghman 91e1d7a423 Don't re-cache the filename, but check to see if it already exists
Reported by: jamesgolovich
Patch by: jamesgolovich
Closes issue #11144


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88212 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 13:17:48 +00:00
tilghman 40e214cbcd 'h' extension doesn't execute past first priority
Reported by: dimas
Patch by: dimas
Closes bug #11146


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88209 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 12:54:31 +00:00
tilghman 82ba695b00 Modify WaitExten to include an optional dialtone
Closes issue #10783


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 23:26:35 +00:00
murf 47c8ea00b8 This commits the performance mods that give the priority processing engine in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 22:26:51 +00:00
tilghman 0ef4927a34 Conditionally free lock_info->thread_name to avoid a useless warning
Reported by: snuffy
Patch by: snuffy
Closes issue #11125


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88010 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 06:12:08 +00:00
file bba947151d Drop any more references to type in the Exception dialplan function.
(closes issue #11134)
Reported by: blitzrage
Patches:
      exception_patch.txt uploaded by blitzrage (license 10)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87953 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 00:04:43 +00:00
tilghman 0a1b86d19b Optimize pbx_substitute_variables
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87811 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31 15:46:41 +00:00
qwell 4cd58adb00 Update documentation to give an example of how to use the return status of RaiseException
Closes issue #11117, patch by blitzrage (yay blitzrage)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87626 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 18:28:55 +00:00
mmichelson d6bb8d4d0b The priority gets incremented after raising an exception, so the priority should be set to 0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87608 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 17:07:26 +00:00
mmichelson cae7b14e24 Jumped the gun a bit in the RaiseException app. It would always return -1
since it checked for the existence of something that will never exist.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87573 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 16:36:29 +00:00
qwell ca9768961f Merged revisions 87567 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11113)
........
r87567 | qwell | 2007-10-30 10:45:35 -0500 (Tue, 30 Oct 2007) | 4 lines

Fix build of editline on Solaris.

Issue 11113, patch by snuffy.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87568 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 15:47:19 +00:00
kpfleming 5aafb5a5e4 clean up assembler and preprocessor files if they are here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87467 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 22:24:44 +00:00
russell 525cd3a0d9 Merged revisions 87396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87396 | russell | 2007-10-29 15:22:07 -0500 (Mon, 29 Oct 2007) | 5 lines

Add some more details to the output of "core show locks".  When a thread
is waiting for a lock, this will now show the details about who currently
has it locked.
(inspired by issue #11100)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 20:24:47 +00:00
file c3322f662b Drop the RTCP Read too short message to debug. There are some phones out there that send a sort of keep alive packet in the RTCP that trigger this every 5 seconds.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87394 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 20:02:31 +00:00
russell 2e0817f0ef Merged revisions 87373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87373 | russell | 2007-10-29 14:21:06 -0500 (Mon, 29 Oct 2007) | 5 lines

Remove a lock that doesn't make any sense.  The regions lock needs to be held
when traversing the list of allocated chunks so that they can be printed out
to the CLI.
(Thanks to eliel on #asterisk-dev for pointing this out!)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 19:47:52 +00:00
file 96322a96fe Merged revisions 87294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87294 | file | 2007-10-29 11:23:49 -0300 (Mon, 29 Oct 2007) | 6 lines

Fix issue with ast_unescape_semicolon going into an endless loop.
(closes issue #10550)
Reported by: ramonpeek
Patches:
      unescape-85177-1.patch uploaded by IgorG (license 20)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87295 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 14:29:18 +00:00
tilghman 1c1252b9de Use the same delimited character as the FILTER function in FIELDQTY and CUT.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26 00:11:31 +00:00
kpfleming daac309efb Merged revisions 87069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87069 | kpfleming | 2007-10-25 18:03:11 -0500 (Thu, 25 Oct 2007) | 2 lines

appending one list to another should leave the first list empty, and not require the user to do that

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87070 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-25 23:11:28 +00:00
murf 73a9575e92 closes issue #11045 - each file needs to define ASTERISK_FILE_VERSION, if you are going to set MTX_PROFILE in the compiler flags; the problem was that the fixes were getting made to the generated .c file, and erased the next time someone regenerated that file from the corresponding .y or .flex file. Moral of story: keep your eyes open and make mods to the .y (or flex input file) and re-run bison (or flex) as the Makefile directs for that file, and then check in both. Also, res_config_sqlite was kinda missed, and has the same issue.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87024 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-25 16:21:30 +00:00
murf 2323883d4f Merged revisions 86880 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86880 | murf | 2007-10-23 14:20:54 -0600 (Tue, 23 Oct 2007) | 1 line

This should get rid of a really, really irritating warning generated by some 64-bit platforms from libc, where free(0) is frowned upon
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86901 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-23 21:06:15 +00:00
murf 4d0fc8b4d5 Merged revisions 86881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86881 | murf | 2007-10-23 14:22:25 -0600 (Tue, 23 Oct 2007) | 1 line

this update to Makefile corrects how ast_expr2f.c should be generated
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86900 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-23 20:44:58 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
tilghman 8451f11052 Merged revisions 86787 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86787 | tilghman | 2007-10-22 12:38:13 -0500 (Mon, 22 Oct 2007) | 2 lines

Minor FreeBSD build fix

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86790 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 17:40:29 +00:00
russell b5b82ad0b0 Merged revisions 86750 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86750 | russell | 2007-10-22 10:52:48 -0500 (Mon, 22 Oct 2007) | 8 lines

Don't leak a frame in the case that an END frame is received and the time since
the BEGIN is less than that of the defined minimum DTMF duration.

(closes issue #11051)
Reported by: casper
Patches:
      channel.c.86664.diff uploaded by casper (license 55)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86751 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 15:57:02 +00:00
kpfleming 461aebe81f merging patches that don't compile is bad... mmkay?
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86695 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 14:56:05 +00:00
file eb210541d3 Merged revisions 86663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86663 | file | 2007-10-22 11:27:03 -0300 (Mon, 22 Oct 2007) | 6 lines

Move log message to before the frame it references is freed.
(closes issue #11050)
Reported by: slavon
Patches:
      channel.c.86662.diff uploaded by casper (license 55)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86664 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 14:28:07 +00:00
file f22fed5270 Merged revisions 86630 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86630 | file | 2007-10-22 10:33:23 -0300 (Mon, 22 Oct 2007) | 6 lines

Fixes for building under OpenSolaris.
(closes issue #11047)
Reported by: snuffy
Patches:
      11047-fixes.diff uploaded by snuffy (license 35)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86631 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 13:36:13 +00:00
russell 9cac9bf42a Merged revisions 85532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines

Properly handle the case where read() may return the text for more than one
CLI command at once for a remote console.

(closes issue #10888)
Reported by: jamesgolovich
Patches: 
      asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-21 22:52:20 +00:00