summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-02Move ast_str_container_alloc and friendsKinsey Moore
This moves ast_str_container_alloc, ast_str_container_add, ast_str_container_remove, and related private functions into strings.c/h since they really don't belong in astobj2.c/h. As a result of this move, utils also had to be updated. Review: https://reviewboard.asterisk.org/r/2719/ (closes issue ASTERISK-22041) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Get rid of ast_bridged_channel() and the bridged_channel field on ast_channels.Mark Michelson
This commit is smaller than the initial review placed on review board. This is because a change to allow for channel drivers to access parking functionality externally was committed and invalidated quite a few of the changes initially made. (closes issue ASTERISK-22039) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2717 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Make sure that pickup.h does not use an include guard name used elsewhere.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Correct the last of the Newchannel xi:includesKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396099 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-02Fixed chan_dahdi compilation failureDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Fix test modulesMatthew Jordan
More missing include files. :-\ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Add pickup.h include lines for chan_dahdi and chan_mgcpMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396061 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-01Fix sorcery for some rather picky regex implementations.David M. Lee
Some regex implementations won't compile an empty string. Assuming that it's equivalent of a regex that will match anything, use ".?" instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396035 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-01Add queue member paused hintsMatthew Jordan
This patch adds the ability in Queue to raise a hint when a member's paused state changes. The hint uses the form 'Queue:{queue_name}_pause_{member_name}', where {queue_name} and {member_name} are the name of the queue and the name of the member to subscribe to, respectively. For example: exten => 8501,hint,Queue:sales_pause_mark. Members will show as In Use when paused. Note that the format of the queue pause hint was changed slightly from what is on the issue to accomodate suggestion on the code review. Review: https://reviewboard.asterisk.org/r/2254 (closes issue ASTERISK-20842) Reported by: Philippe Lindheimer patches: qpause-10-378206.diff uploaded by Philippe Lindheimer (license 5519) qpause-11-378206.diff uploaded by Philippe Lindheimer (license 5519) qpause-trunk-378206.diff uploaded by Philippe Lindheimer (license 5519) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Regenerate configure for configure.ac changesKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395998 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 warning in astman for gcc-4.8.David M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395984 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-08-01Raise Registry AMI events on registration failuresMatthew Jordan
This patch makes it so that all registration attempts that fail that also permanently modify the registration state will raise an appropriate AMI event. Note that this patch was forward ported to trunk and the Stasis Core message bus by mjordan. (closes issue ASTERISK-21368) Reported by: Dmitriy Serov patches: chan_sip.c.diff uploaded by Demon (license 6479) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395907 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-31Disable CEL tests that need rearchitecting to operate properlyKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395881 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 hold/unhold in bridge_native_rtp, use tech_pvt instead of bridge_pvt, ↵Joshua Colp
reduce bridging attempts, and fix breaking native RTP bridges. (closes issue ASTERISK-22128) (closes issue ASTERISK-22104) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395866 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-31Enforce conference exit order for CEL testsKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395837 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-30Remove ast_bridged_channel call from abstract_jb.cMark Michelson
Interestingly, this only happens in dead code. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30Setting svn:ignore for res/res_pjsipDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395793 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-29Removed quotes from svn:keywords props on a few files.David M. Lee
Subversion doesn't do quote processing, so it actually thinks that the closing quote in 'Revision"' is a part of the keyword. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395686 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-29Put the include in thereMatthew Jordan
Mea culpa... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-29When performing a reload, reload the new features_config and not the oldMatthew Jordan
Performing a module reload of core components causes specific functions compiled into the Asterisk binary to be reloaded. The table of said functions was still pointing to the old features reload mechanism, and not the new one. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-29Clean up and improve test_celKinsey Moore
Improve reliability of attended transfer merge and link tests. Stop using ast_log(LOG_ERROR, ...); in favor of ast_test_status_update Remove fred and eve channel helpers since they are not necessary git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-29Set svn:ignore in res/ari directoryDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395636 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-27Improve reliability of bridge merge CEL testKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395588 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