summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-05Add fixes and cleanup to app_alarmreceiver.Mark Michelson
This work comes courtesy of Pedro Kiefer (License #6407) The work was posted to review board by Kaloyan Kovachev (License #5506) (closes issue ASTERISK-16668) Reported by Grant Crawshay (closes issue ASTERISK-16694) Reported by Fred van Lieshout (closes issue ASTERISK-18417) Reported by Kostas Liakakis (closes issue ASTERISK-19435) Reported by Deon George (closes issue ASTERISK-20157) Reported by Pedro Kiefer (closes issue ASTERISK-20158) Reported by Pedro Kiefer (closes issue ASTERISK-20224) Reported by Pedro Kiefer Review: https://reviewboard.asterisk.org/r/2075 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05Fix memory leaks in app_voicemail when using IMAP storage or realtime configMatthew Jordan
This patch fixes two memory leaks: 1. When find_user is called with NULL as its first parameter, the voicemail user returned is allocated on the heap. The inboxcount2 function uses find_user in such a fashion when counting new messages, and fails to free the resulting voicemail user object. 2. When populate_defaults is called on a voicemail user, it wipes whatever flags have been set on the object by copying over the global flags object. If the VM_ALLOCED flag was ste on the voicemail user prior to doing so, that flag is removed. This leaks the voicemail user when free_user is later called. (closes issue ASTERISK-19155) Reported by: Filip Jenicek patches: asterisk.patch2 uploaded by Filip Jenicek (license 6277) Patch slightly modified for this commit. Review: https://reviewboard.asterisk.org/r/2096 ........ Merged revisions 372268 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372288 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372289 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05LDAP Realtime Peers Cannot RegisterDarren Sessions
Prior to 1.8, it was not necessary for an explicit "type" to be set for an asterisk LDAP realtime peer. Now the routine find_peer actually checks the type field during registration and fails to find the peer if it is not set. The attached patch makes the realtime type equal whatever type is being searched for if the type is 0 upon return from routine build_peer. (closes issue ASTERISK-17222) Reported by: John Covert Patch by: David Vossel Tested by: Darren Sessions Review: https://reviewboard.asterisk.org/r/2095/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05Fix breakage caused by last merge. Missing a variable for 11 and trunk.Michael L. Young
........ Merged revisions 372266 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05dsp.c: Fix multiple issues when no-interdigit delay is present, and fast ↵Alec L Davis
DTMF 50ms/50ms Revert DTMF hit/miss detector to original -r349249 method with some changes, remove unnecessary; 1. reseting of hits=0, when no signal, only need to set it once. 2. incrementing of hits, when the hit is the same as the current hit. 3. setting of lasthit, when it's the same as before. Change HITS_TO_BEGIN to 2, MISSES_TO_END to 3 & 3 spelling mistakes (closes issue ASTERISK-19610) alecdavis (license 585) Reported by: Jean-Philippe Lord Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/2085/ ........ Merged revisions 372239 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372240 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372241 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05dsp.c: optimize goerztzel sample loops, in dtmf_detect, mf_detect and ↵Alec L Davis
tone_detect use a temporary short int when repeatedly used to call goertzel_sample. alecdavis (license 585) Reported by: alecdavis Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/2093/ ........ Merged revisions 372212 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372213 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372214 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05Fix Incrementing Sequence Number For Retransmitted DTMF End PacketsMichael L. Young
In Asterisk 1.4+, a fix was put in place to increment the sequence number for retransmitted DTMF end packets. With the introduction of the RTP engine API in 1.8, the sequence number was no longer being incremented. This patch fixes this regression as well as cleans up a few lines that were not doing anything. (closes issue ASTERISK-20295) Reported by: Nitesh Bansal Tested by: Michael L. Young Patches: 01_rtp_event_seq_num.patch uploaded by Nitesh Bansal (license 6418) asterisk-20295-dtmf-fix-cleanup.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2083/ ........ Merged revisions 372185 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372198 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372199 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05Fix memory leak when CEL is successfully written to PostgreSQL databaseMatthew Jordan
PQClear is not called when the result object of a call to PQExec has a status of PGRES_COMMAND_OK. Interestingly enough, the off nominal case was handled properly, so this memory leak only occurred when CEL records were successfully written. This patch properly clears the result in the nominal code path. (closes issue ASTERISK-19991) Reported by: Etienne Lessard Tested by: Etienne Lessard patches: mem_leak_cel_pgsql.patch uploaded by Etienne Lessard (license #6394) ........ Merged revisions 372158 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372165 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372175 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04app_queue: PAUSEALL/UNPAUSEALL logged only if interface is a queue memberJonathan Rose
Adding UPGRADE.txt entry for r372148 (issue AST-946) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04app_queue: Only log PAUSEALL/UNPAUSEALL when 1+ memebers changed.Jonathan Rose
Prior to this patch, if pause or unpause was issued on an interface without specifying a specific queue, a PAUSEALL or UNPAUSEALL event would be logged in the queue log even if that interface wasn't a member of any queues. This patch changes it so that these events are only logged when at least one member of any queue exists for that interface. (closes issue AST-946) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2079/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04Fix issue where SIP devices were not notified when custom devices changed to ↵Mark Michelson
"ringing". The problem had to do with logic used when checking for what the oldest ringing channel was. The problem was that if no channel was found, then no notification would be sent. For custom device states, there is no associated channel, so no notification would get sent. This fixes the issue by still sending the notification even if no associated channel can be found for a ringing device state change. (closes issue ASTERISK-20297) Reported by Noah Engelberth ........ Merged revisions 372137 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04Prevent crash from using app_page with no confbridge.conf file provided.Mark Michelson
Also prevents other potential crashes when using aco API with uninitialized aco_info structs. (closes issue ASTERISK-20305) reported by Noah Engelberth Tested by Noah Engelberth Review: https://reviewboard.asterisk.org/r/2086 ........ Merged revisions 372135 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-31Prevent local RTP bridges from sending inappropriate formats to participants.Mark Michelson
A change for Asterisk 11 caused a check for failure to incorrectly check the return value. This resulted in the possibility of transmitting media that a party had not negotiated. If this media happened to be G.729, then this could potentially result in one-way audio if no G.729 translators are installed. (closes issue ASTERISK-20296) reported by NITESH BANSAL ........ Merged revisions 372118 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30Prevent crash on shutdown due to refcount error on queues container.Mark Michelson
When app_queue is unloaded, the queues container has its refcount decremented, potentially to 0. Then the taskprocessor responsible for handling device state changes is unreferenced. If the taskprocessor happens to be just about to run its task, then it will create and destroy an iterator on the queues container. This can cause the refcount on the queues container to increase to 1 and then back to 0. Going back to 0 a second time results in double frees. This failure was seen periodically in the testsuite when Asterisk would shut down. ........ Merged revisions 372089 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372090 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372091 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30Help prevent ringing queue members from being rung when ringinuse set to no.Mark Michelson
Queue member status would not always get updated properly when the member was called, thus resulting in the member getting multiple calls. With this change, we update the member's status at the time of calling, and we also check to make sure the member is still available to take the call before placing an outbound call. (closes issue ASTERISK-16115) reported by nik600 Patches: app_queue.c-svn-r370418.patch uploaded by Italo Rossi (license #6409) ........ Merged revisions 372048 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372049 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372050 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30AST-2012-013: Resolve ACL rules being ignored during calls by some IAX2 peersMatthew Jordan
When an IAX2 call is made using the credentials of a peer defined in a dynamic Asterisk Realtime Architecture (ARA) backend, the ACL rules for that peer are not applied to the call attempt. This allows for a remote attacker who is aware of a peer's credentials to bypass the ACL rules set for that peer. This patch ensures that the ACLs are applied for all peers, regardless of their storage mechanism. (closes issue ASTERISK-20186) Reported by: Alan Frisch Tested by: mjordan, Alan Frisch ........ Merged revisions 372028 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30AST-2012-012: Resolve AMI User Unauthorized Shell Access through ExternalIVRMatthew Jordan
The AMI Originate action can allow a remote user to specify information that can be used to execute shell commands on the system hosting Asterisk. This can result in an unwanted escalation of permissions, as the Originate action, which requires the "originate" class authorization, can be used to perform actions that would typically require the "system" class authorization. Previous attempts to prevent this permission escalation (AST-2011-006, AST-2012-004) have sought to do so by inspecting the names of applications and functions passed in with the Originate action and, if those applications/functions matched a predefined set of values, rejecting the command if the user lacked the "system" class authorization. As noted by IBM X-Force Research, the "ExternalIVR" application is not listed in the predefined set of values. The solution for this particular vulnerability is to include the "ExternalIVR" application in the set of defined applications/functions that require "system" class authorization. Unfortunately, the approach of inspecting fields in the Originate action against known applications/functions has a significant flaw. The predefined set of values can be bypassed by creative use of the Originate action or by certain dialplan configurations, which is beyond the ability of Asterisk to analyze at run-time. Attempting to work around these scenarios would result in severely restricting the applications or functions and prevent their usage for legitimate means. As such, any additional security vulnerabilities, where an application/function that would normally require the "system" class authorization can be executed by users with the "originate" class authorization, will not be addressed. Instead, the README-SERIOUSLY.bestpractices.txt file has been updated to reflect that the AMI Originate action can result in commands requiring the "system" class authorization to be executed. Proper system configuration can limit the impact of such scenarios. (closes issue ASTERISK-20132) Reported by: Zubair Ashraf of IBM X-Force Research ........ Merged revisions 371998 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371999 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372000 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372001 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-30Restore CODING-GUIDELINES to doc folderMatthew Jordan
In r294740, the CODING-GUIDELINES was removed from the doc folder in favor of the content on the Asterisk wiki. Some folks still look in the doc folder initially for coding guideline suggestions; as such, this patch adds a CODING-GUIDELINES file back into the doc folder. The content of the file merely points to the correct page on the Asterisk wiki where the coding guidelines currently live. (closes issue ASTERISK-20279) Reported by: Andrew Latham Patches: CODING-GUIDELINES.diff uploaded by Andrew Latham (license 5985) ........ Merged revisions 371961 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371962 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371963 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29Ensure alignment of in[] field in MD5Context struct.Richard Mudgett
The struct MD5Context character buffer is cast to an int32_t* without making sure that said buffer is aligned. Since the buffer follows two uint32_t's, the chance of 'in' being (32 bits) unaligned is nil in practice. But adding code to ensure that 'in' stays aligned costs nothing and removes all doubts about the casts being safe. (closes issue ASTERISK-20241) Reported by: Walter Doekes Patches: tmp.diff (license #5674) patch uploaded by Walter Doekes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29Fix compile errors.Richard Mudgett
........ Merged revisions 371950 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29app_meetme: Adding test events for following activity in MeetMe.Jonathan Rose
........ Merged revisions 371919 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371920 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371921 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29Fix theoretical compile error with HAVE_EPOLL.Richard Mudgett
Really shows how much epoll is used since it had not been reported yet. ........ Merged revisions 371893 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29Initialize file descriptors for dummy channels to -1.Richard Mudgett
Dummy channels usually aren't read from, but functions like SHELL and CURL use autoservice on the channel. (closes issue ASTERISK-20283) Reported by: Gareth Palmer Patches: svn-371580.patch (license #5169) patch uploaded by Gareth Palmer (modified) ........ Merged revisions 371888 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371890 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371891 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Change manager event to confirm SIPqualifypeer into an ackJonathan Rose
Matt Jordan informed me that it was more appropriate to use an astman_send_ack here instead of making an event response. I've also used this opportunity to update UPGRADE.txt to mention this change in behavior. (issue AST-969) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29Fix hangup cause passthrough regression.Richard Mudgett
The v1.8 -r369258 change to fix the F and F(x) action logic introduced a regression in passing the hangup cause from the called channel to the caller channel. (closes issue ASTERISK-20287) Reported by: Konstantin Suvorov Patches: app_dial_hangupcause.patch (license #6421) patch uploaded by Konstantin Suvorov (modified) Tested by: rmudgett ........ Merged revisions 371860 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371861 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371862 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Send 408 on retransmit timeout instead of 603Jonathan Rose
(closes issue ASTERISK-20124) Reported by: Walter Doekes ........ Merged revisions 371824 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371825 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371845 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Send a manager event to confirm SIPqualifypeer completesJonathan Rose
Prior to this patch, Issuing SIPqualifypeer either resulted in an error or if it succeeded, a few \r\ns. This patch adds a SIPqualifypeerComplete event issued as a response when the command is successfully executed. (closes issue AST-969) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27Fix misleading documentation in agents.conf.sample regarding ackcall usage.Mark Michelson
The documentation made it sound as if the DTMF acknowledgment was needed at the time the agent logs in, rather than when the agent is called. This is likely a relic from the days when there were multiple ways of logging in agents. (closes issue AST-962) reported by Steve Pitts ........ Merged revisions 371787 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371789 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371790 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27Fix incorrect documentation of the MailboxStatus manager command.Mark Michelson
The "Waiting" field was misdocumented as reporting the number of messages waiting. In reality, it simply indicated the presence or absence of waiting messages. ........ Merged revisions 371782 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371783 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371784 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27svn:ignore pjproject bin & output for all platforms.David M. Lee
........ Merged revisions 371753 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27Fix incorrectly documented option in queues.confMark Michelson
sharedlastcall defaults to "no" not "yes" (closes issue AST-979) reported by Steve Pitts ........ Merged revisions 371747 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371748 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371750 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27Fixes ast_rwlock_timed[rd|wr]lock for BSD and variants.David M. Lee
The original implementations simply wrap pthread functions, which take absolute time as an argument. The spinlock version for systems without those functions treated the argument as a delta. This patch fixes the spinlock version to be consistent with the pthread version. (closes issue ASTERISK-20240) Reported by: Egor Gorlin Patches: lock.c.patch uploaded by Egor Gorlin (license 6416) ........ Merged revisions 371718 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371720 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27Implement workaround for BETTER_BACKTRACES crashKinsey Moore
When compiling with BETTER_BACKTRACES enabled, Asterisk will sometimes crash when "core show locks" is run. This happens regularly in the testsuite since several tests run "core show locks" to help with debugging. This seems to be a fault with libraries on certain operating systems (notably CentOS 6.2/6.3) running on virtual machines and utilizing gcc 4.4.6. (closes issue ASTERISK-20090) ........ Merged revisions 371690 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371691 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371692 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-26mf_detect: incorrectly used DTMF_GSIZE instead of MF_GSIZEAlec L Davis
........ Merged revisions 371662 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371663 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371664 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-23I forgot to add the unit tests for scoped locks earlier today.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-22Add support for call-id logging to chan_motif.Joshua Colp
Review: https://reviewboard.asterisk.org/r/2077/ ........ Merged revisions 371619 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371620 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-21Add scoped locks to Asterisk.Mark Michelson
With the SCOPED_LOCK macro, you can create a variable that locks a specific lock and unlocks the lock when the variable goes out of scope. This is useful for situations where many breaks, continues, returns, or other interruptions would require separate unlock statements. With a scoped lock, these aren't necessary. There are specializations for mutexes, read locks, write locks, ao2 locks, ao2 read locks, ao2 write locks, and channel locks. Each of these is a SCOPED_LOCK at heart though. Review: https://reviewboard.asterisk.org/r/2060 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20Use thread-local storage to store pj_thread_descs.Mark Michelson
pj_thread_register() takes a parameter of type pj_thread_desc. It was assumed that pj_thread_register either used this item temporarily or made a copy of it. Unfortunately, all it does is keep a pointer to the structure in thread-local storage. This means that if our pj_thread_desc goes out of scope, then pjlib will be referencing bogus data quite often, most commonly on operations involving a pj_mutex_t. In our case, our pj_thread_desc was on the stack and went out of scope very shortly after registering our thread with pjlib. With this change, the pj_thread_desc is stored in thread-local storage so the pointer that pjlib keeps in thread-local storage will reference legitimate memory. (closes issue ASTERISK-20237) reported by Jeremy Pepper Patches: ASTERISK-20237.patch uploaded by Mark Michelson (license #5049) Tested by Jeremy Pepper ........ Merged revisions 371571 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20Ignore recovered zero-length secondary UDPTL packetsKinsey Moore
In some cases, recovering lost packets using the secondary packet recovery mechanism with UDPTL/T.38 can result in the recovery of zero-length packets. These must be ignored or the frame generated from them can cause segfaults and allocation failures. (closes issue ASTERISK-19762) (closes issue ASTERISK-19373) Reported-by: Benjamin (bulkorok) Reported-by: Rob Gagnon (rgagnon) ........ Merged revisions 371544 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371545 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371546 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20Fix for commit r371535Kinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20Apply work-around for BETTER_BACKTRACES crashKinsey Moore
When compiling with BETTER_BACKTRACES enabled, Asterisk will sometimes crash when "core show locks" is run. This happens regularly in the testsuite since several tests run "core show locks" to help with debugging. This seems to be a fault with libraries on certain operating systems (notably CentOS 6.2/6.3) running on virtual machines and utilizing gcc 4.4.6. (issue ASTERISK-20090) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18Remove old debug code from http configuration loadingMatthew Jordan
(closes issue ASTERISK-20254) Reported by: Andrew Latham Patches: http.diff uploaded by Andrew Latham (license #5985) ........ Merged revisions 371520 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18Fix typo in JabberSend that looked for '2' instead of '@' in recipient argumentMatthew Jordan
The summary says about all there is to say. (closes issue ASTERISK-20239) Reported by: Gregory Porras ........ Merged revisions 371518 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18Make the name of the "HangupCauseClear" application consistentMatthew Jordan
The name of the "HangupCauseClear" application is "HangupCauseClear", not "HangupcauseClear". The incorrect case of 'cause' caused the XML documentation to not register properly. As an aside, this commit message felt very awkward, but I'm not sure how else to note that "X", which has to be "X", was referred to as "x". (closes issue ASTERISK-20253) Reported by: Andrew Latham Patches: hangupcause.diff uploaded by Andrew Latham (license #5985) ........ Merged revisions 371516 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18Update module support level on a variety of modules and compiler optionsMatthew Jordan
Some core support modules and compiler options were no longer tagged with a module support level. This patch adds 'core' back to those options. Note that this patch modifies a few of the patches provided by Andrew Latham slightly. res_curl and res_fax are both 'core' supported modules. (closes issue ASTERISK-20215) Reported by: Andrew Latham Tested by: mjordan Patches: astcanary.diff (license #5985) uploaded by Andrew Latham cflagsxml.diff (license #5985) uploaded by Andrew Latham curl_fax.diff (license #5985) uploaded by Andrew Latham soundsxml.diff (license #5985) uploaded by Andrew Latham ........ Merged revisions 371507 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17Fix memory leak in XML documentationMatthew Jordan
When formatting documentation fields, the XML documentation parser calls xmldoc_get_formatted. This function allocates a string buffer at the beginning of its routine. Unfortunately, on certain code paths, it also calls xmldoc_string_cleanup, which assumes that it will create the string buffer. The previously allocated string buffer is then leaked by the xmldoc_string_cleanup routine. Now: we don't do that. (closes issue AST-932) Reported by: Alexander Homig ........ Merged revisions 371469 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371491 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371492 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17When a peer registers using WebSocket do not resolve the Contact provided.Joshua Colp
(closes issue ASTERISK-20238) Reported by: james.mortensen ........ Merged revisions 371482 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17Add instrumentation to subsystem reloadsKinsey Moore
When Asterisk is built with TEST_FRAMEWORK defined, Asterisk will now generate TestEvent AMI events on subsystem reloads such as cdr, dnsmgr, extconfig, etc. (issue PQ-1126) ........ Merged revisions 371436 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371437 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371438 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371439 65c4cc65-6c06-0410-ace0-fbb531ad65f3