summaryrefslogtreecommitdiff
path: root/pbx
AgeCommit message (Collapse)Author
2013-12-03Add channel locking for channel snapshot creation.Mark Michelson
This adds channel locks around calls to create channel snapshots as well as other functions which operate on a channel and then end up creating a channel snapshot. Functions that expect the channel to be locked prior to being called have had their documentation updated to indicate such. ........ Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03Cache string values of formats on ast_format_cap() to save processing.Mark Michelson
Channel snapshots have string representations of the channel's native formats. Prior to this change, the format strings were re-created on ever channel snapshot creation. Since channel native formats rarely change, this was very wasteful. Now, string representations of formats may optionally be stored on the ast_format_cap for cases where string representations may be requested frequently. When formats are altered, the string cache is marked as invalid. When strings are requested, the cache validity is checked. If the cache is valid, then the cached strings are copied. If the cache is invalid, then the string cache is rebuilt and copied, and the cache is marked as being valid again. Review: https://reviewboard.asterisk.org/r/2879 ........ Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06Check result of ast_var_assign() calls for memory allocation failure.Walter Doekes
We try to keep the system running even when all available memory is spent. Review: https://reviewboard.asterisk.org/r/2734/ ........ Merged revisions 396279 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 396287 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Fix memory leak in pbx_dundiMark Michelson
pbx_dundi added an io context without removing it. This caused a memory leak when the module was unloaded. (closes ASTERISK-21718) Reported by Corey Farrell Patches: pbx_dundi-ast_io_remove.patch uploaded by Corey Farrell (License #5909) ........ Merged revisions 388376 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 388378 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08Add multi-channel Stasis messages; refactor Dial AMI events to StasisMatthew Jordan
This patch does the following: * A new Stasis payload has been defined for multi-channel messages. This payload can store multiple ast_channel_snapshot objects along with a single JSON blob. The payload object itself is opaque; the snapshots are stored in a container keyed by roles. APIs have been provided to query for and retrieve the snapshots from the payload object. * The Dial AMI events have been refactored onto Stasis. This includes dial messages in app_dial, as well as the core dialing framework. The AMI events have been modified to send out a DialBegin/DialEnd events, as opposed to the subevent type that was previously used. * Stasis messages, types, and other objects related to channels have been placed in their own file, stasis_channels. Unit tests for some of these objects/messages have also been written. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-28Break the world. Stasis message type accessors should now all be named ↵Kinsey Moore
correctly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Move more channel events to Stasis; move res_json.c to main/json.c.David M. Lee
This patch started out simply as fixing the bouncing tests introduced in r382685, but required some other changes to give it a decent implementation. To fix the bouncing tests, the UserEvent and Newexten AMI events needed to be refactored to dispatch via Stasis. Dispatching directly to AMI resulted in those events sometimes getting ahead of the associated Newchannel events, which would understandably confuse anyone. I found that instead of creating a zillion different message types and structures associated with them, it would be preferable to define a message type that has a channel snapshot and a blob of structured data with a small bit of additional information. The JSON object model provides a very nice way of representing structured data, so I went with that. * Move JSON support from res_json.c to main/json.c * Made libjansson-dev a required dependency * Added an ast_channel_blob message type, which has a channel snapshot and JSON blob of data. * Changed UserEvent and Newexten events so that they are dispatched via ast_channel_blob messages on the channel's topic. * Got rid of the ast_channel_varset message; used ast_channel_blob instead. * Extracted the manager functions converting Stasis channel events to AMI events into manager_channel.c. (issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2381/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15Fix processing of call files when using KQueue on OS XMatthew Jordan
In certain situations, call files are not processed when using KQueue with pbx_spool. Asterisk was sending an invalid timeout value when the spool directory is empty, causing the call to kevent to error immediately. This can create a tight loop, increasing the CPU load on the system. (closes issue ASTERISK-21176) Reported by: Carlton O'Riley patches: kqueue_osx.patch uploaded by coriley (License 6473) ........ Merged revisions 383120 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 383121 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-27Remove unnecessary channel module references.Richard Mudgett
* Removed call to ast_module_user_hangup_all() in res_config_mysql.c since it is effectively a noop. No channels can attach a reference to that module. * Removed call to ast_module_user_hangup_all() in app_celgenuserevent.c. The caller of unload_module() has already called it. * Removed redundant channel module references in pbx_dundi.c. The registered dialplan function callback dispatchers for the read/read2/write callbacks already reference the module before calling. * pbx_dundi: Moved unregistering CLI commands, DUNDi switch, and dialplan functions to the first thing the unload_module() does. This will reduce the chance of new channels using DUNDi services while the module is being torn down. ........ Merged revisions 376657 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376658 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376659 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-14Fix call files when astspooldir is relative.Richard Mudgett
Future dated call files are ignored when astspooldir is relative to the current directory. The queue_file() assumed that the qdir needed to be prepended if the given filename did not start with a '/'. If astspooldir is relative it is not going to start from the root directory obviously so it will not start with a '/'. The filename used in queue_file() ultimately results in qdir prepended multiple times. * Made queue_file() not prepend qdir if the filename contains a '/'. (closes issue ASTERISK-20593) Reported by: James Le Cuirot Patches: 0004-Fix-future-call-files-from-relative-directories.patch (license #6439) patch uploaded by James Le Cuirot ........ Merged revisions 376232 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376233 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376234 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18Doxygen Updates - Title updateAndrew Latham
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing. Update title that was left behind many years ago. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14Title updateAndrew Latham
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-08Fix deletion of unopenable spool files.Richard Mudgett
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-09-06Fix DUNDi message routing bug when neighboring peer is unreachableMatthew Jordan
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-08-30Clean up doxygen warningsMatthew Jordan
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-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