summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2011-09-07Implement the '!' negation element to negate codecs directly in the allow ↵Tilghman Lesher
keyword. This permits the list of codecs to be specified in one configuration line, instead of two or more, generally with the aim of either allowing all codecs with the exception of a few or disallowing most but permitting a few. Review: https://reviewboard.asterisk.org/r/1411/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02Merged revisions 334297 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r334297 | rmudgett | 2011-09-02 12:15:08 -0500 (Fri, 02 Sep 2011) | 46 lines Merged revisions 334296 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r334296 | rmudgett | 2011-09-02 12:10:58 -0500 (Fri, 02 Sep 2011) | 39 lines Fix potential memory allocation failure crashes in config.c. * Added required checks to the returned memory allocation pointers to prevent crashes. * Made ast_include_rename() create a replacement ast_variable list node if the new filename is longer than the available space. Fixes potential crash and memory leak. * Factored out ast_variable_move() from ast_variable_update() so ast_include_rename() can also use it when creating a replacement ast_variable list node. * Made the filename stuffed at the end of the struct a minimum allocated size in ast_variable_new() in case ast_include_rename() changes the stored filename. * Constify struct char pointers pointing to strings stuffed at the end of the struct for: ast_variable, cache_file_mtime, and ast_config_map. * Factored out cfmtime_new() to remove inlined code and allow some struct pointers to become const. * Removed the list lock from struct cache_file_mtime that was never used. * Added doxygen comments to several structure elements and better documented what strings are stuffed at the struct end char array. * Reworked ast_config_text_file_save() and set_fn() to handle allocation failure of the include file scratch pad object tracking blank lines. * Made ast_config_text_file_save() fn[] declared with PATH_MAX to ensure it is long enough for any filename with path. Also reduced the number of container fileset buckets from a rediculus 180,000 to 1023. JIRA AST-618 Review: https://reviewboard.asterisk.org/r/1378/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-01Merged revisions 334235 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r334235 | tilghman | 2011-09-01 12:39:32 -0500 (Thu, 01 Sep 2011) | 9 lines Merged revisions 334234 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r334234 | tilghman | 2011-09-01 12:38:33 -0500 (Thu, 01 Sep 2011) | 2 lines Remove 1.6 compatibility documentation from 1.8, as it no longer applies. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-31Merged revisions 334010 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r334010 | rmudgett | 2011-08-31 10:23:11 -0500 (Wed, 31 Aug 2011) | 50 lines Merged revisions 334009 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r334009 | rmudgett | 2011-08-31 10:20:31 -0500 (Wed, 31 Aug 2011) | 43 lines Call pickup race leaves orphaned channels or crashes. Multiple users attempting to pickup a call that has been forked to multiple extensions either crashes or fails a masquerade with a "bad things may happen" message. This is the scenario that is causing all the grief: 1) Pickup target is selected 2) target is marked as being picked up in ast_do_pickup() 3) target is unlocked by ast_do_pickup() 4) app dial or queue gets a chance to hang up losing calls and calls ast_hangup() on target 5) SINCE A MASQUERADE HAS NOT BEEN SETUP YET BY ast_do_pickup() with ast_channel_masquerade(), ast_hangup() completes successfully and the channel is no longer in the channels container. 6) ast_do_pickup() then calls ast_channel_masquerade() to schedule the masquerade on the dead channel. 7) ast_do_pickup() then calls ast_do_masquerade() on the dead channel 8) bad things happen while doing the masquerade and in the process ast_do_masquerade() puts the dead channel back into the channels container 9) The "orphaned" channel is visible in the channels list if a crash does not happen. This patch does the following: * Made ast_hangup() set AST_FLAG_ZOMBIE on a successfully hung-up channel and not release the channel lock until that has happened. * Made __ast_channel_masquerade() not setup a masquerade if either channel has AST_FLAG_ZOMBIE set. * Fix chan_agent misuse of AST_FLAG_ZOMBIE since it would no longer work. (closes issue ASTERISK-18222) Reported by: Alec Davis Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer (closes issue ASTERISK-18273) Reported by: Karsten Wemheuer Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer Review: https://reviewboard.asterisk.org/r/1400/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29Merged revisions 333681 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r333681 | twilson | 2011-08-29 12:28:59 -0500 (Mon, 29 Aug 2011) | 7 lines Use realtime text when it is negotiated This patch make use of wirte_text() realtime text instead of send_text() if T.140 is in native formats. ASTERISK-17937 Review: https://reviewboard.asterisk.org/r/1356/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Merged revisions 332940 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332940 | rmudgett | 2011-08-22 16:23:40 -0500 (Mon, 22 Aug 2011) | 14 lines Merged revisions 332939 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332939 | rmudgett | 2011-08-22 16:22:24 -0500 (Mon, 22 Aug 2011) | 7 lines Minor code optimizations. * Simplify ast_category_browse() logic for easier understanding. * Remove dead code in ast_variable_delete() and simplify some of its logic. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Merged revisions 332817 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332817 | mjordan | 2011-08-22 13:15:51 -0500 (Mon, 22 Aug 2011) | 4 lines Review: https://reviewboard.asterisk.org/r/1364/ This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined. It also adds initial usage of this event to app_voicemail. The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Merged revisions 332761 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332761 | rmudgett | 2011-08-22 12:05:35 -0500 (Mon, 22 Aug 2011) | 22 lines Merged revisions 332759 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332759 | rmudgett | 2011-08-22 12:00:03 -0500 (Mon, 22 Aug 2011) | 15 lines Memory leak reading realtime database variable list. Calling ast_load_realtime() can leak the last list node if the read list only contains empty variable value items. * Fixed list filter loop in ast_load_realtime() to delete the list node immediately instead of the next time through the loop. The next time through the loop may not happen if the node to delete is the last in the list. (issue ASTERISK-18277) (issue ASTERISK-18265) Patches: jira_asterisk_18265_v1.8_config.patch (license #5621) patch uploaded by rmudgett ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Add option for logging congested calls as CONGESTION instead of NO_ANSWER in CDRJonathan Rose
This patch adds a CDR option to cdr.conf that will allow CDR files to log calls ending with congestion in a way that is unique from other unanswered calls. (closes issue ASTERISK-14842) Reported by: Alec Davis Patches: cdr_congestion.diff.txt (License #5546) patch uploaded by Alec Davis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-18Merged revisions 332560 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332560 | twilson | 2011-08-18 16:34:04 -0500 (Thu, 18 Aug 2011) | 12 lines Merged revisions 332559 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332559 | twilson | 2011-08-18 16:26:01 -0500 (Thu, 18 Aug 2011) | 5 lines Fix possible error on stringification of IPv4-mapped addrs The FreeBSD netsock2 test has been failing for a while. We were pasing sa->len to getnameinfo instead of sa_tmp->len. ASTERISK-18289 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16Merged revisions 332101 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332101 | rmudgett | 2011-08-16 12:17:28 -0500 (Tue, 16 Aug 2011) | 140 lines Merged revisions 332100 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332100 | rmudgett | 2011-08-16 11:31:36 -0500 (Tue, 16 Aug 2011) | 133 lines Fix multiple parking issues. JIRA ASTERISK-17183 Multi-parkinglot directs calls to wrong parkinglot. JIRA ASTERISK-17870 Cannot retrieve parked calls. JIRA ASTERISK-17430 ParkedCall() with no extension should pickup first available call and does not. JIRA AST-576 Issues with parking lots * Removed searching for parking lots by extension. Parking lots can only be found by the parking lot name since parking lot access extensions and spaces are not guaranteed to be unique. * Added parking_lot_name option to the Park and ParkedCall applications. Updated documentation for Park and ParkedCall applications. * Add parkext_exclusive configuration option to make parking entry extensions specify which parking lot they access. (closes issue ASTERISK-17183) Reported by: David Cabrejos Tested by: rmudgett, David Cabrejos (closes issue ASTERISK-17870) Reported by: Remi Quezada (closes issue ASTERISK-17430) Reported by: Philippe Lindheimer JIRA ASTERISK-17452 Parking_offset not used JIRA AST-624 'next' setting for findslot does nothing * Reimplemented since findslot feature option broken by -r114655. (closes issue ASTERISK-17452) Reported by: David Woolley Tested by: rmudgett JIRA ASTERISK-15792 Dialplan continues execution after transfer to park. This happens for DTMF attended transfer, DTMF blind transfer, and DTMF one-touch-parking if the party initiating these features also initiated the call. * Fixed the return code from the affected builtin features when parking a call. (closes issue ASTERISK-15792) Reported by: Mat Murdock Tested by: rmudgett, twilson JIRA AST-607 The courtesytone is not playing to the expected call when picking up a parked call. This is mostly a documentation problem. However, the option is not reset to the default when features.conf is reloaded. * Updated features.conf.sample documentation for courtesytone and parkedplay options. * Reset the parkedplay option to default when features.conf is reloaded. JIRA AST-615 AMI Park action followed by features reload results in orphaned channels in parking lot. * Reloading features.conf will not touch parking lots that have calls still parked in them. Reload again at a later time. Misc additional fixes: * Added unit test for parking lot dialplan usage checking. * Made update connected line when a parked call is retrieved from a parking lot. * Made retrieved parked call stop ringing or MOH depending upon how the call was waiting in the parking lot. * Made CLI "features show" indicate if the parking lot is enabled for use. * Added PARKINGDYNEXTEN channel variable to allow dynamic parking lots to specify the parking lot access extension. * Made AMI ParkedCalls action ParkedCall events have a Parkinglot header. * Made AMI ParkedCalls action ParkedCallsComplete event have a Total header. * Fixed potential deadlock from AMI Park action holding channel locks while calling masq_park_call(). * Fixed several places where ast_strdupa() were used inside of loops. (Mostly fixed by refactoring the loop body into its own function.) * Fixed copy_parkinglot() copying too much from the source parking lot. Extracted the parking lot configuration settings into struct parkinglot_cfg. * Refactored courtesytone playing code to put the channel not playing the tone in autoservice. * Fix when pbx-parkingfailed is played that the other channel is put in autoservice if it exists. * Fixed parkinglot reference leak in parked_call_exec() error paths. * Fixed parkinglot_unref() use of parkinglot after it was unreffed. * Made destroy the struct ast_parkinglot parkings lock when done. * Refactored the features.conf parking lot configuration code to eliminate redundancy. * Fixed feature reload to better protect parking lots. * Fixed parking lot container reference leak in handle_parkedcalls(). * Fixed the total count in handle_parkedcalls(). Review: https://reviewboard.asterisk.org/r/1358/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-15Merged revisions 331894 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331894 | pabelanger | 2011-08-15 11:22:45 -0400 (Mon, 15 Aug 2011) | 12 lines Merged revisions 331886 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331886 | pabelanger | 2011-08-15 11:21:16 -0400 (Mon, 15 Aug 2011) | 5 lines Fix noisy message when briding channels (closes issue ASTERISK-18270) Reported by: Federico Alves ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-12Merged revisions 331654 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331654 | kmoore | 2011-08-12 11:21:37 -0500 (Fri, 12 Aug 2011) | 19 lines Merged revisions 331649 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331649 | kmoore | 2011-08-12 11:20:25 -0500 (Fri, 12 Aug 2011) | 12 lines Logger does not warn of failure to open logging channels Currently, logger only prints an error message to stderr when it fails to open a logger channel where many users will not see it because the logger lock is held. The alternative provided by this patch is to log the error to all attached consoles in the hopes that it will be easier to see. Additionally, this patch prevents the failed logger channel from being added to the list where it would silently fail on each call to the Asterisk logger. (closes issue ASTERISK-16231) Review: https://reviewboard.asterisk.org/r/1338 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10Merged revisions 331462 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331462 | rmudgett | 2011-08-10 15:41:35 -0500 (Wed, 10 Aug 2011) | 37 lines Merged revisions 331461 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331461 | rmudgett | 2011-08-10 15:29:59 -0500 (Wed, 10 Aug 2011) | 30 lines Output of queue log not started until logger reloaded. ASTERISK-15863 caused a regression with queue logging. The output of the queue log is not started until the logger configuration is reloaded. * Queue log initialization is completely delayed until the first message is posted to the queue log system. Including the initial opening of the queue log file. * Fixed rotate_file() ROTATE strategy to give the file just rotated out to the configured exec function after rotate. Just like the other strategies. * Fixed logger reload to always post the queue reload entry instead of just if there is a queue log file. * Refactored some code to eliminate some redundancy and to reduce stack utilization. (closes issue ASTERISK-17036) JIRA SWP-2952 Reported by: Juan Carlos Valero Patches: jira_asterisk_17036_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett (closes issue ASTERISK-18208) Reported by: Christian Pinedo Review: https://reviewboard.asterisk.org/r/1333/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10Merged revisions 331420 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r331420 | rmudgett | 2011-08-10 14:07:53 -0500 (Wed, 10 Aug 2011) | 2 lines Make sure feature_request_and_dial() initializes outstate if passed in. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10Merged revisions 331418 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r331418 | rmudgett | 2011-08-10 13:25:08 -0500 (Wed, 10 Aug 2011) | 6 lines Revert -r318141. It was a band-aid that only partially fixed parking. A better fix is on reviewboard review 1358. (issue ASTERISK-17374) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10Merged revisions 331316 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331316 | kmoore | 2011-08-10 08:48:41 -0500 (Wed, 10 Aug 2011) | 15 lines Merged revisions 331315 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331315 | kmoore | 2011-08-10 08:47:46 -0500 (Wed, 10 Aug 2011) | 8 lines AMI action ModuleReload returns Error if Module: missing or empty An empty string was not being checked for properly causing identification of the module to be reloaded to fail and return an Error with message "No such module." (closes issue AST-616) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09Merged revisions 331265 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331265 | rmudgett | 2011-08-09 18:12:49 -0500 (Tue, 09 Aug 2011) | 22 lines Merged revisions 331248 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331248 | rmudgett | 2011-08-09 17:12:59 -0500 (Tue, 09 Aug 2011) | 15 lines Misc minor items found in code. * Add some reentrancy protection in pbx.c when creating the contexts_table hash table. * Fix inverted test in chan_sip.c conditional code. * Fix uninitialized variable and use of the wrong variable in chan_iax2.c. * Fix test of return value in app_parkandannounce.c. Explicitly testing for -1 is bad if the function does not actually return that value when it fails. * Fixup some comments and add some curly braces in features.c. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09Allow ENUM query functions to report lookup errorsKinsey Moore
The ENUM dialplan functions do not report DNS query errors properly. It is useful to differentiate between failed query (e.g. non-existent domain) vs. no data records of the appropriate type. This is required to make overlapped dialing work. (closes issue ASTERISK-13769) Review: https://reviewboard.asterisk.org/r/1355/ Patch-by: Timo Teras git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-08Merged revisions 331041 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r331041 | twilson | 2011-08-08 16:12:51 -0500 (Mon, 08 Aug 2011) | 6 lines Replace AMI Unlink events with Bridge events A previous update converted some of the Link and Unlink events to Bridge events, but a couple of Unlink events were missed. This patch rectifies the situation. (closes issues ASTERISK-17455) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-03Merged revisions 330763 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r330763 | kmoore | 2011-08-03 10:15:26 -0500 (Wed, 03 Aug 2011) | 16 lines Merged revisions 330762 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r330762 | kmoore | 2011-08-03 10:14:36 -0500 (Wed, 03 Aug 2011) | 9 lines editing files in main/editline does not ensure rebuild of libedit.a When editing a source file in main/editline, the build system does not rebuild libedit.a and uses the already existing one instead. Adding a PHONY to CHECK_SUBDIR fixes this problem. (closes issue ASTERISK-16221) Patch-by: Walter Doekes ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-01Merged revisions 330434 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r330434 | kmoore | 2011-08-01 10:23:29 -0500 (Mon, 01 Aug 2011) | 16 lines Merged revisions 330433 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r330433 | kmoore | 2011-08-01 10:22:10 -0500 (Mon, 01 Aug 2011) | 9 lines Incorrect playback for Spanish in some circumstances When you say the time in spanish and it is 01:00 - 01:59 or 13:00 - 13:59 you must use female pronunciation "1F". The function "say_date_with_format_es" does not take this in account. (closes ASTERISK-15016) Patch-by: Luis Jimenez ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-31Fixed compiler warning and a couple prototype mismatches.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-31Merged revisions 330369 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r330369 | rmudgett | 2011-07-30 18:57:56 -0500 (Sat, 30 Jul 2011) | 11 lines Merged revisions 330368 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r330368 | rmudgett | 2011-07-30 18:56:29 -0500 (Sat, 30 Jul 2011) | 4 lines Remove some redundant locking code in ast_do_masquerade(). Also updated some comments. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-30Merged revisions 330312 via svnmerge from Gregory Nietsky
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r330312 | irroot | 2011-07-30 17:34:41 +0200 (Sat, 30 Jul 2011) | 15 lines Merged revisions 330311 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r330311 | irroot | 2011-07-30 17:25:16 +0200 (Sat, 30 Jul 2011) | 9 lines prevent double masqurading channels when one is been hung up and deadlock avoidance is used. There is a race condition in ast_do_masquerade / ast_hangup (at least) Reported by me signed off by schmidts with input from David Vossel Review: https://reviewboard.asterisk.org/r/1323/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.Russell Bryant
There is a fairly common pattern making its way through the code base where we put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER. The purpose is so that it can be passed into the object hash function. However, this really seems like a hack and potentially error prone. This patch is a first stab at approach to avoid having to do that. It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these situations. Then, the hash function can know whether it was given an object or some custom data to hash. The patch also changes some uses of ao2_find() for iax2_user and iax2_peer objects to reflect how OBJ_KEY would be used. So long, and thanks for all the fish. Review: https://reviewboard.asterisk.org/r/1184/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-28Merged revisions 330108 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r330108 | twilson | 2011-07-28 16:44:31 -0500 (Thu, 28 Jul 2011) | 9 lines Merged revisions 330107 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r330107 | twilson | 2011-07-28 16:42:41 -0500 (Thu, 28 Jul 2011) | 2 lines Make console colors work for TERM=xterm-256color ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27reverting 329840 due to failing tests. Going to change this feature to be ↵Jonathan Rose
purely optional. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27Adds cdr logging of calls resulting in CONGESTIONJonathan Rose
Applies a patch made a long time ago by alecdavis which adds a CDR feature for logging calls that failed due to congestion. (closes issue #15907) Reported by: alecdavis Patches: cdr_congestion.diff.txt uploaded by alecdavis (license #5546) Review: https://reviewboard.asterisk.org/r/454/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27Merged revisions 329670 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329670 | seanbright | 2011-07-27 11:25:53 -0400 (Wed, 27 Jul 2011) | 2 lines Sort the module list so that 'module show' is alphabetical. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-26Merged revisions 329528 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r329528 | jrose | 2011-07-26 08:52:34 -0500 (Tue, 26 Jul 2011) | 24 lines Merged revisions 329527 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r329527 | jrose | 2011-07-26 08:25:35 -0500 (Tue, 26 Jul 2011) | 17 lines Fixes some voicemail forwarding behavior based around prepend mode. Formerly, prepend forwarding would have the user record a message with no useful prompt and an expectation for the user to push a button on the phone when finished recording. If a length of silence was detected instead, the recording would be canceled and the user would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording would also bug out in the sense that they would write over the original message and get sent to the recipient regardless of whether they timed out or were accepted. This patch fixes this issue and adds a prompt which will be played after a timeout informing the user that they needed to press a button. Currently, the sound files that we have are somewhat inadquate for this, so after the call we simply have Allison say "Please try again. Then press pound." which actually relies on two separate sound files. Just one would be more appropriate. reporter: Vlad Povorozniuc Review: https://reviewboard.asterisk.org/r/1327/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25Merged revisions 329472 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r329472 | pabelanger | 2011-07-25 15:55:33 -0400 (Mon, 25 Jul 2011) | 9 lines Merged revisions 329471 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r329471 | pabelanger | 2011-07-25 15:49:40 -0400 (Mon, 25 Jul 2011) | 2 lines Decrease verbose messages to debug, to help clean up CLI. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25dsp_process was enhanced to work with alaw and ulaw in addition to slin.Gregory Nietsky
noticed that some functions could be refactored here it is. Reported by: irroot Tested by: irroot, mnicholson Review: https://reviewboard.asterisk.org/r/1304/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22Merged revisions 329334 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329334 | rmudgett | 2011-07-22 16:14:22 -0500 (Fri, 22 Jul 2011) | 1 line Make use less redundant loop construct for iterating over hints. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22Merged revisions 329331 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r329331 | rmudgett | 2011-07-22 15:43:07 -0500 (Fri, 22 Jul 2011) | 55 lines Merged revisions 329299 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r329299 | rmudgett | 2011-07-22 10:44:58 -0500 (Fri, 22 Jul 2011) | 48 lines Deadlocks dealing with dialplan hints during reload. There are two remaining different deadlocks reported dealing with dialplan hints. The deadlock in ASTERISK-17666 is caused by invalid locking order in ast_remove_hint(). The hints container must be locked before the hint object. The deadlock in ASTERISK-17760 is caused by a catch-22 situation in handle_statechange(). The deadlock is caused by not having the conlock before calling the watcher callbacks. Unfortunately, having that lock causes a different deadlock as reported in ASTERISK-16961. * Fixed ast_remove_hint() locking order. * Made handle_statechange() no longer call the watcher callbacks holding any locks that matter. * Made hint ao2 destructor do the watcher callbacks for extension deactivation to guarantee that they get called. * Fixed hint reference leak in ast_add_hint() if the callback container constructor failed. * Fixed hint reference leak in complete_core_show_hint() for every hint it found for CLI tab completion. * Adjusted locking in ast_merge_contexts_and_delete() for safety. * Added context_merge_lock to prevent ast_merge_contexts_and_delete() and handle_statechange() from interfering with each other. * Fixed ast_change_hint() not taking into account that the extension is used for the hash key. (closes issue ASTERISK-17666) Reported by: irroot Tested by: irroot JIRA SWP-3318 (closes issue ASTERISK-17760) Reported by: Byron Clark Tested by: irroot JIRA SWP-3393 Review: https://reviewboard.asterisk.org/r/1313/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21Merged revisions 329257 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329257 | russell | 2011-07-21 15:22:36 -0500 (Thu, 21 Jul 2011) | 2 lines s/1.10/10.0/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21Merged revisions 329145 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r329145 | rmudgett | 2011-07-21 11:52:17 -0500 (Thu, 21 Jul 2011) | 16 lines Merged revisions 329144 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r329144 | rmudgett | 2011-07-21 11:46:21 -0500 (Thu, 21 Jul 2011) | 9 lines Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked! This appears to be a leftover from when ast_channel was converted to ao2 objects. Simply removed the extraneous unlock. (closes issue ASTERISK-17772) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19Merged revisions 328824 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328824 | kmoore | 2011-07-19 13:05:21 -0500 (Tue, 19 Jul 2011) | 18 lines Merged revisions 328823 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328823 | kmoore | 2011-07-19 12:57:18 -0500 (Tue, 19 Jul 2011) | 11 lines RTP bridge away with inband DTMF and feature detection When deciding whether Asterisk was allowed to bridge the call away from the core, chan_sip did not take into account the usage of features on dialed channels that require monitoring of DTMF on channels utilizing inband DTMF. This would cause Asterisk to allow the call to be locally or remotely bridged, preventing access to the data required to detect activations of such features. (closes 17237) Review: https://reviewboard.asterisk.org/r/1302/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-18Merged revisions 328609 via svnmerge from Mark Murawki
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328609 | markm | 2011-07-18 08:37:53 -0400 (Mon, 18 Jul 2011) | 15 lines Merged revisions 328593 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328593 | markm | 2011-07-18 08:06:50 -0400 (Mon, 18 Jul 2011) | 8 lines Fixed invalid read and null pointer deref on asterisk shutdown. In some cases when starting asterisk with -c and hitting control-c to shutdown, there will be an invalid read and null pointer deref causing a crash. (closes issue ASTERISK-17927) Reported by: Mark Murawski Tested by: Mark Murawski, Kinsey Moore, Tilghman Lesher ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-15Merged revisions 328329 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.10 ........ r328329 | rmudgett | 2011-07-14 19:19:32 -0500 (Thu, 14 Jul 2011) | 2 lines Make hint watcher callback take const strings for context and exten parameters. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328344 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-14Merged revisions 328162 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.10 ........ r328162 | mnicholson | 2011-07-14 12:46:32 -0500 (Thu, 14 Jul 2011) | 3 lines tune the v21 preamble detector to properly detect the desired sequence of hits and misses ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12Merged revisions 327950 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327950 | kpfleming | 2011-07-12 17:53:53 -0500 (Tue, 12 Jul 2011) | 14 lines Correct double-free situation in manager output processing. The process_output() function calls ast_str_append() and xml_translate() on its 'out' parameter, which is a pointer to an ast_str buffer. If either of these functions need to reallocate the ast_str so it will have more space, they will free the existing buffer and allocate a new one, returning the address of the new one. However, because process_output only receives a pointer to the ast_str, not a pointer to its caller's variable holding the pointer, if the original ast_str is freed, the caller will not know, and will continue to use it (and later attempt to free it). (reported by jkroon on #asterisk-dev) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12do v21 detection instead of CED detection for the fax gatewayMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12Send video update frame to new video source in follow_talker correctly.David Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11Updates follow_talker video_mode in confbridge application.David Vossel
follow_talker mode originally echoed the same video stream to all participants. As the primary talker switched around, the video stream would result in the talker seeing themselves. Now the primary talker sees the last person who was talking rather than themselves. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11Merged revisions 327512 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327512 | mnicholson | 2011-07-11 08:53:59 -0500 (Mon, 11 Jul 2011) | 2 lines reset our buffer each iteration when doing variable substitution ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11Merged revisions 327411 via svnmerge from Tzafrir Cohen
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327411 | tzafrir | 2011-07-11 13:46:34 +0300 (ב', 11 יול 2011) | 5 lines fix building the Debian armhf (HardFloat) port Fixes http://buildd.debian-ports.org/status/fetch.php?pkg=asterisk&arch=armhf&ver=1%3A1.8.4.4~dfsg-2&stamp=1309935385 (Missing pthreads) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08Merged revisions 327106 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327106 | mnicholson | 2011-07-08 14:52:51 -0500 (Fri, 08 Jul 2011) | 11 lines Reset our ast_str before passing it on to dialplan function backends. It is possible for a dialplan backend to not modify the given buffer or ast_str and still return success. This causes any previous value stored in the buffer to be used as if the new function call provided it. Some functions also append to the given buffer assuming it is empty. The test_substitution unit test has also been modified to detect this problem. (closes issue ASTERISK-17878) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08Merged revisions 326985 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r326985 | rmudgett | 2011-07-07 20:08:05 -0500 (Thu, 07 Jul 2011) | 12 lines Some code cleanup in pbx.c * Mostly comment and format changes. * ast_context_remove_extension_callerid() and ast_add_extension_nolock() will write lock the found specific context. * ast_context_find() will now tolerate a NULL name. * Eliminated some inlined versions of find_context() and find_context_locked(). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327000 65c4cc65-6c06-0410-ace0-fbb531ad65f3