Commit Graph

866 Commits

Author SHA1 Message Date
Andrew Latham b106b77041 Title update
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 21:56:13 +00:00
Richard Mudgett ab548bb0ce Fix deletion of unopenable spool files.
If scan_service() cannot open the spool file, it logs a message saying
that it will delete the file and calls remove_from_queue() to do it.
However, remove_from_queue() fails to delete the spool file because struct
outgoing has not yet been fully initialized.

* Merged allocating a new struct outgoing and init_outgoing() into
new_outgoing().  Allocation is initialization.

* Made apply_outgoing() not initialize the spool filename in struct
outgoing.

* Made apply_outgoing() call ast_trim_blanks() and ast_skip_blanks()
rather than manually inlining them.

* Reduced indentation levels in apply_outgoing().

* Fixed a garbled comment in remove_from_queue().

* Reworked scan_service() to simplify it.

(closes issue ASTERISK-17231)
Reported by: David Chappell
Patches:
      spool_open_failure.diff (license #4997) patch uploaded by David Chappell
      Started with this patch.
........

Merged revisions 374686 from http://svn.asterisk.org/svn/asterisk/branches/1.8

* Fixed some memory leaks on off nominal paths in init_outgoing() when
merging into the new_outgoing() function dealing with o->capabilities.
........

Merged revisions 374695 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374708 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 21:24:11 +00:00
Matthew Jordan 34d3cbc7ac Fix DUNDi message routing bug when neighboring peer is unreachable
Consider a scenario where DUNDi peer PBX1 has two peers that are its neighbors,
PBX2 and PBX3, and where PBX2 and PBX3 are also neighbors.  If the connection
is temporarily broken between PBX1 and PBX3, PBX1 should not include PBX3 in
the list of peers it sends to PBX2 in a DPDISCOVER message, as it cannot send
messages to PBX3.  If it does, PBX2 will assume that PBX3 already received the
message and fail to forward the message on to PBX3 itself.  This patch fixes
this by only including peers in a DPDISCOVER message that are reachable by the
sending node.  This includes all peers with an empty address
(00:00:00:00:00:00) and that are have been reached by a qualify message.

This patch also prevents attempting to qualify a dynamic peer with an empty
address until that peer registers.

The patch uploaded by Peter was modified slightly for this commit.

(closes issue ASTERISK-19309)
Reported by: Peter Racz
patches:
  dundi_routing.patch uploaded by Peter Racz (license 6290)

........

Merged revisions 372417 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372418 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 372419 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 02:52:37 +00:00
Matthew Jordan 8018b879a2 Clean up doxygen warnings
This patch fixes numerous doxygen warnings across Asterisk.  It also updates
the makefile to regenerate the doxygen configuration on the local system
before running doxygen to help prevent warnings/errors on the local system.

Much thanks to Andrew for tackling one of the Asterisk janitor projects!

(issue ASTERISK-20259)
Reported by: Andrew Latham
Patches:
  doxygen_partial.diff uploaded by Andrew Latham (license 5985)
  make_progdocs.diff uploaded by Andrew Latham (license 5985)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 14:23:28 +00:00
Mark Michelson 6a539ace84 Fix misuses of asprintf throughout the code.
This fixes three main issues

* Change asprintf() uses to ast_asprintf() so that it
pairs properly with ast_free() and no longer causes
MALLOC_DEBUG to freak out.

* When ast_asprintf() fails, set the pointer NULL if
it will be referenced later.

* Fix some memory leaks that were spotted while taking
care of the first two points.

(Closes issue ASTERISK-20135)
reported by Richard Mudgett

Review: https://reviewboard.asterisk.org/r/2071
........

Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371592 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-21 21:01:11 +00:00
Jonathan Rose 1067294065 DUNDi: Add CLI commands DUNDi show cache and DUNDi show hints
(closes issue ASTERISK-18390)
Reported by: Peter Racz
Patches:
	dundi_cli_cache.patch.v2 uploaded by Peter Racz (license #6290)
	ASTERISK-18390_dundi_cli_cache_jrose_mods_v2.diff uploaded by Jonathan Rose (license #6182)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09 14:36:37 +00:00
Mark Michelson eb9e645a27 Allow support for early media on AMI originates and call files.
This is based on the work done by Olle Johansson on review board.

The idea is that the channel specified in an AMI originate or call
file is typically not connected to the outgoing extension until the
channel has been answered. With this change, an EarlyMedia header can
be specified for AMI originates and an early_media option can
be specified in call files. With this option set, once early media is
received on a channel, it will be connected with the outgoing extension.

(closes issue ASTERISK-18644)
Reported by Olle Johansson

Review: https://reviewboard.asterisk.org/r/1472



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08 22:39:40 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Mark Michelson 6c23a60f80 Add "dialplan remove context" and modify "dialplan add include"
From corruptor's review board posting:

"I've noticed that we can remove particular extension from context with
dialplan remove extension command but in order to remove all extensions
in the context we should delete them on by one. I've created dialplan
remove context command which uses ast_context_destroy to destroy the
whole context with all extensions. I've created to functions for in
pbx_config.c: handle_cli_dialplan_remove_context which actually removes
context and complete_dialplan_remove_context which completes input.
They are based on other similar functions and pretty trivial but I can be
mistaken somewhere.

"I've also modified dialplan add include <context2> into <context1>. I've
made it similar dialplan add extension ... command. It creates <context1>
if it doesn't exist and I've also modified complete_dialplan_add_include
and removed check for existance of <context2> because we can include
non-existent context into another one. (I usually include empty
(non-existent) contexts in advance). Should we raise warning in this case
as it's raised while reading extensions.conf?

"I use those functions with AMI. I think manager commands should be created
in addition to those CLI commands."

I've addressed the latest comments on review board and have made some other
coding guidelines-related cleanup. I also have modified the CHANGES file to
mention these new commands.

(closes issue ASTERISK-19292)
reported by Andrey Solovyev

Patches:
	dialplan_add_include.patch
    uploaded by Andrey Solovyev (license #5214)
    dialplan_remove_context.patch
    uploaded by Andrey Solovyev (license #5214)

Review: https://reviewboard.asterisk.org/r/2042



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 19:57:21 +00:00
Kevin P. Fleming 166b4e2b30 Multiple revisions 369001-369002
........
  r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
  
  Add support-level indications to many more source files.
  
  Since we now have tools that scan through the source tree looking for files
  with specific support levels, we need to ensure that every file that is
  a component of a 'core' or 'extended' module (or the main Asterisk binary)
  is explicitly marked with its support level. This patch adds support-level
  indications to many more source files in tree, but avoids adding them to
  third-party libraries that are included in the tree and to source files
  that don't end up involved in Asterisk itself.
........
  r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
  
  Add a script to enable finding source files without support-levels defined.
........

Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15 16:20:16 +00:00
Kinsey Moore c6142cf2cc Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.

(issue ASTERISK-19672)
........

Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11 15:23:30 +00:00
Richard Mudgett dd2427c141 Coverity Report: Fix issues for error type REVERSE_INULL (core modules)
* Fixes findings: 0-2,5,7-15,24-26,28-31

(issue ASTERISK-19648)
Reported by: Matt Jordan
........

Merged revisions 368039 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368042 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-31 18:39:30 +00:00
Mark Michelson 767c26b926 Fix two more coverity constant expression result findings.
These correspond to findings 0 and 1 in the core findings of
ASTERISK-19649.

After contacting Mark Spencer, he was unsure of what the intent
behind these lines of code were, so they are being axed.

For Asterisk 1.8 and 10, the output of debugging DUNDi frames
will not be changed, but for trunk the "Retry" portion will
be omitted since it does not properly distinguish retransmissions
from initial frames.

(closes issue ASTERISK-19649)
Reported by Matthew Jordan
........

Merged revisions 366409 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366412 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14 20:15:33 +00:00
Kinsey Moore dd81b047db Resolve FORWARD_NULL static analysis warnings
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20,
22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111,
and 115. Finding numbers 26, 33, and 29 were already resolved.  Those skipped
were either extended/deprecated or in areas of code that shouldn't be
disturbed.

(Closes issue ASTERISK-19650)
........

Merged revisions 366167 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366168 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 20:56:09 +00:00
Kinsey Moore 781f4657b9 Fix many issues from the NULL_RETURNS Coverity report
Most of the changes here are trivial NULL checks.  There are a couple
optimizations to remove the need to check for NULL and outboundproxy parsing
in chan_sip.c was rewritten to avoid use of strtok.  Additionally, a bug was
found and fixed with the parsing of outboundproxy when "outboundproxy=," was
set.

(Closes issue ASTERISK-19654)
........

Merged revisions 365398 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 365399 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04 22:17:38 +00:00
Richard Mudgett a35c7ba8e7 Add option to invoke the extensions.conf stdexten using the legacy macro method.
ASTERISK-18809 eliminated the legacy macro invocation of the stdexten in
favor of the Gosub method without a means of backwards compatibility.

(issue ASTERISK-18809)
(closes issue ASTERISK-19457)
Reported by: Matt Jordan
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1855/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-12 16:29:52 +00:00
Jonathan Rose e96a59acfd Replace GNU old-style field designator extensions to fix clang warnings
(issue ASTERISK-19540)
Reported by: Makoto Dei
Patches:
	clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)
........
Also add from the patch the portion in res_fax_spandsp that didn't apply to 1.8

Merged revisions 361142 from http://svn.asterisk.org/svn/asterisk/branches/1.8
(closes issue ASTERISK-19540)
........

Merged revisions 361143 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 18:08:28 +00:00
Sean Bright 99bd5b1e2e Eliminate a bunch of shadow warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 17:02:52 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Sean Bright 51c24c88a1 Prefer ast_set_qos() over ast_netsock_set_qos()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 14:13:58 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Richard Mudgett b978e785dd Fix occasional incorrectly delayed call-file execution.
Since the dir timestamp is available at one second resolution, we cannot
know if it was updated within the same second after we scanned it.
Therefore, we will force another scan if the dir was just modified.

* Changed to force another scan if the directory was just modified.

(closes issue ASTERISK-19081)
Reported by: Knut Bakke

Review: https://reviewboard.asterisk.org/r/1688/
........

Merged revisions 355056 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 355057 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 22:04:46 +00:00
Joshua Colp be2ac1b3dd Only allow one 'dialplan reload' to execute at a time as otherwise they would share the same common local context list.
(closes issue AST-758)
........

Merged revisions 355009 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 355010 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 19:56:02 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Richard Mudgett 84642c728f Improved documentation of CLI "dialplan add extension" command.
* Documented dialplan add extension <exten>,<priority>,<app(<app-data>)>
format.

* Allow acceptance of command without the app-data value.  There are many
applications that do no need any parameters so it is silly to require that
field for all commands.

* Fixed a couple ast_malloc/ast_free mismatches with ast_add_extension2()
calls.

(closes issue ASTERISK-19222)
Reported by: Andrey Solovyev
Tested by: rmudgett
........

Merged revisions 354216 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354217 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-06 23:15:33 +00:00
Richard Mudgett 23bc964e1c Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 19:53:38 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

Review: https://reviewboard.asterisk.org/r/1661/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

Review: https://reviewboard.asterisk.org/r/1655/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Kinsey Moore 389ac0cff1 Fix lua goto detection to prevent unexpected behavior with confbridge
A bug in the pbx_lua goto detection was causing the dialplan to hangup
unexpectedly after confbridge exited if it had called lua dialplan code during
execution.

Patch-by: Timo Teras
Acked-by: Matt Nicholson
(closes issue ASTERISK-18976)
........

Merged revisions 349928 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-06 21:26:16 +00:00
Richard Mudgett d6b359ff0b Make pbx_config.c use Gosub instead of Macro call for stdexten.
Users created by users.conf with hasvoicemail=yes have been documented as
using a Gosub to stdexten since v1.6.0.  However, the code still generates
dialplan to access stdexten as a Macro as documented in v1.4; which does
not work with the newer extensions.conf.sample file.

* Make generated dialplan access the stdexten dialplan with the documented
Gosub instead of the older Macro style.

(closes issue ASTERISK-18809)
Reported by: Jay Allen
Patches:
      gosub_patch-pbx_config.patch (license #6323) patch uploaded by Jay Allen (modified)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-05 23:06:17 +00:00
Walter Doekes bc370b5462 Fix crash when dialplan remove include is called with too few arguments.
"dialplan remove include x from y" crashed when the amount of arguments
was less than 6.

(closes issue ASTERISK-18762)
Reported by: Andrey Solovyev
Tested by: Andrey Solovyev
........

Merged revisions 343936 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 343944 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 19:29:25 +00:00
Leif Madsen 02f886b5a2 Allow built in variables to be used with dynamic weights.
You can now use the built in variables , , and 
within a dynamic weight. For example, this could be useful when you want
to pass requested lookup number to the SHELL() function which could be
used to execute a script to dynamically set the weight of the result.

(Closes issue ASTERISK-13657)
Reported by: Joel Vandal
Tested by: Leif Madsen, Russell Bryant
Patches:
     asterisk-1.6-dundi-varhead.patch uploaded by Joel Vandal (License #5374)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 21:58:14 +00:00
Kinsey Moore 3551bfcbbc Fix compilation on Snow Leopard/FreeBSD for pbx_spool.c
One of the changes in the recent spool handling of hardlinks patch was just
outside a HAVE_INOTIFY block and caused compilation to fail in some build
environments.  This has been corrected.
........

Merged revisions 342328 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 342329 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 19:09:32 +00:00
Kinsey Moore c34674511d Merged revisions 342277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r342277 | kmoore | 2011-10-25 11:08:04 -0500 (Tue, 25 Oct 2011) | 25 lines
  
  Merged revisions 342276 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r342276 | kmoore | 2011-10-25 11:06:57 -0500 (Tue, 25 Oct 2011) | 18 lines
    
    Fix spool handling to allow call files to be hardlinked into place
    
    This fixes the inotify code to handle call files being hardlinked into the
    spool directory.
    
    The smsq utility does this, instead of rename(), to ensure that it cannot
    accidentally overwrite an existing spool file. A rename() might do that, but
    link() will definitely not.
    
    The inotify code had broken this, because it would wait for an IN_CLOSE_WRITE
    event on the file... which was never forthcoming, since it was never opened.
    Now we look for IN_OPEN events following the IN_CREATE event, and only wait
    for an IN_CLOSE_WRITE if the file was actually opened.
    
    Patch-by: dwmw2
    (closes issue ASTERISK-18331)
    Review: https://reviewboard.asterisk.org/r/1391/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 16:08:52 +00:00
Matthew Nicholson f39cbc004d only process args that exist
ASTERISK-18395
........

Merged revisions 341809 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341810 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-21 16:42:56 +00:00
Matthew Nicholson 9c7a017540 don't limit the length of app and function arguments
ASTERISK-18395
........

Merged revisions 341806 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341807 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-21 16:22:23 +00:00
Tzafrir Cohen d19ddf8741 Remove an unused include of md5.h
Unused include of asterisk/md5.h in pbx_realtime.c . A commit needed to
test the commit message.

Merged-From: http://svn.asterisk.org/svn/asterisk/branches/1.8@341074

Merged-From: http://svn.asterisk.org/svn/asterisk/branches/10@341148


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-17 17:58:00 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Tilghman Lesher 7d179abfd4 Merged revisions 326411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326411 | tilghman | 2011-07-05 17:08:29 -0500 (Tue, 05 Jul 2011) | 14 lines
  
  Add the attribute "type" to each "<use>" for menuselect.
  
  This matters only when autoconf fails to detect that weak linking is supported.
  External optional dependencies will become optional in both cases, as they are
  removed at compile time when not detected.  However, runtime-optional modules
  are made mandatory when weak linking is not found.  This change affects only
  the external optional dependencies; previously, they were incorrectly required
  when weak linking support was not detected.
  
  Patches:
  	20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003)
  
  Tested by: iasgoscouk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 22:11:40 +00:00
Richard Mudgett 6209a4b1f9 Merged revisions 324849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324849 | rmudgett | 2011-06-24 15:46:01 -0500 (Fri, 24 Jun 2011) | 15 lines
  
  Syntax errors in dialplan do not display the file name.
  
  When issuing the CLI command "dialplan reload" syntax errors and warnings
  are displayed on the console.  The offending line number is displayed on
  the console, but the file name is not displayed.  Errors caught in
  main/config.c do display the file name.
  
  (closes issue ASTERISK-17985)
  Reported by: ulogic
  Patches:
        pbx_config.patch uploaded by ulogic (License #5685) modified format
  Tested by: rmudgett
  
  JIRA SWP-3554
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-24 20:50:52 +00:00
Matthew Nicholson 7a1204d129 Default to starting an autoservice in pbx_lua. The autoservice is
automatically stopped when applications are executed, so this shouldn't cause
any problems.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:14:39 +00:00
Matthew Nicholson d5e9ce9ab1 Make pbx_lua handle managing the autoservice better.
Make autoservice_start() and autoservice_stop() return nothing.  Also check if
the autoservice flag is set before starting or stopping the autoservice and
stop and start the autoservice when returning control to and getting control
from the pbx engine.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:01:57 +00:00
Matthew Nicholson bccba53bcf Detect Goto in pbx_lua.
This code will actually detect any dialplan jump from any application that
calls ast_explicit_goto().  This change is only being done in trunk as it may
change the way some dialplans execute.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 18:04:23 +00:00
Russell Bryant ea4d4dfabf Merged revisions 317476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317476 | russell | 2011-05-05 17:47:57 -0500 (Thu, 05 May 2011) | 8 lines
  
  Add a datastore fixup to fix a pbx_lua crash.
  
  (closes issue #19055)
  Reported by: jamhed
  Patches:
        lua_datastore_fixup1.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson, jamhed
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:49:36 +00:00
Russell Bryant f0f5e237bf Merged revisions 317474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317474 | russell | 2011-05-05 17:36:33 -0500 (Thu, 05 May 2011) | 2 lines
  
  Fix more "set but unused" warnings.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:44:52 +00:00
Russell Bryant 95561bd37a Merged revisions 316336 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316336 | russell | 2011-05-03 17:13:31 -0500 (Tue, 03 May 2011) | 8 lines
  
  Use htons() instead of ntohs() in some places.
  
  (closes issue #19200)
  Reported by: wdoekes
  Patches:
        issue19200-trunk.patch uploaded by wdoekes (license 717)
        issue19200-1.8.x.patch uploaded by wdoekes (license 717)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 22:16:23 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Paul Belanger 92358b078c Merged revisions 315394 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r315394 | pabelanger | 2011-04-25 22:18:50 -0400 (Mon, 25 Apr 2011) | 14 lines
  
  Merged revisions 315393 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r315393 | pabelanger | 2011-04-25 22:17:43 -0400 (Mon, 25 Apr 2011) | 7 lines
    
    Add back CLI command 'dialplan save'
    
    (closes issue #19140)
    Reported by: lmadsen
    Patches:
          __20110419_dialplan_save.patch.txt uploaded by lmadsen (license 10)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 02:21:38 +00:00
Jonathan Rose 3c02c09162 In handle_cli_dialplan_add_extension, const char pointer *into_context is used instead of a->argv[5] to improve readability.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-04 17:37:47 +00:00
Jonathan Rose 7fa7d9c36b Makes 'dialplan add extension' create the specified context if it does not already exist.
If the user invokes 'dialplan add extension' into a non-existing context, the context will be created
and a message informing the user of the context being created will be issued in cli.

(closes issue #17431)
Reported by: leearcher
Patches:
      context_auto_create.diff uploaded by kobaz (license 834)
Tested by: leearcher, kobaz, jrose


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-04 17:32:05 +00:00
Tilghman Lesher 79fdf2945e Merged revisions 310462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310462 | tilghman | 2011-03-12 14:27:54 -0600 (Sat, 12 Mar 2011) | 45 lines
  
  Merged revisions 310448 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310448 | tilghman | 2011-03-12 14:24:54 -0600 (Sat, 12 Mar 2011) | 38 lines
    
    Recorded merge of revisions 310435 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310435 | tilghman | 2011-03-12 14:22:07 -0600 (Sat, 12 Mar 2011) | 31 lines
      
      Add AELSub, which provides a stable entry point into AEL subroutines.
      
      This commit needs some explanation, given that we're adding a new application
      into an existing release branch.  This is generally a violation of our release
      policy, except in very limited circumstances, and I believe this is one of
      those circumstances.
      
      The problem that this solves is one of the sanity of using multiple dialplan
      languages to define a dialplan.  In the case of the reporter, he or she is
      using AEL is define subroutines, while using Realtime extensions to invoke
      those subroutines.  While you can do this, it's based upon the reality of AEL
      using actual dialplan extensions; however, there is no guarantee that the
      details of _how_ AEL is compiled into extensions will remain stable.  In fact,
      at the time of this commit, it has already changed twice, once in a
      fundamental way.
      
      Now normally, a new application would only be added to trunk.  However, this
      application is explicitly to create a stable user-level API between versions,
      and adding it to trunk only will not solve the user's problem of switching
      between 1.6.2 and 1.8, nor will it help anybody switching from 1.8 to 1.10.
      Therefore, it needs to go into existing release branches.  For the sake of
      consistency, and also because one of the changes was between 1.4 and 1.6.x,
      I am also electing to commit this to 1.4.
      
      (closes issue #18910)
       Reported by: alexandrekeller
       Patches: 
             20110304__issue18919__1.6.2.diff.txt uploaded by tilghman (license 14)
             20110304__issue18919__1.4.diff.txt uploaded by tilghman (license 14)
       Tested by: alexandrekeller
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-12 20:42:33 +00:00
Matthew Nicholson f6c2ebff45 Merged revisions 309585 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309585 | mnicholson | 2011-03-04 13:38:25 -0600 (Fri, 04 Mar 2011) | 9 lines
  
  Merged revisions 309584 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309584 | mnicholson | 2011-03-04 13:37:13 -0600 (Fri, 04 Mar 2011) | 2 lines
    
    Restore mysterious lua_pushvalue() call removed in r309494.  The mystery has been solved.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 19:38:59 +00:00
Matthew Nicholson 3ef45303e1 Merged revisions 309542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309542 | mnicholson | 2011-03-04 13:00:33 -0600 (Fri, 04 Mar 2011) | 11 lines
  
  Merged revisions 309541 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309541 | mnicholson | 2011-03-04 12:59:20 -0600 (Fri, 04 Mar 2011) | 4 lines
    
    Check for errors from fseek() when loading config file, properly abort on errors from fread(), and supply a traceback for errors generated when loading the config file.
    
    Also, prepend a newline to traceback output so that the main error message is on it's own line.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 19:02:31 +00:00
Matthew Nicholson 8861d64ecc Merged revisions 309495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309495 | mnicholson | 2011-03-04 12:10:23 -0600 (Fri, 04 Mar 2011) | 9 lines
  
  Merged revisions 309494 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309494 | mnicholson | 2011-03-04 11:55:57 -0600 (Fri, 04 Mar 2011) | 2 lines
    
    remove mysterious lua_pushvalue() that is never used
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 18:11:43 +00:00
Matthew Nicholson b20fecdbbb Add support for defining hints from pbx_lua
(closes issue #16024)
Reported by: mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 17:44:44 +00:00
Matthew Nicholson 438ef2625a Merged revisions 309448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r309448 | mnicholson | 2011-03-04 09:59:25 -0600 (Fri, 04 Mar 2011) | 8 lines
  
  Export global symbols from pbx_lua to allow modules to be loaded.  Fixes a regression introduced in r278132.
  
  (closes issue #18671)
  Reported by: Igels
  Patches:
        pbx_lua_global_symbols1.diff uploaded by mnicholson (license 96)
  Tested by: Igels
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 16:00:05 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

Review: https://reviewboard.asterisk.org/r/1071/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

Review: https://reviewboard.asterisk.org/r/1083/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Leif Madsen 0a72d67d3b Merged revisions 300082 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r300082 | lmadsen | 2011-01-03 07:14:25 -0600 (Mon, 03 Jan 2011) | 11 lines
  
  Increase side of mapping response field.
  
  I've increased the size of the response field in a DUNDi mapping because of
  some documentation I'm writing. Previously it was set to AST_MAX_EXTENSION which
  is only 80 characters, which is far too small when you're using some dialplan
  functions to craft a response. The example I'm using is:
  
  extensions =>
  RegisteredDevices,0,SIP,dundi:very_awesome_password/${IF($[${DB_EXISTS(phones/${NUMBER}/device)}]?${DB(phones/${NUMBER}/device)}:None)},nopartial
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-03 13:15:38 +00:00
Tilghman Lesher 8cca4ed8d8 Merged revisions 299449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r299449 | tilghman | 2010-12-22 14:05:02 -0600 (Wed, 22 Dec 2010) | 15 lines
  
  Merged revisions 299448 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r299448 | tilghman | 2010-12-22 14:03:30 -0600 (Wed, 22 Dec 2010) | 8 lines
    
    Resolve warnings by disambiguating the "s" extension as used by chan_dahdi from the "s" extension as used by the AEL macros.
    
    (closes issue #18480)
     Reported by: nivek
     Patches: 
           20101215__issue18480__2.diff.txt uploaded by tilghman (license 14)
     Tested by: nivek
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-22 20:10:34 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

Review: https://reviewboard.asterisk.org/r/1007/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Tilghman Lesher 2cfb2dbbad Merged revisions 294605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294605 | tilghman | 2010-11-10 17:26:39 -0600 (Wed, 10 Nov 2010) | 2 lines
  
  Fixing the Mac OS X build (bamboo warning)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-10 23:27:33 +00:00
Tilghman Lesher a7e5429d70 Merged revisions 294569 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294569 | tilghman | 2010-11-10 17:13:37 -0600 (Wed, 10 Nov 2010) | 8 lines
  
  Properly queue files with inotify(7).
  
  (closes issue #18089)
   Reported by: abelbeck
   Patches: 
         20101021__issue18089.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-10 23:14:45 +00:00
Jeff Peeler 14cef4634e Merged revisions 292083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292083 | jpeeler | 2010-10-18 10:32:40 -0500 (Mon, 18 Oct 2010) | 4 lines
  
  Disable use of inotify for call file handling as it is not working properly.
  
  (related to #18089)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-18 15:33:35 +00:00
Tilghman Lesher bddb242d72 Merged revisions 290255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r290255 | tilghman | 2010-10-04 18:23:11 -0500 (Mon, 04 Oct 2010) | 18 lines
  
  Merged revisions 290254 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r290254 | tilghman | 2010-10-04 18:14:59 -0500 (Mon, 04 Oct 2010) | 11 lines
    
    Change new pattern matcher to regard dashes the same as the old pattern matcher -- as visual candy to be ignored.
    
    Also change the AEL parser to not generate dashes within extensions, as those
    dashes would be ignored.  Update the AEL tests to match this behavior.
    
    (closes issue #17366)
     Reported by: murf
     Patches: 
           20100727__issue17366.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-04 23:23:57 +00:00
Tilghman Lesher 93f9937ede Merged revisions 290066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r290066 | tilghman | 2010-10-03 15:02:29 -0500 (Sun, 03 Oct 2010) | 8 lines
  
  Get notification only when file is closed, not when created.
  
  (closes issue #17924)
   Reported by: mkeuter
   Patches: 
         asterisk-1.8-bugid17924.patch uploaded by abelbeck (license 946)
   Tested by: abelbeck
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-03 20:04:57 +00:00
Tilghman Lesher 29249cfb25 Merged revisions 285386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285386 | tilghman | 2010-09-07 16:20:16 -0500 (Tue, 07 Sep 2010) | 13 lines
  
  Don't notify on attribute changes, and change how the queuing mechanism works.
  
  Fixes call spools in 1.8.
  
  (closes issue #17337)
   Reported by: loloski
   Patches: 
         20100827__issue17337.diff.txt uploaded by tilghman (license 14)
  
  (closes issue #17924)
   Reported by: mkeuter
   Tested by: mkeuter
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07 21:21:00 +00:00
Tilghman Lesher 90bf5c0549 Merged revisions 285367 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285367 | tilghman | 2010-09-07 15:56:07 -0500 (Tue, 07 Sep 2010) | 23 lines
  
  Merged revisions 285366 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285366 | tilghman | 2010-09-07 15:31:41 -0500 (Tue, 07 Sep 2010) | 16 lines
    
    Merged revisions 285365 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285365 | tilghman | 2010-09-07 15:30:22 -0500 (Tue, 07 Sep 2010) | 9 lines
      
      Catch invalid extensions at the parser, instead of making the core deal with them.
      
      (closes issue #17794)
       Reported by: PavelL
       Patches: 
             20100820__issue17794__1.6.2.diff.txt uploaded by tilghman (license 14)
             20100820__issue17794__1.4.diff.txt uploaded by tilghman (license 14)
       Tested by: PavelL
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07 20:56:53 +00:00
Tilghman Lesher 8190e96fad Merged revisions 284610 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284610 | tilghman | 2010-09-02 00:20:59 -0500 (Thu, 02 Sep 2010) | 10 lines
  
  When optional_api is non-optional, force dependent modules to be loaded.
  
  (closes issue #17707)
   Reported by: ira
   Patches: 
         20100819__issue17707__asterisk1.8.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
   
  Review: https://reviewboard.asterisk.org/r/876/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:27:53 +00:00
Russell Bryant 61aa412c61 Merged revisions 283951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283951 | russell | 2010-08-27 16:33:55 -0500 (Fri, 27 Aug 2010) | 2 lines
  
  Print exten@context:priority in verbose messages from pbx_realtime.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27 21:50:15 +00:00
Jason Parker 377c3bf88e Merged revisions 282131 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r282131 | qwell | 2010-08-12 17:51:44 -0500 (Thu, 12 Aug 2010) | 16 lines
  
  Merged revisions 282130 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r282130 | qwell | 2010-08-12 17:50:54 -0500 (Thu, 12 Aug 2010) | 9 lines
    
    Merged revisions 282129 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r282129 | qwell | 2010-08-12 17:49:28 -0500 (Thu, 12 Aug 2010) | 1 line
      
      Register CLI commands before parsing config, in case there is a config error.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 22:52:33 +00:00
Terry Wilson d6e1c724e5 Remove built-in AES code and use optional_api instead
Review: https://reviewboard.asterisk.org/r/793/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 19:11:32 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
David Vossel 3f00e3ff03 fixes issue with 'dialplan remove extension blah' segfaulting with tab completion
(closes issue #17440)
Reported by: kobaz


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-22 22:11:50 +00:00
Matthew Nicholson 01507f4ab7 Merged revisions 271761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271761 | mnicholson | 2010-06-22 09:49:36 -0500 (Tue, 22 Jun 2010) | 9 lines
  
  Allow users to specify a port for dundi peers.
  
  (closes issue #17056)
  Reported by: klaus3000
  Patches:
        dundi-peerport-patch-trunk.txt uploaded by klaus3000 (license 65)
  Tested by: klaus3000
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-22 14:54:58 +00:00
Jeff Peeler 54f2dfc91c Merged revisions 271399 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271399 | jpeeler | 2010-06-18 14:28:24 -0500 (Fri, 18 Jun 2010) | 11 lines
  
  Fix crash when parsing some heavily nested statements in AEL on reload.
  
  Due to the recursion used when compiling AEL in gen_prios, all the stack space 
  was being consumed when parsing some AEL that contained nesting 13 levels deep.
  Changing a few large buffers to be heap allocated fixed the crash, although I
  did not test how many more levels can now be safely used.
  
  (closes issue #16053)
  Reported by: diLLec
  Tested by: jpeeler
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-18 21:32:09 +00:00
Jeff Peeler a370bc1522 fix compile error
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-27 20:08:49 +00:00
Tilghman Lesher 05a1ec8abc Cache query results for one second.
Queries from the PBX core come in 3's.  Caching avoids the additional
performance penalty from those two additional queries hitting the database.

(closes issue #16521)
 Reported by: tilghman
 Patches: 
       20091229__issue16521.diff.txt uploaded by tilghman (license 14)
 Tested by: Hubguru, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-27 19:25:16 +00:00
Tilghman Lesher a7498ae02e Use configure to determine the prefixes and include directories properly.
This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.

(closes issue #17391)
 Reported by: loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 00:29:40 +00:00
Russell Bryant 7c4a95f2ea Fix build on linux.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-13 15:33:49 +00:00
Tilghman Lesher 8d6ee962c7 Add kqueue(2) implementation to Asterisk in various places.
This will save a considerable amount of CPU on the BSDs, including Mac OS X,
as it eliminates several places in the code that we previously used a busy
loop.  Additionally, this adds a res_timing interface, using kqueue timers.

Review: https://reviewboard.asterisk.org/r/543/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-13 05:37:31 +00:00
Paul Belanger 663a368a87 Improve logging by displaying line number
(closes issue #16303)
Reported by: dant
Patches:
      issue16303.patch.v2 uploaded by pabelanger (license 224)
Tested by: dant, lmadsen, pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-11 19:40:37 +00:00
Russell Bryant be672528e6 Merged revisions 255322 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r255322 | russell | 2010-03-30 11:06:06 -0500 (Tue, 30 Mar 2010) | 2 lines
  
  Don't make Asterisk not start if pbx_dundi fails to initialize.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-30 16:07:49 +00:00
Tilghman Lesher 11f57c6806 inotify support for pbx_spool
This should give a good speed boost, in that one particular thread isn't waking
up once a second to read directory contents.

Reviewboard: https://reviewboard.asterisk.org/r/137/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-27 06:09:26 +00:00
Kevin P. Fleming ae6008ef3a Change per-file debug and verbose levels to be per-module, the way
users expect them to work.

'core set debug' and 'core set verbose' can optionally change the
level for a specific filename; however, this is actually for a
specific source file name, not the module that source file is included
in. With examples like chan_sip, chan_iax2, chan_misdn and others
consisting of multiple source files, this will not lead to the
behavior that users expect. If they want to set the debug level for
chan_sip, they want it set for all of chan_sip, and not to have to
also set it for reqresp_parser and other files that comprise the
chan_sip module.

This patch changes this functionality to be module-name based instead
of file-name based.

To make this work, some Makefile modifications were required to ensure
that the AST_MODULE definition is present in each object file produced
for each module as well.

Review: https://reviewboard.asterisk.org/r/574/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23 14:22:27 +00:00
Russell Bryant b6e5e180b9 Resolve a compiler warning on FreeBSD.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20 11:39:39 +00:00
Russell Bryant 925aad8944 Remove pbx_gtkconsole and related gtk1 checks.
Review: https://reviewboard.asterisk.org/r/541/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-05 19:32:19 +00:00
Leif Madsen b310356d93 Convert some DUNDI functions to XML documentation.
(closes issue #16798)
Reported by: snuffy
Patches: 
      xml_dundi.diff uploaded by snuffy (license 35)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-02 19:21:19 +00:00
Russell Bryant 77578f5e35 Add a todo for pbx_gtkconsole for updating to gtk2.
This module needs to be converted to gtk2, or we will eventually have to just
remove it from the tree.  gtk1 isn't even packaged anymore in the distro I'm
using.  I suspect nobody uses this and that nobody would notice if we removed
it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-08 04:43:55 +00:00
Tilghman Lesher bc9f02a60d Merged revisions 242520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242520 | tilghman | 2010-01-24 00:33:01 -0600 (Sun, 24 Jan 2010) | 8 lines
  
  Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.
  
  Changed after discussion on the -dev list about possible unnecessary build
  failures, due to checkouts/untars causing these special source files to
  possibly be newer than their resulting C files.  This should additionally
  ensure that nobody need learn about extra Makefile arguments to ensure the
  proper files get rebuilt when changes are made to these special source files.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-24 06:40:31 +00:00
Jeff Peeler 568c057c4c Extend max call limit duration from 24.8 days to 292+ million years.
If the limit was set past MAX_INT upon answering, the call was immediately
hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup).
The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been
changed to return an int64_t to prevent overflow. Also the reporter suggested
adding a message indicating the reason for the call hanging up. Given that the
new limit is so much higher, the message (which would only really be useful in
the overflow scenario) has been made a debug message only.

(closes issue #16006)
Reported by: viraptor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 22:31:25 +00:00
Matthias Nick 89b02b583a Parse global variables or expressions in hint extensions
Parse global variables or expressions in hint extensions. Like: exten => 400,hint,DAHDI/i2/${GLOBAL(var)}

(closes issue #16166)
Reported by: rmudgett
Tested by: mnick, rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-04 17:15:47 +00:00
Matthew Nicholson a723865e5c Load pbx_lua with global symbols to allow linking with other lua libraries.
Found by Maxim Litnitskiy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-25 15:42:48 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Russell Bryant b0778107c7 Resolve a warning from gcc 4.4.1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 22:08:46 +00:00
Tilghman Lesher 01fd08d5b9 If lua is detected with the lua5.1 prefix (or not), adjust the include path accordingly.
Based upon feedback to a release announcement on the -users list.  See
http://lists.digium.com/pipermail/asterisk-users/2009-August/236954.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-30 06:43:04 +00:00
Tilghman Lesher 9c653c4431 DUNDILOOKUP function in 1.6 should use comma delimiters.
(closes issue #15322)
 Reported by: chappell
 Patches: 
       dundilookup-0015322.patch uploaded by chappell (license 8)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-25 06:51:12 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Kevin P. Fleming ed2a3cedd1 Merged revisions 209759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r209759 | kpfleming | 2009-07-31 19:52:00 -0500 (Fri, 31 Jul 2009) | 7 lines
  
  Minor changes inspired by testing with latest GCC.
  
  The latest GCC (what will become 4.5.x) has a few new warnings, that in these
  cases found some either downright buggy code, or at least seriously poorly
  designed code that could be improved.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 01:03:07 +00:00
David Brooks d81d6d3415 Fixing typos. Replaces "recieved" with "received" and "initilize" with "initialize"
(closes issue #15571)
Reported by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 16:33:50 +00:00
Russell Bryant 742f0b90dd Remove trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 21:12:43 +00:00
Kevin P. Fleming 96e4e31eeb Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
  
  Ensure that user-provided CFLAGS and LDFLAGS are honored.
  
  This commit changes the build system so that user-provided flags (in ASTCFLAGS
  and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
  by the build system itself, so that the user can effectively override the
  build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
  be provided *either* in the environment before running 'make', or as variable
  assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
  is no longer necessary, so they are no longer documented, but are still supported
  so as not to break existing build systems that supply them when building Asterisk.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:28:04 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Kevin P. Fleming a3af213506 Remove rarely-used event_log/LOG_EVENT support
In discussions today at the Europe Asterisk Developer Meet-Up, we determined that
the event_log was used in only 9 places in the entire tree, and really was not needed
at all. The users have been converted to use LOG_NOTICE, or the messages have been
removed since other messages were already in place that provided the same information.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 19:02:22 +00:00
David Brooks 0ea83eab48 Removing crufty code that is no longer necessary. Code cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:32:58 +00:00
Russell Bryant b564b2105f Change g_eid to ast_eid_default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:00:18 +00:00
Jeff Peeler 58cf8b69da Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. 

A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is used
by the tools in the utils/ directory that use parts of Asterisk header files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.

(closes issue #13593)
Reported by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 04:06:44 +00:00
Mark Michelson 7824d71998 Convert pbx_spool to use string fields instead of statically-sized buffers.
In tests run after making this conversion, I noticed an approximate 85% 
reduction in memory usage for call file processing.

Review: http://reviewboard.digium.com/r/168/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 17:03:47 +00:00
Tilghman Lesher f90021fdd0 Ensure that commas placed in the middle of extension character classes do not
interfere with correct parsing of the extension.  Also, if an unterminated
character class DOES make its way into the pbx core (through some other
method), ensure that it does not crash Asterisk.
(closes issue #14362)
 Reported by: Nick_Lewis
 Patches: 
       20090129__bug14362.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 00:43:52 +00:00
Tilghman Lesher 53ddd52fc4 Merged revisions 170158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170158 | tilghman | 2009-01-22 11:18:07 -0600 (Thu, 22 Jan 2009) | 6 lines
  
  Allow global variables after substitution to be as long as other variables.
  (closes issue #14263)
   Reported by: markd
   Patches: 
         20090120__bug14263.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 17:19:28 +00:00
Sean Bright 5183cbccfc Change intializer types. Found while working on asterisk-cpp. I have a new
favorite error message from g++:

    pbx_dundi.c:4580: sorry, unimplemented: non-trivial designated
                      initializers not supported

I like it when compilers are apologetic.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-17 02:52:30 +00:00
Joshua Colp 654ea55a65 Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:21:44 +00:00
Steve Murphy 1a37ee4025 A possibly "horrible fix" for a "horribly broken"
situation.

As stuff shifts around in the asterisk code, the
miscellaneous inclusions from the standalone stuff
gets broken. There's no easy fix for this situation.

I made sure that everything in utils builds without
problem ***AND*** that aelparse runs the regressions
correctly with the following make menuselect options
both on and off:

DONT_OPTIMIZE
DEBUG_THREADS
DEBUG_CHANNEL_LOCKS
MALLOC_DEBUG
MTX_PROFILE
DEBUG_SCHEDULER
DEBUG_THREADLOCALS
DETECT_DEADLOCKS
CHANNEL_TRACE

I think from now on, I'm going to #undef
all these features in the various utils native
files; I guess I could do the same for the
copied-in files, surrounded by STANDALONE ifdef.

A standalone isn't going to care about threads,
mutexes, etc.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 05:04:56 +00:00
Steve Murphy eaafc96872 fixed the regressions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 02:32:58 +00:00
Joshua Colp 601176cb6e Be more detailed about why the include did not get included.
(closes issue #14071)
Reported by: kshumard
Patches:
      pbx_config.patch.improvederroroutput.txt uploaded by kshumard (license 92)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 16:50:11 +00:00
Tilghman Lesher e62193f887 Allow disabling pattern match searches within the Realtime dialplan switch.
(closes issue #13698)
 Reported by: fhackenberger
 Patches: 
       20081211__bug13698.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fhackenberger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 21:17:07 +00:00
Russell Bryant 1238488319 When a reload is issued, always process the configuration for dundi.conf.
The reason is that a reload can be used to refresh DNS lookups for defined peers.
Even if the config file hasn't changed, we want to process it for that purpose.

(closes issue #13776)
Reported by: kombjuder


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:17:55 +00:00
Russell Bryant 92e1619bab Merged revisions 163511 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163511 | russell | 2008-12-12 08:40:31 -0600 (Fri, 12 Dec 2008) | 5 lines

Specify uint32_t for variables storing a CRC32 so that it is actually 32 bits
on 64-bit machines, as well.

(inspired by issue #13879)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 14:44:06 +00:00
Matthew Nicholson c6244cca48 Merged revisions 163316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163316 | mnicholson | 2008-12-11 16:44:31 -0600 (Thu, 11 Dec 2008) | 9 lines
  
  Clean up the dundi cache every 5 minutes.
  
  (closes issue #13819)
  Reported by: adomjan
  Patches:
        pbx_dundi.c-clearcache.patch uploaded by adomjan (license 487)
        dundi_clearecache3.diff uploaded by mnicholson (license 96)
  Tested by: adomjan
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 22:49:59 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Tilghman Lesher b1824992a9 Merged revisions 160558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160558 | tilghman | 2008-12-03 11:34:34 -0600 (Wed, 03 Dec 2008) | 7 lines
  
  If an entry is added to the directory during a scan when another entry expires,
  then that new entry will not be processed promptly, but must wait for either a
  future entry to start or a current entry's retry to occur.  If no other entries
  exist in the directory (other than the new entries) when a bunch expire, then
  the new entries must wait until another new entry is added to be processed.
  This was a rather weird race condition, really.  Fixes AST-147.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:38:59 +00:00
Tilghman Lesher efa00e7038 Merged revisions 160551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160551 | tilghman | 2008-12-03 10:58:34 -0600 (Wed, 03 Dec 2008) | 4 lines
  
  Don't start scanning the directory until all modules are loaded, because some
  required modules (channels, apps, functions) may not yet be in memory yet.
  Fixes AST-149.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:01:03 +00:00
Tilghman Lesher 1b0d3db863 Don't actually do anything with a negative priority, because we ignore it in
the result, anyway.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 18:01:02 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
  
  the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
  
  with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
  
  while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
Terry Wilson d66a8cd264 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:25:14 +00:00
Michiel van Baak 86f900b201 This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code

Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.

Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.

ok russellb@ via reviewboard

(closes issue #13735)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 06:46:04 +00:00
Kevin P. Fleming 210df649a2 correct logic error noticed by rmudgett (thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 03:09:16 +00:00
Kevin P. Fleming 9153827d56 coding style/guidelines cleanup, plus use new side-effect safe S_OR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06 21:12:03 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
BJ Weschke 9aefadd7c1 Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter.
(closes issue #13741)
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 05:07:25 +00:00
Tilghman Lesher d5837ba8c2 Add additional memory debugging to several core APIs, and fix several memory
leaks found with these changes.
(Closes issue #13505, closes issue #13543)
Reported by: mav3rick, triccyx
 Patches: 
       20081001__bug13505.diff.txt uploaded by Corydon76 (license 14)
 Tested by: mav3rick, triccyx


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 22:38:06 +00:00
Tilghman Lesher 038b588ee8 Reset continuation items at the beginning of each context (suggested by
kpfleming).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 18:59:58 +00:00
Tilghman Lesher 5c32f80a61 Add keyword "same", which allows you to create multiple steps in a dialplan,
without needing to respecify an extension pattern multiple times.
(closes issue #13632)
 Reported by: blitzrage
 Patches: 
       20081006__bug13632.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage, Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 18:31:38 +00:00
Kevin P. Fleming 629861a705 Merged revisions 144924-144925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines
  
  improve header inclusion process in a few small ways:
  
    - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
    - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
    - simplify the usage of some of these headers in the AEL-related stuff in the utils directory
........
  r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines
  
  fix some minor issues with rev 144924
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 15:52:56 +00:00
Steve Murphy 1c2b1eb928 (closes issue #13564)
Reported by: mnicholson
Patches:
      pbx_lua9.diff uploaded by mnicholson (license 96)

Many thanks to Matt for his upgrade to the lua dialplan
option! 

the Description from the bug:

This patch adds a stack trace to errors encountered while executing lua extensions. The patch also handles out of memory errors reported by lua.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 18:02:06 +00:00
Steve Murphy a36696f2e7 (closes issue #13559)
Reported by: mnicholson
Patches:
      pbx_lua8.diff uploaded by mnicholson (license 96)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:54:11 +00:00
Steve Murphy 38028fa641 I added a little verbage to hashtab for the hashtab_destroy func.
It was pretty sparsely documented.

This update fleshes out the pbx_lua module, to 
add the switch statements to the extensions in the
extensions.lua file, as well as removing them when
the module is unloaded.

Many thanks to Matt Nicholson for his fine
contribution!




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:18:12 +00:00
Steve Murphy f8ddaae70b (closes issue #13558)
Reported by: mnicholson

Considering that the example extensions.lua used nothing but ["12345"] notation,
and that the resulting error message: 

[Sep 24 17:01:16] ERROR[12393]: pbx_lua.c:1204 exec: Error executing lua extension: attempt to call a nil value

is not very informative as to the nature of the problem, I think this bug
fix is a big win!





git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 17:51:11 +00:00
Steve Murphy ec25f4be4d Merged revisions 141094 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141094 | murf | 2008-09-04 17:15:07 -0600 (Thu, 04 Sep 2008) | 70 lines

(closes issue #13357)
Reported by: pj
Tested by: murf

(closes issue #13416)
Reported by: yarns
Tested by: murf

If you find this message overly verbose, relax, it's probably
not meant for you. This message is meant for probably only
two people in the whole world: me, or the poor schnook that
has to maintain this code because I'm either dead or unavailable
at the moment.

This fix solves two reports, both having to do with embedding
a function call in a ${} construct. It was tricky because the
funccall syntax has parenthesis () in it. And up till now,
the 'word' token in the flex stuff didn't allow that, because
it would tend to steal the LP and RP tokens. To be truthful,
the "word" token was the trickiest, most unstable thing in
the whole lexer. I was lucky it made this long without complaints.
I had to choose every character in the pattern with extreme
care, and I knew that someday I'd have to revisit it. Well,
the day has come.

So, my brilliant idea (and I'm being modest), was to use the 
surrounding ${} construct to make a state machine and capture 
everything in it, no matter what it contains. But, I have to now
treat the word token like I did with comments, in that I turn
the whole thing into a state-machine sort of spec, with new
contexts "curlystate", "wordstate", and "brackstate".

Wait a minute, "brackstate"? Yes, well, it didn't take very many
regression tests to point out if I do this for ${} constructs,
I also have to do it with the $[] constructs, too.

I had to create a separate pcbstack2 and pcbstack3 because
these constructs can occur inside macro argument lists, and
when we have two state machines operating on the same structures
we'd get problems otherwise. I guess I could have stopped at
pcbstack2 and had the brackstate stuff share it, but it doesn't
hurt to be safe. So, the pcbpush and pcbpop routines also now
have versions for "2" and "3".

I had to add the {KEYWORD} construct to the initial pattern for
"word", because previously word would match stuff like "default7",
because it was a longer match than the keyword "default". But,
not any more, because the word pattern only matches only one or
two characters now, and it will always lose. So, I made it the
winner again by making an optional match on any of the keywords
before it's normal pattern.

I added another regression test to make sure we don't
lose this in future edits, and had to fix just one regression,
where it no longer reports a 'cascaded' error, which I guess
is a plus.

I've given some thought as to whether to apply these fixes to
1.4 and the 1.6.x releases, vs trunk; I decided to put it in
1.4 because one of the bug reports was against 1.4; and it
is unexpected that AEL cannot handle this situation. It actually
reduced the amount of useless "cascade" error messages that
appeared in the regressions (by one line, ehhem). There is
a possible side-effect in that it does now do more careful
checking of what's in those ${} constructs, as far as matching
parens, and brackets are concerned. Some users may find a an
insidious problem and correct it this way. This should be 
exceedingly rare, I hope.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-04 23:31:41 +00:00
Steve Murphy a40f1cc1c5 Merged revisions 136726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136726 | murf | 2008-08-07 18:15:34 -0600 (Thu, 07 Aug 2008) | 32 lines


(closes issue #13236)
Reported by: korihor

Wow, this one was a challenge!

I regrouped and ran a new strategy for
setting the ~~MACRO~~ value; I set it once
per extension, up near the top. It is only
set if there is a switch in the extension.

So, I had to put in a chunk of code to detect
a switch in the pval tree.

I moved the code to insert the set of ~~exten~~
up to the beginning of the gen_prios routine, 
instead of down in the switch code.

I learned that I have to push the detection
of the switches down into the code, so everywhere
I create a new exten in gen_prios, I make sure
to pass onto it the values of the mother_exten
first, and the exten next.

I had to add a couple fields to the exten
struct to accomplish this, in the ael_structs.h
file. The checked field makes it so we don't
repeat the switch search if it's been done.

I also updated the regressions.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-08 00:48:35 +00:00
Sean Bright b7a4db0ced Start moving in changes from my resolve-shadow-warnings branch. Going to do
this in pieces so the diffs are a little bit smaller and more reviewable.

pbx/ and formats/ first.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 00:44:55 +00:00
Kevin P. Fleming 7df8b8b848 make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 16:56:11 +00:00
Russell Bryant 8c29e699fe Merged revisions 134595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r134595 | russell | 2008-07-30 15:37:17 -0500 (Wed, 30 Jul 2008) | 6 lines

Reduce stack consumption by 12.5% of the max stack size to fix a crash when
compiled with LOW_MEMORY.

(closes issue #13154)
Reported by: edantie

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 20:38:35 +00:00
Kevin P. Fleming 6291cd19bf remove remaining Zaptel references in various places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-28 16:42:00 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:09:35 +00:00
Tilghman Lesher 4ff527903e Code wasn't ready to be merged - see -dev list discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 03:39:59 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Olle Johansson 6f400edeab Changing name of global api call to ast_*
My mistake, pointed out by Russell.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-06 08:28:58 +00:00