summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2012-08-15Fix bug where final queue member would not be removed from memory.Mark Michelson
If a static queue had realtime members, then there could be a potential for those realtime members not to be properly deleted from memory. If the queue's members were loaded from realtime and then all the members were deleted from the backend, then the queue would still think these members existed. The reason was that there was a short- circuit in code such that if there were no members found in the backend, then the queue would not be updated to reflect this. Note that this only affected static queues with realtime members. Realtime queues with realtime members were unaffected by this issue. (closes issue ASTERISK-19793) reported by Marcus Haas ........ Merged revisions 371306 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371313 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371324 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-13Add test instrumentationKinsey Moore
This adds test instrumentation for loading and unloading of modules and for certain actions in MeetMe to be used in the testsuite or any other consumer of AMI events. These will only be generated when Asterisk is built with TEST_FRAMEWORK enabled. (issue PQ-1131) (issue PQ-1133) ........ Merged revisions 371201 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371203 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371227 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10Fix a couple of documentation problems in app_queue.cMark Michelson
* The RemoveQueueMember app made mention of options that could be passed in, but no options are supported. I have removed the listing of options from the documentation. * The RQMSTATUS variable did not list "NOTDYNAMIC" as a possible value that could be set. (closes issue AST-949) reported by Steve Pitts (closes issue AST-954) reported by Steve Pitts ........ Merged revisions 371141 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371142 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371143 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09Correct documentation for the MeetMe x flagKinsey Moore
The documentation for the x flag for MeetMe incorrectly described its function as closing down the conference when the last marked user left. It actually causes the users with that flag to leave the conference when the last marked user exits. The functionality of this flag is not changing. ........ Merged revisions 370985 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370986 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Fix Not Unreferencing A Spied ChannelMichael L. Young
When a channel hangs up while being spied upon and the option to exit the ChanSpy application when the spied on channel hangs up is set, ast_autochan_destroy is not being called and therefore a reference to the spied upon channel is not removed. The symptom being reported was that when using func_group in the dialplan and calling "group show channels" at the cli, the spied upon channel was still being shown while "core show channels" showed that the channel was not up. This patch calls ast_autochan_destroy when a spied upon channel hangs up and the option to exit the ChanSpy application is set, removing the reference to the channel allowing the count for the group that the spied channel was part of to be decremented. (closes issue ASTERISK-17515) Reported by: Arkadiusz Malka Tested by: Alexandr Gordeev, Michael L. Young Patches: asterisk-17515-destroy-autochan.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 370952 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370954 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370955 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-30DECLINE to load confbridge if the config fails to load.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-30app_meetme: Change app_meetme support level to extended from deprecatedJonathan Rose
(closes issue ASTERISK-20134) Reported by: Leif Madsen ........ Merged revisions 370547 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-21Fix segfault introduced by conversion to ACO APITerry Wilson
The value "none" is specified in the config file as a valid value for the "video_mode" option. The code prior to the ACO conversion did not check for "none", but just ignored it and relied on the default zero value. The parsing with ACO is more strict, so without handling "none" specifically, parsing would fail. When parsing failed, but the module loaded anyway, the config info would never be stored, and one place in the code did not check for this case and would segfault. It was also possible that the aco_info struct's internals would be destroyed and used as well. This patch keeps the module from loading after parse failures, adds the "none" option to "video_mode", registers CLI functions only after parsing has completed, checks the config data for NULL before accessing it, and returns -1 on some allocation failures when initializing. (closes issue ASTERISK-20159) Reported by: Birger "WIMPy" Harzenetter Tested by: Birger "WIMPy" Harzenetter Patches: confbridge_fix3.txt uploaded by Terry Wilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Clean up ManagerEvent Dial documentationMatthew Jordan
The paragraph describing the SubEvent belongs with the SubEvent parameter itself, and not with its enum values. The order of parsing was placing the description after the last enum, which isn't correct. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Convert app_confbridge to use the config options frameworkTerry Wilson
Review: https://reviewboard.asterisk.org/r/2024/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-18Ensure that all ast_datastore_info structures are 'const'.Kevin P. Fleming
While addressing a bug, I came across a instance of 'struct ast_datastore_info' that was not declared 'const'. Since the API already expects them to be 'const', this patch changes the declarations of all existing instances that were not already declared that way. ........ Merged revisions 370183 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370184 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-10Improve Goto and GotoIf related documentationKinsey Moore
Correct documentation on labeliftrue and labeliffalse parameters of GotoIf() and update several other locations that use the same syntax. (closes issue ASTERISK-20007) Patch-by: Leif Madsen Reported-by: WIMPy ........ Merged revisions 369869 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369871 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-05AST-2012-011: Resolve heap corruption issue with voicemailKinsey Moore
The heard and deleted arrays in the voicemail state structure were not handled properly following the memory leak fix in r354890 and a fix for an invalid free in r356797. This could result in accessing and writing into freed memory. The allocation for these arrays has been reworked to avoid the possibility of invalid frees, access of freed memory, and crashes that were occurring as a result of this. Locking around accesses and modifications of the voicemail state structure members dh_arraysize, heard, and deleted has been added to prevent simultaneous modification and access when IMAP storage is in use. If IMAP storage is not in use, this locking is not compiled in. Review: https://reviewboard.asterisk.org/r/1994/ (closes issue ASTERISK-19923) Reported by: Dan Delaney Tested by: Dan Delaney, Julian Yap Patches: vm_alloc_fix.diff uploaded by kmoore (license 6273) ........ Merged revisions 369652 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369653 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-05app_mixmonitor: Fix a reference leak in manager_mixmonitor functionJonathan Rose
Manager_mixmonitor included an early return on failed executions of mixmonitor that would result in a leaked channel reference. (closes issue ASTERISK-19943) Reported by: Mark Murawski Patches: mixmonitor-trunk-368394.patch uploaded by Mark Murawski (license 5791) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29Hangup handlers - Dialplan subroutines that run when the channel hangs up.Richard Mudgett
Hangup handlers are an alternative to the h extension. They can be used in addition to the h extension. The idea is to attach a Gosub routine to a channel that will execute when the call hangs up. Whereas which h extension gets executed depends on the location of dialplan execution when the call hangs up, hangup handlers are attached to the call channel. You can attach multiple handlers that will execute in the order of most recently added first. (closes issue ASTERISK-19549) Reported by: Mark Murawski Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2002/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Add AMI event documentationMatthew Jordan
This patch adds the core changes necessary to support AMI event documentation in the source files of Asterisk, and adds documentation to those AMI events defined in the core application modules. Event documentation is built from the source by two new python scripts, located in build_tools: get_documentation.py and post_process_documentation.py. The get_documentation.py script mirrors the actions of the existing AWK get_documentation scripts, except that it will scan the entirety of a source file for Asterisk documentation. Upon encountering it, if the documentation happens to be an AMI event, it will attempt to extract information about the event directly from the manager event macro calls that raise the event. The post_process_documentation.py script combines manager event instances that are the same event but documented in multiple source files. It generates the final core-[lang].xml file. As this process can take longer to complete than a typical 'make all', it is only performed if a new make target, 'full', is chosen. Review: https://reviewboard.asterisk.org/r/1967/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Explicitly check caller hangup in app Queue rather than a polluted res2 value.Richard Mudgett
........ Merged revisions 369262 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369263 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Fix F and F(x) action logic in Queue application.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Check if PBX was started and fix F and F(x) action logic in Dial application.Richard Mudgett
........ Merged revisions 369258 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369259 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-20Remove declaration of eivr_connect_socket because it no longer exists.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Fix voicemail API tests by using the correct argument order for create/destroy.Jason Parker
........ Merged revisions 369024 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11 ........ Merged revisions 369026 from http://svn.asterisk.org/svn/asterisk/branches/10-digiumphones git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369027 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-15Remove some symbol exports that got missed in the removal of global symbols.Jason Parker
(issue AST-807) (issue AST-901) (issue AST-908) ........ Merged revisions 368998 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11 ........ Merged revisions 368999 from http://svn.asterisk.org/svn/asterisk/branches/10-digiumphones git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14Allow non-normal execution routines to be able to run on hungup channels.Richard Mudgett
* Make non-normal dialplan execution routines be able to run on a hung up channel. This is preparation work for hangup handler routines. * Fixed ability to support relative non-normal dialplan execution routines. (i.e., The context and exten are optional for the specified dialplan location.) Predial routines are the only non-normal routines that it makes sense to optionally omit the context and exten. Setting a hangup handler also needs this ability. * Fix Return application being able to restore a dialplan location exactly. Channels without a PBX may not have context or exten set. * Fixes non-normal execution routines like connected line interception and predial leaving the dialplan execution stack unbalanced. Errors like missing Return statements, popping too many stack frames using StackPop, or an application returning non-zero could leave the dialplan stack unbalanced. * Fixed the AGI gosub application so it cleans up the dialplan execution stack and handles the autoloop priority increments correctly. * Eliminated the need for the gosub_virtual_context return location. Review: https://reviewboard.asterisk.org/r/1984/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14Multiple revisions 368963,368965Jason Parker
........ r368963 | qwell | 2012-06-14 13:47:03 -0500 (Thu, 14 Jun 2012) | 14 lines Remove global symbol requirement from app_voicemail. This uses the existing "function installation" stuff that already existed for other functions, like getting message counts. (closes issue AST-807) (issue AST-901) (issue AST-908) Review: https://reviewboard.asterisk.org/r/1965/ ........ Merged revisions 368962 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11 ........ r368965 | qwell | 2012-06-14 14:04:57 -0500 (Thu, 14 Jun 2012) | 11 lines These functions that were moved need to be static. Also wrap test functions in a #ifdef. (issue AST-807) (issue AST-901) (issue AST-908) ........ Merged revisions 368964 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11 ........ Merged revisions 368963,368965 from http://svn.asterisk.org/svn/asterisk/branches/10-digiumphones git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368966 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-06-07Fix app_queue debug message use of args.options after the string has been ↵Richard Mudgett
parsed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-07Fix inverted test in app_queue for ringinuse.Richard Mudgett
Regression from -r367080 ringinuse commit. (issue ASTERISK-19536) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-07Fix reloading an unchanged file with the Config Options APITerry Wilson
Adding multiple file support broke reloading an unchanged file. This adds an enum for return values for the aco_process_* functions and ensures that the config is not applied if res is not ACO_PROCESS_OK. Review: https://reviewboard.asterisk.org/r/1979/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-05Ensure that pages and emails are sent using RFC822-compliant date formatKinsey Moore
When localization was added to app_voicemail, these headers were altered when they should have remained in en_US format for RFC compliance. This reverts the changes to those two lines. (closes issue ASTERISK-19876) ........ Merged revisions 368520 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368524 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-05Convert AST_FLAG_ANSWERED_ELSEWHERE usage to AST_CAUSE_ANSWERED_ELSEWHEREKinsey Moore
This was essentially duplicated functionality where normal channels used AST_CAUSE_ANSWERED_ELSEWHERE while local channels and queues used AST_FLAG_ANSWERED_ELSEWHERE. This removes the flag and converts that usage into AST_CAUSE_ANSWERED_ELSEWHER usage. Review: https://reviewboard.asterisk.org/r/1944 (closes issue ASTERISK-19865) Patch-by: Birger Harzenetter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Remove some extra debugging I forgot to remove in the merge of Digium phone ↵Mark Michelson
support. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Merge changes dealing with support for Digium phones.Mark Michelson
Presence support has been added. This is accomplished by allowing for presence hints in addition to device state hints. A dialplan function called PRESENCE_STATE has been added to allow for setting and reading presence. Presence can be transmitted to Digium phones using custom XML elements in a PIDF presence document. Voicemail has new APIs that allow for moving, removing, forwarding, and playing messages. Messages have had a new unique message ID added to them so that the APIs will work reliably. The state of a voicemail mailbox can be obtained using an API that allows one to get a snapshot of the mailbox. A voicemail Dialplan App called VoiceMailPlayMsg has been added to be able to play back a specific message. Configuration hooks have been added. Configuration hooks allow for a piece of code to be executed when a specific configuration file is loaded by a specific module. This is useful for modules that are dependent on the configuration of other modules. chan_sip now has a public method that allows for a custom SIP INFO request to be sent mid-dialog. Digium phones use this in order to display progress bars when files are played. Messaging support has been expanded a bit. The main visible difference is the addition of an AMI action MessageSend. Finally, a ParkingLots manager action has been added in order to get a list of parking lots. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Fix deadlock when Gosub used with alternate dialplan switches.Richard Mudgett
Attempting to remove a channel from autoservice with the channel lock held will result in deadlock. * Restructured gosub_exec() to not call ast_parseable_goto() and ast_exists_extension() with the channel lock held. (closes issue ASTERISK-19764) Reported by: rmudgett Tested by: rmudgett ........ Merged revisions 368308 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368310 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Add new config-parsing frameworkTerry Wilson
This framework adds a way to register the various options in a config file with Asterisk and to handle loading and reloading of that config in a consistent and atomic manner. Review: https://reviewboard.asterisk.org/r/1873/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368181 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-29Coverity Report: Fix issues for error type REVERSE_INULL (deprecated modules)Richard Mudgett
* Fix only issue pointed out by deprecated_REVERSE_INULL.txt for app_meetme.c in find_user(). * Change use of %i to %d in sscanf() in find_user(). The use of %i gives unexpected parsing because it can accept hex, octal, and decimal integer formats. * Changed other uses of %i in app_meetme() to use %d for consistency. (issue ASTERISK-19648) Reported by: Matt Jordan ........ Merged revisions 367906 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367907 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-24Fix Dial I option ignored if dial forked and one fork redirects.Richard Mudgett
The Dial and Queue I option is intended to block connected line updates and redirecting updates. However, it is a feature that when a call is locally redirected, the I option is disabled if the redirected call runs as a local channel so the administrator can have an opportunity to setup new connected line information. Unfortunately, the Dial and Queue I option is disabled for *all* forked calls if one of those calls is redirected. * Make the Dial and Queue I option apply to each outgoing call leg independently. Now if one outgoing call leg is locally redirected, the other outgoing calls are not affected. * Made Dial not pass any redirecting updates when forking calls. Redirecting updates do not make sense for this scenario. * Made Queue not pass any redirecting updates when using the ringall strategy. Redirecting updates do not make sense for this scenario. * Fixed deadlock potential with chan_local when Dial and Queue send redirecting updates for a local redirect. * Converted the Queue stillgoing flag to a boolean bitfield. (closes issue ASTERISK-19511) Reported by: rmudgett Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1920/ ........ Merged revisions 367678 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367679 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-24Fix crash in ConfBridge when user announcement is played for more than 2 usersMatthew Jordan
A patch introduced in r354938 made it so that ConfBridge would not attempt to play sound files if those files did not exist. Unfortunately, ConfBridge uses the same underlying function, play_sound_helper, to playback both sound files and numbers to callers. When a number is being played back, the name of the sound file is expected to be NULL. This NULL value was passed into a function that tested for the existance of a sound file and is not tolerant to NULL file names, causing a crash. This patch fixes the behavior, such that if a sound file does not exist we do not attempt to play it, but we only attempt that check if the a sound file was specified in the first place. If a sound file was not specified, we use the 'play number' logic in the helper function. (closes issue ASTERISK-19899) Reported by: Florian Gilcher Tested by: Florian Gilcher patches: asterisk-19899.diff uploaded by mjordan (license 6283) ........ Merged revisions 367562 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18app_queue: Per Member ringinuse option and deprecation of ignorebusyJonathan Rose
Adds a number of methods for controlling the setting of 'ringinuse' which is basically the same concept as the old ignorebusy setting, only now the per member setting always controls whether or not the member is actually ringed while in use. A CLI command and a manager action have been added to change a given queue member's ringinuse option while Asterisk is running and the an argument has been added for adding members with deliberately set ringinuse in queues.conf Some effort has been made to ensure compatability with dialplans and databases still referring to 'ignorebusy'. (issue ASTERISK-19536) reported by: Philippe Lindheimer Review: https://reviewboard.asterisk.org/r/1919/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18Fix a variety of memory leaksMatthew Jordan
This patch addresses a number of memory leaks in a variety of modules that were found by a static analysis tool. A brief summary of the changes: * app_minivm: free ast_str objects on off nominal paths * app_page: free the ast_dial object if the requested channel technology cannot be appended to the dialing structure * app_queue: if a penalty rule failed to match any existing rule list names, the created rule would not be inserted and its memory would be leaked * app_read: dispose of the created silence detector in the presence of off nominal circumstances * app_voicemail: dispose of an allocated unique ID field for MWI event un-subscribe requests in off nominal paths; dispose of configuration objects when using the secret.conf option * chan_dahdi: dispose of the allocated frame produced by ast_dsp_process * chan_iax2: properly unref peer in CLI command "iax2 unregister" * chan_sip: dispose of the allocated frame produced by sip_rtp_read's call of ast_dsp_process; free memory in parse unit tests * func_dialgroup: properly deref ao2 object grhead in nominal path of dialgroup_read * func_odbc: free resultset in off nominal paths of odbc_read * cli: free match_list in off nominal paths of CLI match completion * config: free comment_buffer/list_buffer when configuration file load is unchanged; free the same buffers any time they were created and config files were processed * data: free XML nodes in various places * enum: free context buffer in off nominal paths * features: free ast_call_feature in off nominal paths of applicationmap config processing * netsock2: users of ast_sockaddr_resolve pass in an ast_sockaddr struct that is allocated by the method. Failures in ast_sockaddr_resolve could result in the users of the method not knowing whether or not the buffer was allocated. The method will now not allocate the ast_sockaddr struct if it will return failure. * pbx: cleanup hash table traversals in off nominal paths; free ignore pattern buffer if it already exists for the specified context * xmldoc: cleanup various nodes when we no longer need them * main/editline: various cleanup of pointers not being freed before being assigned to other memory, cleanup along off nominal paths * menuselect/mxml: cleanup of value buffer for an attribute when that attribute did not specify a value * res_calendar*: responses are allocated via the various *_request method returns and should not be allocated in the various write_event methods; ensure attendee buffer is freed if no data exists in the parsed node; ensure that calendar objects are de-ref'd appropriately * res_jabber: free buffer in off nominal path * res_musiconhold: close the DIR* object in off nominal paths * res_rtp_asterisk: if we run out of ports, close the rtp socket object and free the rtp object * res_srtp: if we fail to create the session in libsrtp, destroy the temporary ast_srtp object (issue ASTERISK-19665) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1922 ........ Merged revisions 366880 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366881 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-15Add predial support to FollowMe.Richard Mudgett
Like the new predial feature for Dial. This adds the same b/B options to FollowMe. Review: https://reviewboard.asterisk.org/r/1910/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)Kinsey Moore
This is the starting point for the Asterisk 11: Who Hung Up work and provides a framework which will allow channel drivers to report the types of hangup cause information available in SIP_CAUSE without incurring the overhead of the MASTER_CHANNEL dialplan function. The initial implementation only includes cause generation for chan_sip and does not include cause code translation utilities. This change deprecates SIP_CAUSE and replaces its method of reporting cause codes with the new framework. This change also deprecates the 'storesipcause' option in sip.conf. Review: https://reviewboard.asterisk.org/r/1822/ (Closes issue SWP-4221) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Tweak app_dial predial documentation.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Run predial routine on local;2 channel where you would expect.Richard Mudgett
Before this patch, the predial routine executes on the ;1 channel of a local channel pair. Executing predial on the ;1 channel of a local channel pair is of limited utility. Any channel variables set by the predial routine executing on the ;1 channel will not be available when the local channel executes dialplan on the ;2 channel. * Create ast_pre_call() and an associated pre_call() technology callback to handle running the predial routine. If a channel technology does not provide the callback, the predial routine is simply run on the channel. Review: https://reviewboard.asterisk.org/r/1903/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366183 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-10Coverity Report: Fix issues for error type CHECKED_RETURN for coreJonathan Rose
(issue ASTERISK-19658) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1905/ ........ Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Coverity Report: Fix issues for error type UNINIT in Core supported modulesJonathan Rose
(issue ASTERISK-19652) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1909/ ........ Merged revisions 366048 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366049 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366051 65c4cc65-6c06-0410-ace0-fbb531ad65f3