asterisk/asterisk.git
11 years agoMerged revisions 89559 via svnmerge from
Tilghman Lesher [Sun, 25 Nov 2007 17:50:07 +0000 (17:50 +0000)]
Merged revisions 89559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89559 | tilghman | 2007-11-25 11:17:10 -0600 (Sun, 25 Nov 2007) | 14 lines

We previously attempted to use the ESCAPE clause to set the escape delimiter to
a backslash.  Unfortunately, this does not universally work on all databases,
since on databases which natively use the backslash as a delimiter, the
backslash itself needs to be delimited, but on other databases that have no
delimiter, backslashing the backslash causes an error.

So the only solution that I can come up with is to create an option in res_odbc
that explicitly specifies whether or not backslash is a native delimiter.  If
it is, we use it natively; if not, we use the ESCAPE clause to make it one.

Reported by: elguero
Patch by: tilghman
(Closes issue #11364)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89561 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoTypo (someone needs to test compile before committing his changes)
Tilghman Lesher [Sun, 25 Nov 2007 17:44:16 +0000 (17:44 +0000)]
Typo (someone needs to test compile before committing his changes)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMore doxygen changes
Olle Johansson [Sun, 25 Nov 2007 12:18:35 +0000 (12:18 +0000)]
More doxygen changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89557 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoHousekeeping
Olle Johansson [Sun, 25 Nov 2007 12:12:00 +0000 (12:12 +0000)]
Housekeeping

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89556 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFormatting, doxygen updates
Olle Johansson [Sun, 25 Nov 2007 12:06:57 +0000 (12:06 +0000)]
Formatting, doxygen updates

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89555 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago- Deprecate "call-limit" in chan_sip. No other channel driver enforces call-limits
Olle Johansson [Sun, 25 Nov 2007 11:46:17 +0000 (11:46 +0000)]
- Deprecate "call-limit" in chan_sip. No other channel driver enforces call-limits
  and we now have the groupcount system to implement call-limits in the dialplan. You
  can use the "setvar" option in realtime/sip.conf to set limits per device.

- Implement "callcounter" as a new option to enable the call counting we need to
  report device status to queue, manager and SIP subscriptions.

The call counter setting is now enabled in the code by setting the device call-limit
to 999. When we remove the call limit, we can simply enable this with a boolean
setting.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoHousekeeping...
Olle Johansson [Sun, 25 Nov 2007 11:10:52 +0000 (11:10 +0000)]
Housekeeping...
- Fix typo in chan_sip
- Remove changes to caller ID structure, moving it to branch (russellb)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocloses issue #11363; where the pattern _20x. buried in an included context, didn...
Steve Murphy [Sat, 24 Nov 2007 21:00:26 +0000 (21:00 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89547 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89545 via svnmerge from
Tilghman Lesher [Sat, 24 Nov 2007 17:07:12 +0000 (17:07 +0000)]
Merged revisions 89545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89545 | tilghman | 2007-11-24 10:59:59 -0600 (Sat, 24 Nov 2007) | 5 lines

Free some frames that would otherwise leak on error.
Reported by: Laureano
Patch by: Laureano,tilghman
(Closes issue #11351)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89546 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdded <sys/file.h> include to allow trunk to compile. Hope this doesn't louse thing up.
Steve Murphy [Sat, 24 Nov 2007 16:53:24 +0000 (16:53 +0000)]
Added <sys/file.h> include to allow trunk to compile. Hope this doesn't louse thing up.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89544 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove a DEBUG_THREADS message that accesses private lock fields.
Luigi Rizzo [Sat, 24 Nov 2007 13:57:46 +0000 (13:57 +0000)]
remove a DEBUG_THREADS message that accesses private lock fields.
If needed, the code to extract this information should be implemented
in some generic header or library and the function called here.

(closed bug #11362)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89543 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove some unnecessary includes
Luigi Rizzo [Sat, 24 Nov 2007 13:48:48 +0000 (13:48 +0000)]
remove some unnecessary includes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89542 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89540 via svnmerge from
Tilghman Lesher [Sat, 24 Nov 2007 06:24:46 +0000 (06:24 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89541 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89536 via svnmerge from
Tilghman Lesher [Fri, 23 Nov 2007 17:56:56 +0000 (17:56 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89537 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89534 via svnmerge from
Tilghman Lesher [Fri, 23 Nov 2007 17:09:06 +0000 (17:09 +0000)]
Merged revisions 89534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89534 | tilghman | 2007-11-23 11:05:10 -0600 (Fri, 23 Nov 2007) | 5 lines

Use ESCAPE clause for the first parameter, not just 2nd-Nth parameters.
Reported by: apsaras
Patch by: tilghman
(Closes issue #11353)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89535 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoput in the necessary hooks for video support in the console.
Luigi Rizzo [Fri, 23 Nov 2007 15:54:13 +0000 (15:54 +0000)]
put in the necessary hooks for video support in the console.

This is a NOP as far as the current code is concerned,
but there is already support in ./configure and the
Makefiles for the various libraries used by console_video.c
(not yet in the tree) so addition is trivial.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89533 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoset rtpmap video info according to what is read from SDP;
Luigi Rizzo [Fri, 23 Nov 2007 15:49:40 +0000 (15:49 +0000)]
set rtpmap video info according to what is read from SDP;

make the format explicit in a debug message;

print the audio instead of aggregated peer capability in a debugging msg.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89532 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoLet's start with implementing the base architecture for UTF8 caller ID's
Olle Johansson [Fri, 23 Nov 2007 09:40:02 +0000 (09:40 +0000)]
Let's start with implementing the base architecture for UTF8 caller ID's
so we can handle multiple formats properly. This is not carved in stone,
but a proposal to start with.

We need to add support for transliterations as well as UTF8 handling,
propably with libiconv. Murf is looking into that for the dialplan.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89531 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoformatting cleanup on the header,
Luigi Rizzo [Fri, 23 Nov 2007 09:03:33 +0000 (09:03 +0000)]
formatting cleanup on the header,
normalization of the assignment of descriptor fields.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89530 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89527 via svnmerge from
Russell Bryant [Fri, 23 Nov 2007 02:37:38 +0000 (02:37 +0000)]
Merged revisions 89527 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89527 | russell | 2007-11-22 12:29:41 -0500 (Thu, 22 Nov 2007) | 3 lines

mvanbaak pointed out a spelling error in this sample configuration file.  While
I was at it, I went ahead and tweaked it a little bit more.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agonew info on the management of headers
Luigi Rizzo [Thu, 22 Nov 2007 07:10:37 +0000 (07:10 +0000)]
new info on the management of headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89526 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomore header removal
Luigi Rizzo [Thu, 22 Nov 2007 04:37:08 +0000 (04:37 +0000)]
more header removal

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89524 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoformatting cleanup
Luigi Rizzo [Thu, 22 Nov 2007 04:19:04 +0000 (04:19 +0000)]
formatting cleanup

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89523 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoshuffle a little bit the content of header files to reduce dependencies.
Luigi Rizzo [Thu, 22 Nov 2007 03:50:04 +0000 (03:50 +0000)]
shuffle a little bit the content of header files to reduce dependencies.
In this commit:
- move the ast_register/unregister_app functions to module.h
  to avoid the need to include pbx.h for the simpler apps;
- move the ast_group structure to channel.h to remove the
  dependency of app.h on linkedlists.h

Note, this is a long process that I am doing in small steps.

The main difficulty is that now for each subsystem we
have a single header (e.g. channel.h) included by the subsystem
provider (usually one file, e.g. channel.c) and by its clients
(dozens of them, e.g. we have some 70+ apps and 30+ functions).

This requires the clients to include all the extra headers
required by the provider (eg. lock.h, linkedlists.h, definitions
of substructures...) even though many of the clients would be
just happy with opaque struct declarations and function prototypes.

The long term plan is to eventually rectify this structure
so that the compilation can become faster, and also APIs
are more stable.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove some useless includes
Luigi Rizzo [Thu, 22 Nov 2007 02:30:58 +0000 (02:30 +0000)]
remove some useless includes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89521 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomore removal of redundant headers
Luigi Rizzo [Thu, 22 Nov 2007 02:07:33 +0000 (02:07 +0000)]
more removal of redundant headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89519 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove redundant headers
Luigi Rizzo [Thu, 22 Nov 2007 01:39:06 +0000 (01:39 +0000)]
remove redundant headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89518 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomore removal of fcntl.h and other system headers
Luigi Rizzo [Thu, 22 Nov 2007 01:13:46 +0000 (01:13 +0000)]
more removal of fcntl.h and other system headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89517 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove a number of #include <fcntl.h> which are either
Luigi Rizzo [Thu, 22 Nov 2007 01:03:02 +0000 (01:03 +0000)]
remove a number of #include <fcntl.h> which are either
useless or done elsewhere

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89516 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoimplement the split of file.h and mod_format.h
Luigi Rizzo [Thu, 22 Nov 2007 00:53:49 +0000 (00:53 +0000)]
implement the split of file.h and mod_format.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89515 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd a specific header for providers of file and format handling routines,
Luigi Rizzo [Thu, 22 Nov 2007 00:53:13 +0000 (00:53 +0000)]
Add a specific header for providers of file and format handling routines,
moving here structs and function declarations formerly in file.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89514 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocloses issue #11285, where an unload of a module that creates a dialplan context...
Steve Murphy [Wed, 21 Nov 2007 23:54:12 +0000 (23:54 +0000)]
closes issue #11285, where an unload of a module that creates a dialplan context, causes a crash when you do a 'dialplan show' of that context. This is because the registrar string is defined in the module, and the stale pointer is traversed. The reporter offered a patch that would always strdup the registrar string, which is practical, but I preferred to destroy the created contexts in each module where one is created. That seemed more symmetric. There were only 6 place in asterisk where this is done: chan_sip, chan_iax2, chan_skinny, res_features, app_dial, and app_queue. The two apps destroyed the context, but left the contexts. All is fixed now and unloads should be dialplan friendly.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89513 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove another set of redundant #include "asterisk/options.h"
Luigi Rizzo [Wed, 21 Nov 2007 23:24:55 +0000 (23:24 +0000)]
remove another set of redundant #include "asterisk/options.h"

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove a bunch of useless #include "options.h"
Luigi Rizzo [Wed, 21 Nov 2007 23:09:02 +0000 (23:09 +0000)]
remove a bunch of useless #include "options.h"

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove unneccessary explicit case for BRI
Matthew Fredrickson [Wed, 21 Nov 2007 22:37:25 +0000 (22:37 +0000)]
Remove unneccessary explicit case for BRI

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoTake some debug code out :-)
Matthew Fredrickson [Wed, 21 Nov 2007 22:34:45 +0000 (22:34 +0000)]
Take some debug code out :-)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89509 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoadd a missing return
Luigi Rizzo [Wed, 21 Nov 2007 22:20:36 +0000 (22:20 +0000)]
add a missing return

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd BRI support to chan_zap
Matthew Fredrickson [Wed, 21 Nov 2007 22:07:55 +0000 (22:07 +0000)]
Add BRI support to chan_zap

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoenable support for stack backtrace for stuff built in utils/
Luigi Rizzo [Wed, 21 Nov 2007 21:30:24 +0000 (21:30 +0000)]
enable support for stack backtrace for stuff built in utils/
(this was present in the main tree but forgotten here).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89506 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocloses issue #11290; the proposed patch was a good guess, and would solve the bug...
Steve Murphy [Wed, 21 Nov 2007 20:38:00 +0000 (20:38 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89505 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoSimplify comparison in parking fix
Terry Wilson [Wed, 21 Nov 2007 20:22:40 +0000 (20:22 +0000)]
Simplify comparison in parking fix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89504 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89495 via svnmerge from
Mark Michelson [Wed, 21 Nov 2007 19:28:43 +0000 (19:28 +0000)]
Merged revisions 89495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89495 | mmichelson | 2007-11-21 13:27:51 -0600 (Wed, 21 Nov 2007) | 3 lines

Fix a small error I made in my previous commit

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89496 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89493 via svnmerge from
Mark Michelson [Wed, 21 Nov 2007 19:27:22 +0000 (19:27 +0000)]
Merged revisions 89493 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89493 | mmichelson | 2007-11-21 13:24:22 -0600 (Wed, 21 Nov 2007) | 5 lines

Changing an inaccurate debug message to be less inaccurate. Under the circumstances, this
message would always report that there were 0 members available, even though that may not be true.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89494 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 89491 via svnmerge from
Terry Wilson [Wed, 21 Nov 2007 19:20:33 +0000 (19:20 +0000)]
Merged revisions 89491 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89491 | twilson | 2007-11-21 12:59:27 -0600 (Wed, 21 Nov 2007) | 4 lines

If a channel gets masqueraded in the middle of a park, don't play the
announcement to the masqueraded channel, and dial back to the original
channel on timeout.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89492 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove obsolete OLD_DSP_ROUTINES code. Also, remove the FAX_DETECT define and
Russell Bryant [Wed, 21 Nov 2007 18:52:19 +0000 (18:52 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89490 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoChange Read to set READSTATUS as an indication of the result
Tilghman Lesher [Wed, 21 Nov 2007 18:38:18 +0000 (18:38 +0000)]
Change Read to set READSTATUS as an indication of the result
Also, some cleanup to CHANGES.
Reported by: michael-fig
Patch by: michael-fig,tilghman
(Closes issue #11004)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89489 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agofix a small gramatical error in a comment
Russell Bryant [Wed, 21 Nov 2007 18:24:23 +0000 (18:24 +0000)]
fix a small gramatical error in a comment

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoThere existed about a 1 in 4 billion chance that reading from /dev/urandom
Mark Michelson [Wed, 21 Nov 2007 18:19:22 +0000 (18:19 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89487 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix some code that was supposed to ensure that a buffer was terminated, but was
Russell Bryant [Wed, 21 Nov 2007 16:24:17 +0000 (16:24 +0000)]
Fix some code that was supposed to ensure that a buffer was terminated, but was
writing to the wrong byte.  Also, remove some non-thread safe test code.

(closes issue #11317)
Reported by: IgorG
Patches:
      unistim-2.patch uploaded by IgorG (license 20)
  - additional changes by me

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89484 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoI introduced a deadlock avoidance into 1.4, which I attempted to port to trunk as...
Mark Michelson [Wed, 21 Nov 2007 16:08:12 +0000 (16:08 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89483 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomove these forward declarations back to asterisk.h where they belong... even though...
Kevin P. Fleming [Wed, 21 Nov 2007 16:07:11 +0000 (16:07 +0000)]
move these forward declarations back to asterisk.h where they belong... even though asterisk.h includes compat.h, these declarations have nothing to do with the being platform-compatible and are directly related to being part of Asterisk

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89482 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoget this to actually compile...
Kevin P. Fleming [Wed, 21 Nov 2007 15:45:56 +0000 (15:45 +0000)]
get this to actually compile...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89481 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove some debugging code that doesn't compile on 64-bit platforms
Kevin P. Fleming [Wed, 21 Nov 2007 15:29:39 +0000 (15:29 +0000)]
remove some debugging code that doesn't compile on 64-bit platforms

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89480 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoOOOps! All the debug stuff I inserted was accidentally committed. I hereby revert it.
Steve Murphy [Wed, 21 Nov 2007 15:17:12 +0000 (15:17 +0000)]
OOOps! All the debug stuff I inserted was accidentally committed. I hereby revert it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocloses issue #11265; Thanks to snuffy for his work on neatening up the code and remov...
Steve Murphy [Wed, 21 Nov 2007 15:11:43 +0000 (15:11 +0000)]
closes issue #11265; Thanks to snuffy for his work on neatening up the code and removing duplicated code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89478 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove this file, it is not used anywhere.
Luigi Rizzo [Wed, 21 Nov 2007 08:28:27 +0000 (08:28 +0000)]
remove this file, it is not used anywhere.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoadd missing paths.h
Luigi Rizzo [Wed, 21 Nov 2007 01:35:30 +0000 (01:35 +0000)]
add missing paths.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89476 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoadd check for video4linux
Luigi Rizzo [Wed, 21 Nov 2007 01:29:45 +0000 (01:29 +0000)]
add check for video4linux

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89475 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoA free in add_pri was ultimately the source of the grief we were having with parking...
Steve Murphy [Wed, 21 Nov 2007 01:09:47 +0000 (01:09 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomore header removal/normalization
Luigi Rizzo [Wed, 21 Nov 2007 00:23:49 +0000 (00:23 +0000)]
more header removal/normalization

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89473 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoX11 checks (at least some - for other platforms with
Luigi Rizzo [Wed, 21 Nov 2007 00:22:41 +0000 (00:22 +0000)]
X11 checks (at least some - for other platforms with
unusual X11 locations you might need to add more directories)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89472 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerge changes from team/russell/sla_trunk_moh ...
Russell Bryant [Wed, 21 Nov 2007 00:21:38 +0000 (00:21 +0000)]
Merge changes from team/russell/sla_trunk_moh ...

* Added the ability to specify the music on hold class used to play into the
   conference when there is only one member and the M option is used.
* Added the ability to specify a music on hold class to play instead of ringing
   for the SLATrunk application.

(patched by me, and tested internally)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agocomplete support for X11
Luigi Rizzo [Wed, 21 Nov 2007 00:20:08 +0000 (00:20 +0000)]
complete support for X11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89469 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake trunk build again
Tilghman Lesher [Tue, 20 Nov 2007 23:29:33 +0000 (23:29 +0000)]
Make trunk build again

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89468 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd support for new recorded character sounds
Tilghman Lesher [Tue, 20 Nov 2007 23:28:57 +0000 (23:28 +0000)]
Add support for new recorded character sounds
Closes issue #5208

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89467 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove asterisk/paths.h outside asterisk.h and into those files
Luigi Rizzo [Tue, 20 Nov 2007 23:16:15 +0000 (23:16 +0000)]
move asterisk/paths.h outside asterisk.h and into those files
who really need it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove internal function declarations to include/asterisk/_private.h
Luigi Rizzo [Tue, 20 Nov 2007 22:18:21 +0000 (22:18 +0000)]
move internal function declarations to include/asterisk/_private.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoi got a little carried away with commas ...
Russell Bryant [Tue, 20 Nov 2007 19:29:08 +0000 (19:29 +0000)]
i got a little carried away with commas ...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89464 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoswitch compile-time option checking to string storage mode in this branch too
Kevin P. Fleming [Tue, 20 Nov 2007 19:28:10 +0000 (19:28 +0000)]
switch compile-time option checking to string storage mode in this branch too

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89463 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agofix the zaptel configure script check
Russell Bryant [Tue, 20 Nov 2007 19:11:18 +0000 (19:11 +0000)]
fix the zaptel configure script check

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89460 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agothe 'version' is now $7 not $6
Luigi Rizzo [Tue, 20 Nov 2007 18:20:25 +0000 (18:20 +0000)]
the 'version' is now $7 not $6
(wait a bit before regenerating configure, i have more changes)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89459 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 89457 via svnmerge from
Mark Michelson [Tue, 20 Nov 2007 17:59:00 +0000 (17:59 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89458 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoprepare to support console_video
Luigi Rizzo [Tue, 20 Nov 2007 17:11:12 +0000 (17:11 +0000)]
prepare to support console_video

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89455 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix building of modules under cygwin.
Luigi Rizzo [Tue, 20 Nov 2007 16:12:10 +0000 (16:12 +0000)]
Fix building of modules under cygwin.

After this commit we can actually load modules under windows,
and we can start debugging more interesting problems related
to the load order and functionality of modules.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89454 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChanged occurrences of "busy-level" to "busylevel" in sip.conf.sample
Mark Michelson [Tue, 20 Nov 2007 16:11:19 +0000 (16:11 +0000)]
Changed occurrences of "busy-level" to "busylevel" in sip.conf.sample
in light of commit 89441. Thanks to pj for pointing out the need for this

(closes issue #11307, reported by pj)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89453 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoadd an argument for extra headers to AC_EXT_LIB_CHECK,
Luigi Rizzo [Tue, 20 Nov 2007 15:39:00 +0000 (15:39 +0000)]
add an argument for extra headers to AC_EXT_LIB_CHECK,
and on passing simplify the code.
Too bad that every time we need to regenerate configure...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89452 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 89450 via svnmerge from
Steve Murphy [Tue, 20 Nov 2007 15:30:48 +0000 (15:30 +0000)]
Merged revisions 89450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89450 | murf | 2007-11-20 08:22:08 -0700 (Tue, 20 Nov 2007) | 1 line

closes issue #11324; break statements missing in switch cases.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89451 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMinor documentation tweak and if an incorrect parameter is given to core show transla...
Joshua Colp [Tue, 20 Nov 2007 15:00:41 +0000 (15:00 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agocomment a bit the code in acinclude.m4
Luigi Rizzo [Tue, 20 Nov 2007 14:54:52 +0000 (14:54 +0000)]
comment a bit the code in acinclude.m4
There is still a lot of code to clean up there, but hopefully
this should clarify what goes on in there.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89448 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoInclude the compatibility header file in ast_h323.cxx for compatibility reasons.
Joshua Colp [Tue, 20 Nov 2007 14:49:32 +0000 (14:49 +0000)]
Include the compatibility header file in ast_h323.cxx for compatibility reasons.
(closes issue #11311)
Reported by: falves11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89447 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix sip show history.
Olle Johansson [Tue, 20 Nov 2007 14:44:26 +0000 (14:44 +0000)]
Fix sip show history.

Closes issue #11312

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChange terminology a bit for CLI commands handling SIP channels/calls/dialogs/whatever.
Olle Johansson [Tue, 20 Nov 2007 08:36:32 +0000 (08:36 +0000)]
Change terminology a bit for CLI commands handling SIP channels/calls/dialogs/whatever.

Closes issue #11312

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89444 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoinitial makefile changes to build loadable modules under cygwin
Luigi Rizzo [Tue, 20 Nov 2007 07:42:38 +0000 (07:42 +0000)]
initial makefile changes to build loadable modules under cygwin
(not complete yet - still need to sort out dependecies on res_*)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89443 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoGet rid of some debug messages in pbx.c
Steve Murphy [Tue, 20 Nov 2007 00:17:15 +0000 (00:17 +0000)]
Get rid of some debug messages in pbx.c

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChanged the "busy-level" option in sip.conf to "busylevel" to be more parallel
Mark Michelson [Mon, 19 Nov 2007 23:24:35 +0000 (23:24 +0000)]
Changed the "busy-level" option in sip.conf to "busylevel" to be more parallel
with the SIPPEER() argument of the same name. The deprecation procedure is not
being used here since this is a trunk-only option.

(closes issue #11307, reported by pj, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89441 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoBe a bit more pedantic about the type for holding the md5 sum for the build options.
Russell Bryant [Mon, 19 Nov 2007 23:03:37 +0000 (23:03 +0000)]
Be a bit more pedantic about the type for holding the md5 sum for the build options.
Also, doxygenify the comment.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89440 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake the SYSINFO documentation reflect which options were compiled in
Russell Bryant [Mon, 19 Nov 2007 23:03:02 +0000 (23:03 +0000)]
Make the SYSINFO documentation reflect which options were compiled in

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoThese changes were made in response to niklas@tese.se's letter of 11-17-2007, where...
Steve Murphy [Mon, 19 Nov 2007 22:55:38 +0000 (22:55 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89438 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoanother few errno.h removals
Luigi Rizzo [Mon, 19 Nov 2007 21:18:14 +0000 (21:18 +0000)]
another few errno.h removals

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89433 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomore errno.h removal
Luigi Rizzo [Mon, 19 Nov 2007 21:12:08 +0000 (21:12 +0000)]
more errno.h removal

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89432 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoremove unnecessary headers
Luigi Rizzo [Mon, 19 Nov 2007 21:04:04 +0000 (21:04 +0000)]
remove unnecessary headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89431 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoremove some unnecessary includes.
Luigi Rizzo [Mon, 19 Nov 2007 20:42:06 +0000 (20:42 +0000)]
remove some unnecessary includes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChange delimiter of SIPPEER to be comma (instead of pipe) and further deprecate the...
Tilghman Lesher [Mon, 19 Nov 2007 20:13:40 +0000 (20:13 +0000)]
Change delimiter of SIPPEER to be comma (instead of pipe) and further deprecate the old ':' delimiter
Reported by: pj
Patch by: tilghman
Closes issue #11305

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89429 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoremove some useless includes from codecs
Luigi Rizzo [Mon, 19 Nov 2007 19:51:55 +0000 (19:51 +0000)]
remove some useless includes from codecs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89428 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoformat handlers don't need network, lock, channel and scheduler headers
Luigi Rizzo [Mon, 19 Nov 2007 19:41:16 +0000 (19:41 +0000)]
format handlers don't need network, lock, channel and scheduler headers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89427 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove the declaration of struct ast_channel ast_frame and ast_module
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89426 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoanother bunch of include removals (errno.h and asterisk/logger.h)
Luigi Rizzo [Mon, 19 Nov 2007 19:09:03 +0000 (19:09 +0000)]
another bunch of include removals (errno.h and asterisk/logger.h)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoinclude "logger.h" and errno.h from asterisk.h - usage shows that they
Luigi Rizzo [Mon, 19 Nov 2007 18:52:04 +0000 (18:52 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoa correction to code involved in an extension removal
Steve Murphy [Mon, 19 Nov 2007 17:18:26 +0000 (17:18 +0000)]
a correction to code involved in an extension removal

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89422 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdding SYSINFO() dialplan function for retrieval of system information
Mark Michelson [Mon, 19 Nov 2007 16:29:07 +0000 (16:29 +0000)]
Adding SYSINFO() dialplan function for retrieval of system information

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89421 65c4cc65-6c06-0410-ace0-fbb531ad65f3