summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-06-03Correct autoconf script for finding UUID support.David M. Lee
The library that provides UUID support varies greatly from system to system. On most Linux distros, it's in libuuid. On OpenBSD, it's in libe2fs-uuid. On OS X, it is in libsystem. This patch plays hide-and-seek with UUID support, looking for it in the three places we know about. It also corrects the Makefile so that it uses the configured library name and include path. (closes issue ASTERISK-21816) Reported by: Brad Latus (snuffy) Tested by: Brad Latus (snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Refactor code and fix a reference leakKinsey Moore
Refactor some channel blob publishing code to use ast_channel_publish_blob now that it is available and fix a JSON reference leak that was occurring during varset publishing. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Remove ast_channel_bridge() and associated code called only by it.Richard Mudgett
* Added some more BUGBUG notes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Fixup hold/unhold with attended and blind transfers.Richard Mudgett
* DTMF attended and blind transfers have hold/unhold behavior restored. * External attended and blind transfers unhold the transfered party when the transfer is initiated. * Made prohibit blind transferring a bridge marked as masquerade only. (ConfBridge bridges) * Made running an application or playing a file inside a bridge post the hold/unhold messages if MOH is requested. Review: https://reviewboard.asterisk.org/r/2574/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Replace ast_manager_publish_message() with a more useful version.Jason Parker
It's much easier to just create a blob of the message. Convert some AMI events to use it. Review: https://reviewboard.asterisk.org/r/2577/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Remove remnant of snapshot blob JSON typesKinsey Moore
Remove usage of the once-mandatory snapshot blob type field, refactor confbridge stasis messages accordingly, and remove ast_bridge_blob_json_type(). Review: https://reviewboard.asterisk.org/r/2575/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Add snapshot cache that indexes by channel nameKinsey Moore
This adds a new channel snapshot cache in parallel to the existing cache; the difference being that it indexes the channel snapshots by channel name instead of channel uniqueid. Review: https://reviewboard.asterisk.org/r/2576 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Multiple revisions 390228-390229Alexandr Anikin
........ r390228 | may | 2013-05-31 14:19:52 +0400 (Fri, 31 May 2013) | 14 lines reject call attempts when gatekeeper is configured but not registered (closes issue ASTERISK-21800) Reported by: Dmitry Melekhov Patches: ASTERISK-21800-1.patch Tested by: Dmitry Melekhov ........ Merged revisions 390181 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 390223 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ r390229 | may | 2013-05-31 14:34:20 +0400 (Fri, 31 May 2013) | 4 lines remove unnecessary declarations (issue ASTERISK-21800) ........ Merged revisions 390228-390229 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Let find do its own globbing.Walter Doekes
Previously a stray .c file would cause xmldocs to not get built. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-30Missed a line from a bad merge in r390122David M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-30Avoid unnecessary cleanups during immediate shutdownDavid M. Lee
This patch addresses issues during immediate shutdowns, where modules are not unloaded, but Asterisk atexit handlers are run. In the typical case, this usually isn't a big deal. But the introduction of the Stasis message bus makes it much more likely for asynchronous activity to be happening off in some thread during shutdown. During an immediate shutdown, Asterisk skips unloading modules. But while it is processing the atexit handlers, there is a window of time where some of the core message types have been cleaned up, but the message bus is still running. Specifically, it's still running module subscriptions that might be using the core message types. If a message is received by that subscription in that window, it will attempt to use a message type that has been cleaned up. To solve this problem, this patch introduces ast_register_cleanup(). This function operates identically to ast_register_atexit(), except that cleanup calls are not invoked on an immediate shutdown. All of the core message type and topic cleanup was moved from atexit handlers to cleanup handlers. This ensures that core type and topic cleanup only happens if the modules that used them are first unloaded. This patch also changes the ast_assert() when accessing a cleaned up or uninitialized message type to an error log message. Message type functions are actually NULL safe across the board, so the assert was a bit heavy handed. Especially for anyone with DO_CRASH enabled. Review: https://reviewboard.asterisk.org/r/2562/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29Fix segfault when dealing with chan_agent channels.Richard Mudgett
Check the returned bridged pointer for NULL to avoid a crash. It looks like chan_agent is returning a NULL pointer when it probably should be returning a pointer to the channel the Agent channel is pretending to be. (closes issue ASTERISK-21793) Reported by: Rodrigo P. Telles Patches: jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Rodrigo P. Telles ........ Merged revisions 390044 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 390047 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29Remove unused RAII vars.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29Pack the right number of items into the status and receive fax blobsMatthew Jordan
The code was still attempting to pack an additional item into the blobs that didn't exist. Crashes ensued. This patch modifies the publishing of these messages so that the correct number of items are packed in the JSON. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29Resolve a merge conflictKinsey Moore
When ast_channel_cached_blob_create was merged, ast_channel_blob_create_from_cache was partially removed in an unresolved merge conflict. This restores ast_channel_blob_create_from_cache and refactors usage of ast_channel_cached_blob_create (requires an ast_channel) to use ast_channel_blob_create_from_cache (requires a channel uniqueid) instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Fix a memory copying bug in slinfactory which was causing mixmonitor issues.Jonathan Rose
Reported by: Michael Walton Tested by: Jonathan Rose Patches: slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502) (closes issue ASTERISK-21799) ........ Merged revisions 389895 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 389896 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Add missing NULL check to acquire_bridge() function.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Add attended transfer support for chan_sip.cMark Michelson
This now uses the core API for performing attended transfers. Review https://reviewboard.asterisk.org/r/2513 (Closes issue ASTERISK-21520) reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Adds support for a core attended transfer function plus adds some hiding of ↵Mark Michelson
masquerades. The attended transfer API call can complete the attended transfer in a number of ways depending on the current bridged states of the channels involved. The hiding of masquerades is done in some bridging-related functions, such as the manager Bridge action and the Bridge dialplan application. In addition, call pickup was edited to "move" a channel rather than masquerade it. Review: https://reviewboard.asterisk.org/r/2511 (closes issue ASTERISK-21334) Reported by Matt Jordan (closes issue Asterisk-21336) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-27Fix some more fax test errors due to needing the peer in a bridgeMatthew Jordan
In r389799, a number of fax errors in gateway mode were fixed by using the appropriate function to get a channel's peer while in a bridge. This patch does two things: (1) It uses the same function in res_fax_spandsp while starting the fax gateway. Without this, the fax gateway will not actually start up, as res_fax_spandsp also must inspect the channel's peer in a two-party bridge (2) It refactors some ao2 objects in sendfax_exec to use RAII_VAR. This was reverted in r389799 as some off nominal paths were getting hit without the fix in (1) that indicated an ao2 object issue; this turned out to be a red herring (which is an odd phrase) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-27Initialize the message type before the topicMatthew Jordan
Caching topics will during initialization attempt to reference their message type. The message type therefore has to be initialized prior to the topic to prevent the dreaded assertion. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-26Fix a few fax gateway failuresMatthew Jordan
Fax gateway requires knowledge of a channel's peer in a bridge. This patch now uses the supported mechanisms to get this information. This is acceptable for a few reasons: * Fax gateway can only ever work in a 2-party bridge * Fax gateway cannot work when not in a bridge * Fax gateway cannot work without knowledge of the capabilities of both channels in the fax operation (it is, after all, a gateway) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-26Fix a variety of memory corruption/assertion errorsMatthew Jordan
* Initialize a Stasis-Core message type prior to initializing a caching topic. The caching topic will attempt to use the message type. * Don't attempt to publish Stasis-Core messages from remote console connections. They aren't the main process; they shouldn't attempt to behave as it (they also don't have the infrastructure to do so) * Don't treat a JSON object as an ao2 object (whoops) * In asterisk.c, ref bump the JSON even package that is distributed with the event meta data. The callers assume that they own the reference, and the packing routine steals references. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-25Restore initialization of security topicsMatthew Jordan
During a merge the security topic initialization got blown away. This patch restores it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24grr, props.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Split Hold event into Hold/Unhold, and move it into core.Jason Parker
(closes issue ASTERISK-21487) Review: https://reviewboard.asterisk.org/r/2565/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Remove a junk defineKinsey Moore
BLOB_HANDLER_BUCKETS is a remnant of using "type" fields in JSON/snapshot blobs and is no longer used. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Migrate a large number of AMI events over to Stasis-CoreMatthew Jordan
This patch moves a number of AMI events over to the Stasis-Core message bus. This includes: * ChanSpyStart/Stop * MonitorStart/Stop * MusicOnHoldStart/Stop * FullyBooted/Reload * All Voicemail/MWI related events In addition, it adds some Stasis-Core and AMI support for generic AMI messages, refactors the message router in AMI to use a single router with topic forwarding for the topics that AMI cares about, and refactors MWI message types and topics to be more name compliant. Review: https://reviewboard.asterisk.org/r/2532 (closes issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Print all logger messages on shutdownMatthew Jordan
When Asterisk shuts down and shuts down the loggin gsubsystem, any messages currently in flight will not get logged. This patch prevents the loop writing messages from breaking out prematurely, such that all of the messages are logged. (closes issue ASTERISK-21716) Reported by: Corey Farrell patches: logger-process-all-messages.patch uploaded by Corey Farrell (license 5909) ........ Merged revisions 389676 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 389677 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Fix several problems caused by multiple line usage with i2004 phones.Igor Goncharovskiy
Reported by: Daniel Bohling, MihaiMircea (closes issue ASTERISK-21061) (closes issue ASTERISK-21120) ........ Merged revisions 389661 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23stasis-http: Provide a response body for 201 created responsesDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23res_parking: Add a verbose message when a channel is parkedJonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23res_parking: Fix some simple bugsJonathan Rose
Both of them are covered in the dynamic parking review on https://reviewboard.asterisk.org/r/2550 - Remove unref against parking lot that the bridge did on dissolve since the reference wasn't taken in the first place. On a swap, reapply bridge roles in order to get music on hold and such playing on the channel that swaps into the bridge. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23Fix a crash due to the INVITE session being destroyed before the session.Joshua Colp
This change ensures that the INVITE session remains valid for the lifetime of the session object itself by increasing the session count on the dialog that the INVITE session is allocated from. Once this reaches zero (normally as a result of decrementing it within the session destructor) the dialog, and INVITE session, are destroyed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23This patch adds support for controlling a playback operation from theDavid M. Lee
Asterisk REST interface. This adds the /playback/{playbackId}/control resource, which may be POSTed to to pause, unpause, reverse, forward or restart the media playback. Attempts to control a playback that is not currently playing will either return a 404 Not Found (because the playback object no longer exists) or a 409 Conflict (because the playback object is still in the queue to be played). This patch also adds skipms and offsetms parameters to the /channels/{channelId}/play resource. (closes issue ASTERISK-21587) Review: https://reviewboard.asterisk.org/r/2559 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23This patch implements the REST API's for POST /channels/{channelId}/playDavid M. Lee
and GET /playback/{playbackId}. This allows an external application to initiate playback of a sound on a channel while the channel is in the Stasis application. /play commands are issued asynchronously, and return immediately with the URL of the associated /playback resource. Playback commands queue up, playing in succession. The /playback resource shows the state of a playback operation as enqueued, playing or complete. (Although the operation will only be in the 'complete' state for a very short time, since it is almost immediately freed up). (closes issue ASTERISK-21283) (closes issue ASTERISK-21586) Review: https://reviewboard.asterisk.org/r/2531/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23Fix inverted test preventing DTMF disconnect from working.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23Fix a bug where the DTMF mode was not set on newly created RTP instances in ↵Joshua Colp
the res_sip_sdp_rtp module. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23Fix a bug with applying the end result of the codec negotiation to the ↵Joshua Colp
Asterisk channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23Fix a bug where the codec order as configured was not being obeyed.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-22Fixed startup race condition which caused occasional stasis_mwi_state_type ↵David M. Lee
assertions. The caching topic (which refers to the message type) was created before the message type. If the initial subscription message gets processed before the type can be initialized, the assertion about using an uninitialized type fires. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-22Remove bad props, before anybody notices.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-22Add dial events to app_queue and app_followme.Jason Parker
Also fixes an issue in app_dial, where the channels were swapped on dial events. (closes issue ASTERISK-21551) (closes issue ASTERISK-21550) Review: https://reviewboard.asterisk.org/r/2549/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Fix destruction order assert for stasis_bridgingDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Conditional out more app_queue logging that needs to be reworked.Richard Mudgett
Fixes crash because app_queue was unconditionally freeing a datastore that was still on a channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Raise the ConfBridgeMute/Unmute events when a CLI or AMI action triggers the ↵Matthew Jordan
change New in 12 are the ConfBridgeMute/Unmute events, which are triggered when a user changes their mute/unmute state. This was typically triggered when a user hit a DTMF key that triggered the mute/unmute menu handler. Forgotten in this is when an AMI action or CLI command triggers the mute/unmute. This patch now raises the events in those situations as well. (closes issue ASTERISK-21802) Reported by: Birger "WIMPy" Harzenetter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
Breaks many things until they can be reworked. A partial list: chan_agent chan_dahdi, chan_misdn, chan_iax2 native bridging app_queue COLP updates DTMF attended transfers Protocol attended transfers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Fixed some extra field assertion when the event WebSocket is connectedDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-20Set the AST_CDR_FLAG_ORIGINATED flag on originated channel's CDRsMatthew Jordan
This may alleviate some of the CDR woes with originated channels, as CDRs do like to know when a channel was originated. Eventually this will get converted to be a channel flag, so its location is still good to know post the great CDR shakeup of 2013. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-20Fixup svn:keywords in all *.c and *.h files.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389251 65c4cc65-6c06-0410-ace0-fbb531ad65f3