summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
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
2012-07-21Fix segfault introduced by conversion to ACO APITerry Wilson
The value "none" is specified in the config file as a valid value for the "video_mode" option. The code prior to the ACO conversion did not check for "none", but just ignored it and relied on the default zero value. The parsing with ACO is more strict, so without handling "none" specifically, parsing would fail. When parsing failed, but the module loaded anyway, the config info would never be stored, and one place in the code did not check for this case and would segfault. It was also possible that the aco_info struct's internals would be destroyed and used as well. This patch keeps the module from loading after parse failures, adds the "none" option to "video_mode", registers CLI functions only after parsing has completed, checks the config data for NULL before accessing it, and returns -1 on some allocation failures when initializing. (closes issue ASTERISK-20159) Reported by: Birger "WIMPy" Harzenetter Tested by: Birger "WIMPy" Harzenetter Patches: confbridge_fix3.txt uploaded by Terry Wilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Add hangupcause translation supportKinsey Moore
The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan functions to better facilitate access to the AST_CAUSE translations for technology-specific cause codes. The HangupCauseClear application has also been added to remove this data from the channel. (closes issue SWP-4738) Review: https://reviewboard.asterisk.org/r/2025/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Add the AccountCode header to the AMI Hangup event.Richard Mudgett
It's harder to correlate the Newchannel and Hangup AMI events without specifying "AccountCode" in both. (closes issue ASTERISK-19963) Reported by: Oleg A. Arkhangelsky Patches: hangup_acctcode.diff (license #6397) patch uploaded by Oleg A. Arkhangelsky git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Convert app_confbridge to use the config options frameworkTerry Wilson
Review: https://reviewboard.asterisk.org/r/2024/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Fix compiler warnings.Richard Mudgett
gcc (GCC) 4.2.4 has problems casting away constness. ........ Merged revisions 370275 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370277 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Add the ability to specify technology specific documentationMatthew Jordan
A number of applications/AMI commands in Asterisk have specific behavioral differences depending on the resource or channel technology those applications are executed on. For example, the MessageSend application/ command is technology agnostic, but how the channel drivers that support that functionality behave is dependant on the protocols and channel driver implementation. Prior to this patch, those details were either documented in the application/command documentation itself, or were left undocumented. This patch adds a new element to the documentation schema, <info/>. An info node is essentially a piece of technology specific reference information that can be included by any top level XML documentation node. For example, the MessageSend application can now include XMPP/SIP specific information, where that technology specific information can be defined in chan_motif/res_xmpp/ chan_sip. Likewise, that information can also be included in the MessageSend AMI command. Review: https://reviewboard.asterisk.org/r/2049 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Fix compilation error when MALLOC_DEBUG is enabledMatthew Jordan
To fix a memory leak in CEL, a channel datastore was introduced whose destruction function pointer was pointed to the ast_free macro. Without MALLOC_DEBUG enabled this compiles as fine, as ast_free is defined as free. With MALLOC_DEBUG enabled, however, ast_free takes on a definition from a different place then utils.h, and became undefined. This patch resolves this by using a reference to ast_free_ptr. When MALLOC_DEBUG is enabled, this calls ast_free; when MALLOC_DEBUG is not enabled, this is defined to be ast_free, which is defined to be free. (issue AST-916) Reported by: Thomas Arimont ........ Merged revisions 370273 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370274 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19named_acl: Remove systemname option from acl.conf, use asterisk.conf valueJonathan Rose
Review: https://reviewboard.asterisk.org/r/2057/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19CallID Logging: Remove new line/carriage return from callID change test eventJonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-18callid logging: Issue test events when the callid is changed for a channelJonathan Rose
Review: https://reviewboard.asterisk.org/r/2054/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370225 65c4cc65-6c06-0410-ace0-fbb531ad65f3