summaryrefslogtreecommitdiff
path: root/pbx
AgeCommit message (Collapse)Author
2012-08-21Fix misuses of asprintf throughout the code.Mark Michelson
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-09DUNDi: Add CLI commands DUNDi show cache and DUNDi show hintsJonathan Rose
(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-08Allow support for early media on AMI originates and call files.Mark Michelson
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-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
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-31Add "dialplan remove context" and modify "dialplan add include"Mark Michelson
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-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ 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-11Fix coverity UNUSED_VALUE findings in core support level filesKinsey Moore
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-05-31Coverity Report: Fix issues for error type REVERSE_INULL (core modules)Richard Mudgett
* 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-14Fix two more coverity constant expression result findings.Mark Michelson
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-10Resolve FORWARD_NULL static analysis warningsKinsey Moore
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-04Fix many issues from the NULL_RETURNS Coverity reportKinsey Moore
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-04-12Add option to invoke the extensions.conf stdexten using the legacy macro method.Richard Mudgett
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-04Replace GNU old-style field designator extensions to fix clang warningsJonathan Rose
(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-03-08Eliminate a bunch of shadow warnings.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
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-27Prefer ast_set_qos() over ast_netsock_set_qos()Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
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-13Fix occasional incorrectly delayed call-file execution.Richard Mudgett
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-13Only allow one 'dialplan reload' to execute at a time as otherwise they ↵Joshua Colp
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-13Opaquify char * and char[] in ast_channelTerry Wilson
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-06Improved documentation of CLI "dialplan add extension" command.Richard Mudgett
* 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-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
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-09Replace direct access to channel name with accessor functionsTerry Wilson
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-06Fix lua goto detection to prevent unexpected behavior with confbridgeKinsey Moore
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-05Make pbx_config.c use Gosub instead of Macro call for stdexten.Richard Mudgett
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
2011-11-08Fix crash when dialplan remove include is called with too few arguments.Walter Doekes
"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-07Allow built in variables to be used with dynamic weights.Leif Madsen
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-10-25Fix compilation on Snow Leopard/FreeBSD for pbx_spool.cKinsey Moore
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-25Merged revisions 342277 via svnmerge from Kinsey Moore
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-21only process args that existMatthew Nicholson
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-21don't limit the length of app and function argumentsMatthew Nicholson
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-17Remove an unused include of md5.hTzafrir Cohen
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-07-14Merged revisions 328247 via svnmerge from Leif Madsen
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-05Merged revisions 326411 via svnmerge from Tilghman Lesher
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-06-24Merged revisions 324849 via svnmerge from Richard Mudgett
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-05-06Default to starting an autoservice in pbx_lua. The autoservice isMatthew Nicholson
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-06Make pbx_lua handle managing the autoservice better.Matthew Nicholson
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-06Detect Goto in pbx_lua.Matthew Nicholson
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-05Merged revisions 317476 via svnmerge from Russell Bryant
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-05Merged revisions 317474 via svnmerge from Russell Bryant
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-03Merged revisions 316336 via svnmerge from Russell Bryant
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-03Merged revisions 316265 via svnmerge from Russell Bryant
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-04-26Merged revisions 315394 via svnmerge from Paul Belanger
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-04In handle_cli_dialplan_add_extension, const char pointer *into_context is ↵Jonathan Rose
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-04Makes 'dialplan add extension' create the specified context if it does not ↵Jonathan Rose
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-03-12Merged revisions 310462 via svnmerge from Tilghman Lesher
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-04Merged revisions 309585 via svnmerge from Matthew Nicholson
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-04Merged revisions 309542 via svnmerge from Matthew Nicholson
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-04Merged revisions 309495 via svnmerge from Matthew Nicholson
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