summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2013-08-17Strip down the old event systemKinsey Moore
This removes unused code, event types, IE pltypes, and event IE types where possible and makes several functions private that were once public. This includes a renumbering of the remaining event and IE types which breaks binary compatibility with previous versions. The last remaining consumers of the old event system (or parts thereof) are main/security_events.c, res/res_security_log.c, tests/test_cel.c, tests/test_event.c, main/cel.c, and the CEL backends. Review: https://reviewboard.asterisk.org/r/2703/ (closes issue ASTERISK-22139) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-16Doxygen comment tweaks.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15Minor parking cleanup.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15Parking: Eliminate local channel name hack to get peer channel.Richard Mudgett
(closes issue ASTERISK-22034) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15Prevent automagic things from happening to Stasis application bridgesKinsey Moore
This prevents swap optimization, merges, and transfers involving Stasis application bridges. It wouldn't be nice if the bridge you thought you owned disappeared from under you. Reported-by: Richard Mudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-13ARI: allow other operations to happen while bridgedDavid M. Lee
This patch changes ARI bridging to allow other channel operations to happen while the channel is bridged. ARI channel operations are designed to queue up and execute sequentially. This meant, though, that while a channel was bridged, any other channel operations would queue up and execute only after the channel left the bridge. This patch changes ARI bridging so that channel commands can execute while the channel is bridged. For most operations, things simply work as expected. The one thing that ended up being a bit odd is recording. The current recording implementation will fail when one attempts to record a channel that's in a bridge. Note that the bridge itself may be recording; it's recording a specific channel in the bridge that fails. While this is an annoying limitation, channel recording is still very useful for use cases such as voice mail, and bridge recording makes up much of the difference for other use cases. (closes issue ASTERISK-22084) Review: https://reviewboard.asterisk.org/r/2726/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-12Add test suite events for when contacts are added or removed from an AORJohn Bigelow
These are needed by the pjsip inbound registration test suite tests. (issue ASTERISK-21833) (issue ASTERISK-21834) (issue ASTERISK-21835) (issue ASTERISK-21837) Review: https://reviewboard.asterisk.org/r/2700/ Review: https://reviewboard.asterisk.org/r/2739/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09bridge_channel: Support the lonely flag and make ARI use it.Jonathan Rose
The lonely flag is an optional flag for bridge channels that will make them leave a bridge when a channel leaves if only lonely channels are in the bridge at that point. This is useful for things like ending recording and playback channels when they cease to be interacting with other channels in the bridge. (closes issue ASTERISK-22117) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2721/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06ARI: Add recording controlsDavid M. Lee
This patch implements the controls from ARI recordings. The controls are: * DELETE /recordings/live/{recordingName} - stop recording and discard it * POST /recordings/live/{recordingName}/stop - stop recording * POST /recordings/live/{recordingName}/pause - pause recording * POST /recordings/live/{recordingName}/unpause - resume recording * POST /recordings/live/{recordingName}/mute - mute recording (record silence to the file) * POST /recordings/live/{recordingName}/unmute - unmute recording. Since this underlying functionality did not already exist, is was added to app.c by a set of control frames, similar to how playback control works. The pause/mute control frames are toggles, even though the ARI controls are idempotent, to be consistent with the playback control frames. (closes issue ASTERISK-22181) Review: https://reviewboard.asterisk.org/r/2697/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06Expose res_pjsip threadpool optionsKinsey Moore
Expose initial size, automatic increment, maximum size, and idle timeout as configurable parameters for the res_pjsip thread pool. Review: https://reviewboard.asterisk.org/r/2704/ (closes issue ASTERISK-22143) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06Fix crash in res_pjsip_outbound_registration when the remote server can not ↵Joshua Colp
be resolved. This crash was caused by decrementing the reference count of a newly created message when it should not be. This change fixes that but also fixes all other cases where this was incorrectly done. (closes issue ASTERISK-22188) Reported by: Kinsey Moore git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05Add AMI registration events for PJSIP outbound registration attemptsMatthew Jordan
This patch adds AMI events whenever an outbound registration attempt succeeds or fails from res_pjsip_outbound_registration. This brings it inline with the existing SIP channel driver and IAX channel driver. Review: https://reviewboard.asterisk.org/r/2729/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05ARI: bridges/{bridgeID}/addChannel: add roles parameterJonathan Rose
Roles are now cleared with each entry into a bridge with addChannel. If the roles parameter is present, the role specified will be applied to all channels being added with the addChannel command. (closes issue ASTERISK-21973) Reported by: Matt Jordan https://reviewboard.asterisk.org/r/2691/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05res_parking: Unit testsJonathan Rose
Adds the following unit tests: * create_lot: tests adding and removal of a new parking lot (baseline) * park_extensions: creates a parking lot that registers extensions and then confirms that all of the expected extensions exist * extensions_conflicts: creates numerous parking lots to test that extension conflicts in parking lots result in parking lot creation failing * dynamic_parking_variables: Tests that the creation of dynamic parking lots respects the related channel variables set on the channel that requests them. * park_call: Tests adding a channel to a parking lot's holding bridge by standard parking functions. * retrieve_call: Tests pulling a channel out of a parking lot's holding bridge via parked call retrieval functions. (closes issue ASTERISK-22138) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2714/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05Fix res_ari_asterisk load issueDavid M. Lee
The new res_ari_asterisk.so module presents several config options from asterisk main. Unfortunately, they aren't exported, so the module won't load on Linux. This patch renames the variables, adding the ast_ prefix so they will be exported. Review: https://reviewboard.asterisk.org/r/2737 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Get the SNMP code to compile.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02ARI - GET /ari/asterisk/infoDavid M. Lee
This patch adds basic system information access to ARI. The results are roughly what you get from 'core show settings', with a few minor differences. * Data is structured, with 'build', 'system', 'config' and 'status' sub-objects. * Each sub-object is selectable, using the ?only= parameter. A comma separated list can be provided to select multiple sections. * A few config options are numeric, for which 0 means 'unlimited'. Instead of having a special interpretation of those fields, they are simply omitted if they're 0. * The information is limited to what might be useful to building external applications. (closes issue ASTERISK-21575) Review: https://reviewboard.asterisk.org/r/2702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02ARI - implement allowMultiple for parametersDavid M. Lee
Swagger allows parameters to be specified as 'allowMultiple', meaning that the parameter may be specified as a comma separated list of values. I had written some of the API docs using that, but promptly forgot about implementing it. This patch finally fills in that gap. The codegen template was updated to represent 'allowMultiple' fields as array/size fields in the _args structs. It also parses the comma separated list using ast_app_separate_args(), so quoted strings in the argument will be handled properly. Review: https://reviewboard.asterisk.org/r/2698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Address JSON thread safety issues.David M. Lee
In tracking down some unit tests failures, I ended up reading the fine print[1] regarding Jansson's thread safety. In short: 1. Ref-counting is non-atomic. 2. json_dumps() and friends are not thread safe. This patch adds locking where necessary to our ast_json_* wrapper API, with documentation in json.h describing the thread safety limitations of the API. [1]: http://www.digip.org/jansson/doc/2.4/portability.html#thread-safety Review: https://reviewboard.asterisk.org/r/2716/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Make a couple of changes to help AMI events to be more clear in what is ↵Mark Michelson
occurring. * BridgeEnter now contains the unique ID of the channel that is to be swapped out, if applicable. * There is a ParkedCallSwap event that is sent when a parked channel has a new channel take its place. (closes issue ASTERISK-22193) reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/2712 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Add CLI/AMI commands to force chan_pjsip actionsKinsey Moore
For chan_pjsip, this introduces CLI/AMI remote unregistration commands, reworks CLI syntax for sending NOTIFYs, adds AMI qualification support, and adds documentation for PJSIPNotify. This also fixes two refcounting bugs in the outbound registration code. Review: https://reviewboard.asterisk.org/r/2695/ (closes issue ASTERISK-21939) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Remove dead code from features.c; refactor pickup code into pickup.cMatthew Jordan
This patch does the following: * It moves the pickup code out of features.c and into pickup.c * It removes the vast majority of dead code out of features.c. In particular, this includes the parking code. (issue ASTERISK-22134) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Fix a crash due to performing full URI validation on a contact which only ↵Joshua Colp
contains '*'. (closes issue AST-1198) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Support externally initiated parking requests; remove some dead codeMatthew Jordan
This patch does the following: * It adds support for externally initiated parking requests. In particular, chan_skinny has a protocol level message that initiates a call park. This patch now supports that option, as well as the protocol specific mechanisms in chan_dahdi/sig_analog and chan_mgcp. * A parking bridge features virtual table has been added that provides access to the parking functionality that the Bridging API needs. This includes requests to park an entire 'call' (with little or no additional information, thank you chan_skinny), perform a blind transfer to a parking extension, determine if an extension is a parking extension, as well as the actual "do the parking" request from the Bridging API. * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new functions * The removal of some - but not all - dead parking code from features.c This also fixed blind transferring a multi-party bridge to a parking lot (which was implemented, but had at least one code path where using the parking features kK might not have worked) Review: https://reviewboard.asterisk.org/r/2710 (closes issue ASTERISK-22134) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Fix documentation replication issuesKinsey Moore
This prevents XML documentation duplication by expanding channel and bridge snapshot tags into channel and bridge snapshot parameter sets with a given prefix or defaulting to no prefix. This also prevents documentation from becoming fractured and out of date by keeping all variations of the documentation in template form such that it only needs to be updated once and keeps maintenance to a minimum. Review: https://reviewboard.asterisk.org/r/2708/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Fixed compile errors introduced in r395954.David M. Lee
Just a merge error due to a file rename. Grrr... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Split caching out from the stasis_caching_topic.David M. Lee
In working with res_stasis, I discovered a significant limitation to the current structure of stasis_caching_topics: you cannot subscribe to cache updates for a single channel/bridge/endpoint/etc. To address this, this patch splits the cache away from the stasis_caching_topic, making it a first class object. The stasis_cache object is shared amongst individual stasis_caching_topics that are created per channel/endpoint/etc. These are still forwarded to global whatever_all_cached topics, so their use from most of the code does not change. In making these changes, I noticed that we frequently used a similar pattern for bridges, endpoints and channels: single_topic ----------------> all_topic ^ | single_topic_cached ----+----> all_topic_cached | +----> cache This pattern was extracted as the 'Stasis Caching Pattern', defined in stasis_caching_pattern.h. This avoids a lot of duplicate code between the different domain objects. Since the cache is now disassociated from its upstream caching topics, this also necessitated a change to how the 'guaranteed' flag worked for retrieving from a cache. The code for handling the caching guarantee was extracted into a 'stasis_topic_wait' function, which works for any stasis_topic. (closes issue ASTERISK-22002) Review: https://reviewboard.asterisk.org/r/2672/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Answer with multiple codecs if the underlying pjproject supports it.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31Update CONTROL STREAM FILE to accept an 'offsetms' parameterMatthew Jordan
This patch allows starting playback of audio through the CONTROL STREAM FILE AGI command to start at a particular offset. It will also return the final position of the file in the 'endpos' attribute. (closes issue ASTERISK-17803) Reported by: Murray Melvin patches: res_agi.c.r316293.diff uploaded by murraytm (license 6221) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31Found another missed "sip" -> "pjsip" CLI command.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31Remove "constant" endpoint identifier.Mark Michelson
This was created as a debugging tool before proper endpoint identifiers were created. Using it now can actually lead to harmful results. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31Fix remnants of the pjsip renamingKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Missed a conversion to pjsip.conf in documentation and sorcery.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Update res_pjsip_endpoint_identifier_constant.c to use reorganized endpoint ↵Mark Michelson
structure. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30The large GULP->PJSIP renaming effort.Mark Michelson
The general gist is to have a clear boundary between old SIP stuff and new SIP stuff by having the word "SIP" for old stuff and "PJSIP" for new stuff. Here's a brief rundown of the changes: * The word "Gulp" in dialstrings, functions, and CLI commands is now "PJSIP" * chan_gulp.c is now chan_pjsip.c * Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*" * All files that were "res_sip*" are now "res_pjsip*" * The "res_sip" directory is now "res_pjsip" * Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*" * The configuration file is now "pjsip.conf" instead of "res_sip.conf" * The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP" * CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as the starting word instead of "sip" git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Reorganize the ast_sip_endpoint structure into substructures.Mark Michelson
(closes issue ASTERISK-22135) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2707 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Add support for T.38 fax to chan_pjsip.Joshua Colp
Review: https://reviewboard.asterisk.org/r/2692/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Fix compilation on gcc 4.8.1Kinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-29Clarify documentation for trust of identification.Mark Michelson
(closes issue ASTERISK-22023) Reported by Rusty Newton git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-29Remove comment that no longer appliesKinsey Moore
The monitor thread is already properly torn down on unload and load failure. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27Rename everything Stasis-HTTP to ARIKinsey Moore
This renames all files and API calls from several variants of Stasis-HTTP to ARI including: * Stasis-HTTP -> ARI * STASIS_HTTP -> ARI * stasis_http -> ari (ast_ari for global symbols, file names as well) * stasis http -> ARI Review: https://reviewboard.asterisk.org/r/2706/ (closes issue ASTERISK-22136) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-26Remove the unsafe bridge parameter from ast_bridge_hook_callback's.Richard Mudgett
Most hook callbacks did not need the bridge parameter. The pointer value could become invalid if the channel is moved to another bridge while it is executing. * Fixed some issues in feature_attended_transfer() as a result. * Reduce the bridge inhibit count in attended_transfer_properties_shutdown() after it has restored the bridge channel hooks. * Removed basic bridge requirement on feature_blind_transfer(). It does not require the basic bridge like feature_attended_transfer(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-26Improved feature limits interval hook implementaion.Richard Mudgett
* Fixed feature limits to not use special members of struct ast_bridge_features. * Fixed memory leak in off nominal paths of bridge_builtin_set_limits(). * Fixed off nominal path in ast_bridge_features_limits_construct() freeing unallocated memory if it was not called by bridge_builtin_set_limits(). * Made bridge_builtin_interval_features.so unloadable. * Simplified parking's use of its duration interval hook. * Made BridgeWait S option not depend upon another module being loaded. (closes issue ASTERISK-22107) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2701/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-26Fix /stasis/res/app_replaced unit test.David M. Lee
A typo in recent changes caused the JSON ApplicationReplaced message to fail to build, so the message wasn't being sent out the WebSocket. Related, the replaced application would also unregister itself when it disconnected, which would actually unregister the new application. This was also fixed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25Fix crash due to trying to send a re-invite while in the incorrect state.Joshua Colp
This crash would occur if a re-invite was queued while the initial INVITE transaction was still occurring and the response to the INVITE was not ACKed. This lack of ACK would cause the INVITE session state to never reach confirmed. Once the transaction terminated, however, the queued re-invite would occur and cause a crash due to this lack of state change. This fix checks the INVITE session state before performing the re-invite to ensure it is in the required confirmed state. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25Change the default value for "allowsubscribe" to yes to match chan_sip.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25Fix incorrect reference to stasis/bridging.hMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25A great big renaming patchMatthew Jordan
This patch renames the bridging* files to bridge*. This may seem pedantic and silly, but it fits better in line with current Asterisk naming conventions: * channel is not "channeling" * monitor is not "monitoring" etc. A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is the act of using a bridge on a set of channels - and the API that fulfills that role is more than just the action. (closes issue ASTERISK-22130) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25Move after bridge callbacks into their own fileMatthew Jordan
One more major refactoring to go. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25Improve initial INVITE handling and fix crash due to rapidly arriving CANCEL.Joshua Colp
(closes issue ASTERISK-22150) Review: https://reviewboard.asterisk.org/r/2696/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395351 65c4cc65-6c06-0410-ace0-fbb531ad65f3