summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
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-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-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-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-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-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-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-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-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-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
2012-08-16Handle integer over/under-flow in ast_parse_argsTerry Wilson
The strtol family of functions will return *_MIN/*_MAX on overflow. To detect when an overflow has happened, errno must be set to 0 before calling the function, then checked afterward. (closes issue ASTERISK-20120) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2073/ ........ Merged revisions 371392 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371398 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371399 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16Add module reload instrumentation for TEST_FRAMEWORKKinsey Moore
This adds AMI events for module reloads when Asterisk is built with TEST_FRAMEWORK enabled and corrects generation of the module load AMI event. (issue PQ-1126) ........ Merged revisions 371393 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371394 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371395 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371396 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-10Add private representation of caller, connected and redirecting party ids.Richard Mudgett
This patch adds the feature "Private representation of caller, connected and redirecting party ids", as previously discussed with us (DATUS) and Digium. 1. Feature motivation Until now it is quite difficult to modify a party number or name which can only be seen by exactly one particular instantiated technology channel subscriber. One example where a modified party number or name on one channel is spread over several channels are supplementary services like call transfer or pickup. To implement these features Asterisk internally copies caller and connected ids from one channel to another. Another example are extension subscriptions. The monitoring entities (watchers) are notified of state changes and - if desired - of party numbers or names which represent the involving call parties. One major feature where a private representation of party names is essentially needed, i.e. where a party name shall be exclusively signaled to only one particular user, is a private user-specific name resolution for party numbers. A lookup in a private destination-dependent telephone book shall provide party names which cannot be seen by any other user at any time. 2. Feature Description This feature comes along with the implementation of additional private party id elements for caller id, connected id and redirecting ids inside Asterisk channels. The private party id elements can be read or set by the user using Asterisk dialplan functions. When a technology channel is initiating a call, receives an internal connected-line update event, or receives an internal redirecting update event, it merges the corresponding public id with the private id to create an effective party id. The effective party id is then used for protocol signaling. The channel technologies which initially support the private id representation with this patch are SIP (chan_sip), mISDN (chan_misdn) and PRI (chan_dahdi). Once a private name or number on a channel is set and (implicitly) made valid, it is generally used for any further protocol signaling until it is rewritten or invalidated. To simplify the invalidation of private ids all internally generated connected/redirecting update events and also all connected/redirecting update events which are generated by technology channels -- receiving regarding protocol information - automatically trigger the invalidation of private ids. If not using the private party id representation feature at all, i.e. if using only the 'regular' caller-id, connected and redirecting related functions, the current characteristic of Asterisk is not affected by the new extended functionality. 3. User interface Description To grant access to the private name and number representation from the Asterisk dialplan, the CALLERID, CONNECTEDLINE and REDIRECTING dialplan functions are extended by the following data types. The formats of these data types are equal to the corresponding regular 'non-private' already existing data types: CALLERID: priv-all priv-name priv-name-valid priv-name-charset priv-name-pres priv-num priv-num-valid priv-num-plan priv-num-pres priv-subaddr priv-subaddr-valid priv-subaddr-type priv-subaddr-odd priv-tag CONNECTEDLINE: priv-name priv-name-valid priv-name-pres priv-name-charset priv-num priv-num-valid priv-num-pres priv-num-plan priv-subaddr priv-subaddr-valid priv-subaddr-type priv-subaddr-odd priv-tag REDIRECTING: priv-orig-name priv-orig-name-valid priv-orig-name-pres priv-orig-name-charset priv-orig-num priv-orig-num-valid priv-orig-num-pres priv-orig-num-plan priv-orig-subaddr priv-orig-subaddr-valid priv-orig-subaddr-type priv-orig-subaddr-odd priv-orig-tag priv-from-name priv-from-name-valid priv-from-name-pres priv-from-name-charset priv-from-num priv-from-num-valid priv-from-num-pres priv-from-num-plan priv-from-subaddr priv-from-subaddr-valid priv-from-subaddr-type priv-from-subaddr-odd priv-from-tag priv-to-name priv-to-name-valid priv-to-name-pres priv-to-name-charset priv-to-num priv-to-num-valid priv-to-num-pres priv-to-num-plan priv-to-subaddr priv-to-subaddr-valid priv-to-subaddr-type priv-to-subaddr-odd priv-to-tag Reported by: Thomas Arimont Review: https://reviewboard.asterisk.org/r/2030/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10Fix pickup extension channel reference error.Richard Mudgett
You cannot unref a pointer and then expect to ref it again later. * Fix potential NULL pointer deref if the call pickup search fails. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09Extend extension state callbacks to have more information.Mark Michelson
Quote from review board: This patch extends the extension state callbacks so that monitoring channels (as chan_sip) get more information of the devices which are responsible for an extension state change. The additional information is needed by chan_sip to present names/numbers of the caller and callee in an early-state SIP notification. Users of extenstion state callback not interested in the additional information are not affected by the changes. Motivation: to present the involved party's name/number in an early-state nofification (used by the notified device as a pickup offer) one after another so that a user can see which call he will pick up in an undirected pickup. Such a pickup offer to a user shall indicate the same call (number/name-A calls number/name-B) as the call which would be picked up when an undirected pickup is executed. Users interested in additional state info must use the new functions ast_extension_state_add_extended() resp. ast_extension_state_add_destroy_extended() to register an extended state callback. When the callback is registered this way, an extra member device_state_info of struct ast_state_cb_info is passed to the callback in addition to the aggregated extension state. This container holds an object for every device of the monitored extension hint consisting of the device name, the device state and a channel reference to the channel which (presumably) caused the device state. The information is used by chan_sip for early-state notifications. When the state of a device changes and the new state contains AST_EVENT_RINGING, an early-state notification is sent to the subscribed devices with the caller/callee names/numbers of the oldest ringing channel of the monitored extension. The notified user may then invoke a direct pickup, which will pickup exactly this channel. Users of the old non-extended callbacks will only be called when the aggregated state did change (same behavior as before). Users of the extended callback will also be called when the state is unchanged but does contain AST_EVENT_RINGING. That could be the case if two channels are ringing at one device and one of them hangs up, so the aggregated state does not change. This way the monitoring channel can create a new early-state notification with the now ringing party-ids. Review: https://reviewboard.asterisk.org/r/2048 This contribution comes from Guenther Kelleter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370979 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-08-08Add AMI_CLIENT dialplan functionTerry Wilson
Implementation of a dialplan function for checking manager accounts. Right now it only returns the number of logged in sessions for a manager account, but other attributes can be added later. Patch by: Olle Johansson Review: https://reviewboard.asterisk.org/r/421/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Create the payload type if it does not exist when setting information based ↵Joshua Colp
on the 'm' line. An rtpmap attribute is not required for defined payload numbers. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Do not define a cause that doesn't actually existKinsey Moore
AST_CAUSE_NOTDEFINED is a placeholder for usage when there is no cause information. As such, it should not be defined and translatable as a cause. ........ Merged revisions 370923 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370924 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Payload and RTP code are must remain separate since in non-Asterisk format ↵Joshua Colp
cases they differ. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Add missing AST_CAUSE_* -> text translationsKinsey Moore
A few of these were missing from the list and are necessary for the Who Hung Up? functionality. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Fix a bug uncovered by the test suite where the RTP payload number was not ↵Joshua Colp
getting set. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Reduce memory consumption significantly for users of the RTP engine API by ↵Joshua Colp
storing only the payloads present and in use instead of every possible one. Review: https://reviewboard.asterisk.org/r/2052/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Add named callgroups/pickupgroupsMatthew Jordan
This patch adds named calledgroups/pickupgroups to Asterisk. Named groups are implemented in parallel to the existing numbered callgroup/pickupgroup implementation. However, unlike the existing implementation, which is limited to a maximum of 64 defined groups, the number of defined groups allowed for named callgroups/pickupgroups is effectively unlimited. Named groups are configured with the keywords "namedcallgroup" and "namedpickupgroup". This corresponds to the numbered group definitions of "callgroup" and "pickupgroup". Note that as the implementation of named groups coexists with the existing numbered implementation, a defined named group of "4" does not equate to numbered group 4. Support for the named groups has been added to the SIP, DAHDI, and mISDN channel drivers. Review: https://reviewboard.asterisk.org/r/2043 Uploaded by: Guenther Kelleter(license #6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-01Fix a possible crash due to passing NULL to ast_variables_dup()Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-01Make astobj2.h not include linkedlists.h.Richard Mudgett
Using astobj2 does not require linkedlists.h be included even though astob2 uses linked lists internally. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Add "setvar" option to manager.conf.Mark Michelson
With this option set, channel variables can be set on every manager originate. The Variable header can still be used to set additional channel variables for individual calls if desired. This work was completed by Olle Johansson on review board. I have applied the review feedback and am committing it in order to get this into trunk before Asterisk 11 is branched. Review: https://reviewboard.asterisk.org/r/1412 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Move event cache updates into event processing thread.Russell Bryant
Prior to this patch, updating the device state cache was done by the thread that originated the event. It would update the cache and then queue the event up for another thread to dispatch. This thread moves the cache updating part to be in the same thread as event dispatching. I was working with someone on a heavily loaded Asterisk system and while reviewing backtraces of the system while it was having problems, I noticed that there were a lot of threads contending for the lock on the event cache. By simply moving this into a single thread, this helped performance *a lot* and alleviated some deadlock-like symptoms. Review: https://reviewboard.asterisk.org/r/2066/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370664 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-30Tweak unit test warning message.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-30Fix some presence-state unit test typos.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-30Add a "corosync ping" CLI command.Russell Bryant
This patch adds a new CLI command to the res_corosync module. It is primarily used as a debugging tool. It lets you fire off an event which will cause res_corosync on other nodes in the cluster to place messages into the logger if everything is working ok. It verifies that the corosync communication is working as expected. I didn't put anything in the CHANGES file for this, because this module is new in Asterisk 11. There is already a generic "res_corosync new module" entry in there so I figure that covers it just fine. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25Repair editline builds using in-tree editline sources.Kevin P. Fleming
The previous change to the build system for using a system-provided editline library was missing a crucial include directory for building against the copy of the library in the Asterisk source tree. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25Use an absolute path when referring to the embedded editline directory.Kevin P. Fleming
This patch changes the build system to refer to the embedded editline directory using an absolute path, which will resolve a problem seen on the CentOS automated build agents. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25Enable usage of system-provided NetBSD editline library if available.Kevin P. Fleming
This patch changes the Asterisk configure script and build system to detect the presence of the NetBSD editline library (libedit) on the system. If it is found, it will be used in preference to the version included in the Asterisk source tree. (closes issue ASTERISK-18725) Reported by: Jeffrey C. Ollie Review: https://reviewboard.asterisk.org/r/1528/ Patches: 0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25Revert a change that broke compilationTerry Wilson
1) There is no such function as ast_ref() 2) The patch was originally credited as the one uploaded by Guenther Kelleter (license 6372) via issue AST-921, but the patch committed was not the patch referenced on the issue. 3) Guenther Kelleter's patch was actually correct. It moved the ast_free above the presencechange_cleanup label. I am not committing his change as it is not technically necesary--calling ast_free(NULL) is perfectly safe and I worry that moving the ast_free outside of the label could lead to future bugs if someone ever adds another failure conditional and expects 'goto presencechange_cleanup;' to clean up after everything. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-24Don't attempt free of NULL ptr in pbx.c handle_presencechangeJonathan Rose
(closes issue AST-921) Reported by: Guenther Kelleter Patches: nullptr.patch uploaded by Guenther Kelleter (license 6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-24Rewrite a comment that didn't adequately explain the code it was documenting.Kevin P. Fleming
........ Merged revisions 370429 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370430 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-24Allow permit/deny ACL lines to contain multiple items and negated entries.Kevin P. Fleming
Rules in ACLs (specified using 'permit' and 'deny') can now contain multiple items (separated by commas), and items in the rule can be negated by prefixing them with '!'. This simplifies Asterisk Realtime configurations, since it is no longer necessray to control the order that the 'permit' and 'deny' columns are returned from queries. Review: https://reviewboard.asterisk.org/r/1592/ Initial patch contributed by Tilghman Lesher Unit tests written by Kevin P. Fleming git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23Unit tests for the Jitter Buffer API; remove unnecessary resyncMatthew Jordan
This patch includes the following: * Unit tests for the abstract Jitter Buffer API. This includes both fixed and adaptive flavors, testing nominal creation, frame input, frame retrieval, resyncing; off nominal frame input overflow, out of order, and others. * Tweaks to the abstract_jb API to remove the unnecessary resync_threshold parameter from the create function (resync_threshold is already in the struct passed into the create function) * Ensure the fixed jitter buffer is empty before destroying it, to avoid an ASSERT * Don't "resync" the adaptive jitter buffer. The mechanism that was being used actually causes the jitter buffer to think its being overflowed by going around the jitterbuf API and attempting to 'resynch' it improperly. If a resync is needed, the jitter buffer will do it properly by itself. Note that this is only an optimization needed for trunk, as the worst that happens is the loss of three voice packets before the adaptive jitter buffer will resync anyway. Review: https://reviewboard.asterisk.org/r/2035 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370387 65c4cc65-6c06-0410-ace0-fbb531ad65f3