Commit Graph

2033 Commits

Author SHA1 Message Date
Kinsey Moore 909ee4bfb9 Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate
and refactors the following events to travel over Stasis-Core:
* LocalBridge
* DAHDIChannel
* AlarmClear
* SpanAlarmClear
* Alarm
* SpanAlarm
* DNDState
* MCID
* SIPQualifyPeerDone
* SessionTimeout

Review: https://reviewboard.asterisk.org/r/2627/
(closes issue ASTERISK-21476)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 13:16:09 +00:00
Joshua Colp 68b3bce8b8 Nothing to see here, move along.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-29 13:47:22 +00:00
Joshua Colp f523a96635 Implement the defined PUBLISH ESC API within res_sip_pubsub.
(closes issue ASTERISK-21452)

Review: https://reviewboard.asterisk.org/r/2630/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-29 13:42:19 +00:00
Jonathan Rose 50ff1f5fc1 res_parking: Dynamic Parking Lots
(closes issue ASTERISK-21644)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2615/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 19:22:16 +00:00
Mark Michelson 6d624eb008 Add stasis publications for blind and attended transfers.
This creates stasis messages that are sent during a blind or
attended transfer. The stasis messages also are converted to
AMI events.

Review: https://reviewboard.asterisk.org/r/2619

(closes issue ASTERISK-21337)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 18:42:24 +00:00
Jason Parker eba5739470 Change ARI originate to also allow dialing an exten/context/priority.
The old way didn't make much sense, so some of the fields were repurposed.

(closes issue ASTERISK-21658)

Review: https://reviewboard.asterisk.org/r/2626/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 16:23:24 +00:00
Jason Parker f6211b6b70 Change some 500 errors to 400.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 15:36:49 +00:00
David M. Lee b193b580b0 Removed stray apostrophe.
Apparently the pluralization of an acronym does not use an apostophe,
according to most modern style guides. I feel like I've been living a
lie this whole time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 02:14:27 +00:00
David M. Lee 1426b2b228 Removed the automatic 302 redirects for ARI URL's that end with a slash.
There were some problems redirecting RESTful API requests; notably the client
would change the request method to GET on the redirected requests. After some
looking into, I decided that a 404 would be simpler and have more consistent
behavior.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 01:07:32 +00:00
Jason Parker 609c42c854 ARI: Add support for continuing to a different location in dialplan.
This allows going elsewhere in the dialplan, so that the location can be
specified after exiting the Stasis application.

(closes issue ASTERISK-21870)

Review: https://reviewboard.asterisk.org/r/2644/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-26 19:29:57 +00:00
Richard Mudgett 5e27e13e28 Remove some redundant parking config error messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-26 19:15:23 +00:00
Jonathan Rose 854c4c64fe res_parking: Add Parking manager action to the new parking system
(closes issue ASTERISK-21641)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2573/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 22:28:22 +00:00
Joshua Colp ea948c69d3 Move where the sorcery observer is added for qualify to guarantee the sched_qualifies container exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 19:10:14 +00:00
Matthew Jordan 13b470d704 Fix memory/ref counting leaks in a variety of locations
This patch fixes the following memory leaks:
 * http.c: The structure containing the addresses to bind to was not being
   deallocated when no longer used
 * named_acl.c: The global configuration information was not disposed of
 * config_options.c: An invalid read was occurring for certain option types.
 * res_calendar.c: The loaded calendars on module unload were not being
   properly disposed of.
 * chan_motif.c: The format capabilities needed to be disposed of on module
   unload. In addition, this now specifies the default options for the
   maxpayloads and maxicecandidates in such a way that it doesn't cause the
   invalid read in config_options.c to occur.

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  http.patch uploaded by jhardin (license 6512)
  named_acl.patch uploaded by jhardin (license 6512)
  config_options.patch uploaded by jhardin (license 6512)
  res_calendar.patch uploaded by jhardin (license 6512)
  chan_motif.patch uploaded by jhardin (license 6512)
........

Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 01:12:58 +00:00
Matthew Jordan 91217ac3c1 Fix a variety of memory leaks
This patch addresses the following memory/ref counting leaks:

 * main/devicestate.c - unsubscribe and join our devicestate message
   subscription
 * main/cel.c - clean up the datastore and config objects on exist
 * main/parking.c - cleanup memory leak of retriever snapshot on message
   payload destruction
 * res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot
   on message payload destruction
 * main/presencestate.c - unsubscribe and join the caching topic on exit
 * manager.c - properly unregister the manager action "BlindTransfer"
 * sorcery.c - shutdown the threadpool on exit and dispose of any wizards

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  cel.patch uploaded by jhardin (license #6512)
  devicestate.patch uploaded by jhardin (license #6512)
  manager.patch uploaded by jardin (license #6512)
  presencestate.patch uploaded by jhardin (license #6512)
  retriever-channel-snapshot.patch uploaded by jhardin (license #6512)
  sorcery.patch uploaded by jhardin (license #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 23:56:54 +00:00
David M. Lee d56cbf43a0 Fixed templates so that the changes from r392777 won't be overwritten the next
time we run the generators.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 21:48:39 +00:00
Richard Mudgett b5f18d1677 Fix menuselect display for stasis modules.
The menuselect parser is very simple.  It looks for AST_MODULE_INFO and
uses any quoted string on that line as the module summary display.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 21:40:52 +00:00
Kinsey Moore a0b7a49a4a Index installed sounds and implement ARI sounds queries
This adds support for stasis/sounds and stasis/sounds/{ID} queries via
the Asterisk RESTful Interface (ARI, formerly Stasis-HTTP).

The following changes have been made to accomplish this:
* A modular indexer was created for local media.
* A new function to get an ast_format associated with a file extension
  was added.  
* Modifications were made to the built-in HTTP server so that URI
  decoding could be deferred to the URI handler when necessary.
* The Stasis-HTTP sounds JSON documentation was modified to handle
  cases where multiple languages are installed in different formats.
* Register and Unregister events for formats were added to the system
  topic.

(closes issue ASTERISK-21584)
(closes issue ASTERISK-21585)
Review: https://reviewboard.asterisk.org/r/2507/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 13:49:20 +00:00
Matthew Jordan cc29957a6f Properly pack the parameters into ast_json_pack when sending a send fax message
This patch properly packs the parameters into the send fax message so that it
actually work.

Missing a ',' between two string fields can be difficult to debug, particularly
when the actual packing succeeds. Interestingly enough, this didn't actually
crash until the JSON blob we deref'd and disposed of. Since that happened in
a different thread, it was pretty tough to track down.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 19:19:30 +00:00
Joshua Colp 477e207f28 Add some more missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 18:59:36 +00:00
Matthew Jordan 175b9831f2 Properly extract channel variables for the SendFAX/ReceiveFAX Stasis messages
By the time something extracts the pointers from ast_json_pack, the channels
will already be disposed of. This patch properly pulls the information out of
the variables and packs them into the JSON blob.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 22:42:34 +00:00
Joshua Colp a330d0867e Make sorcery details opaque and add extended fields.
Sorcery specific object information is now opaque and allocated with the object.
This means that modules do not need to be recompiled if the sorcery specific part
is changed. It also means that sorcery can store additional information on objects
and ensure it is freed or the reference count decreased when the object goes away.

To facilitate the above a generic sorcery allocator function has been added which
also ensures that allocated objects do not have a lock.

Extended fields have been added thanks to all of the above which allows specific fields
to be marked as extended, and thus simply stored as-is within the object. Type safety
is *NOT* enforced on these fields. A consumer of them has to query and ultimately perform
their own safety check. What does this mean? Extra modules can extend already defined
structures without having to modify them.

Tests have also been included to verify extended field functionality.

Review: https://reviewboard.asterisk.org/r/2585/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 14:26:25 +00:00
Joshua Colp 77002bc377 Merge in current pimp_my_sip work, including:
1. Security events
2. Websocket support
3. Diversion header + redirecting support
4. An anonymous endpoint identifier
5. Inbound extension state subscription support
6. PIDF notify generation
7. One touch recording support (special thanks Sean Bright!)
8. Blind and attended transfer support
9. Automatic inbound registration expiration
10. SRTP support
11. Media offer control dialplan function
12. Connected line support
13. SendText() support
14. Qualify support
15. Inband DTMF detection
16. Call and pickup groups
17. Messaging support

Thanks everyone!

Side note: I'm reminded of the song "How Far We've Come" by Matchbox Twenty.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 14:03:22 +00:00
Matthew Jordan ea03516cb5 Fix a deadlock and possible crash in res_fax
This patch fixes two bugs.
(1) It unlocks the channel in the framehook handlers before attempting to grab
    the peer from the bridge. The locking order for the bridging framework is
    bridge first, then channel - having the channel locked while attempting to
    obtain the bridge lock causes a locking inversion and a deadlock. This
    patch bumps the channel ref count prior to releasing the lock in the
    framehook to avoid lifetime issues.

    Note that this does expose a subtle problem in framehooks; that is,
    something could modify the framehook list while we are executing, causing
    issues in the framehook list traversal that the callback executes in.
    Fixing this is a much larger problem that is beyond the scope of this
    patch - (a) we already unlock the channel in this particular framehook
    and we haven't run into a problem yet (as modifying the framehook list
    when a channel is about to perform a fax gateway would be a very odd
    operation) and (b) migrating to an ao2 container of framehooks would be
    more invasive at this point. See the referenced ASTERISK issue for more
    information.
(2) Directly packing channel variables into a JSON object turned out to be
    unsafe. A condition existed where the strings in the JSON blob were no
    longer safe to be accessed if the channel object itself was disposed of.

(issue ASTERISK-21951)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 13:58:07 +00:00
Joshua Colp 94ec267888 Migrate PeerStatus events to stasis, add stasis endpoints, and add chan_pjsip device state.
(closes issue ASTERISK-21489)
(closes issue ASTERISK-21503)

Review: https://reviewboard.asterisk.org/r/2601/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 12:40:16 +00:00
Joshua Colp ffab4d52f1 Add a log message for when an incoming session is rejected due to the extension not being found.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-20 21:13:17 +00:00
Richard Mudgett cd40e179a9 Fix potential bridge hook resource leak if the hook install fails.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-20 17:21:40 +00:00
Matthew Jordan 6258bbe7bd Update Asterisk's CDRs for the new bridging framework
This patch is the initial push to update Asterisk's CDR engine for the new
bridging framework. This patch guts the existing CDR engine and builds the new
on top of messages coming across Stasis. As changes in channel state and bridge
state are detected, CDRs are built and dispatched accordingly. This
fundamentally changes CDRs in a few ways.
(1) CDRs are now *very* reflective of the actual state of channels and bridges.
    This means CDRs track well with what an actual channel is doing - which
    is useful in transfer scenarios (which were previously difficult to pin
    down). It does, however, mean that CDRs cannot be 'fooled'. Previous
    behavior in Asterisk allowed for CDR applications, channels, and other
    properties to be spoofed in parts of the code - this no longer works.
(2) CDRs have defined behavior in multi-party scenarios. This behavior will not
    be what everyone wants, but it is a defined behavior and as such, it is
    predictable.
(3) The CDR manipulation functions and applications have been overhauled. Major
    changes have been made to ResetCDR and ForkCDR in particular. Many of the
    options for these two applications no longer made any sense with the new
    framework and the (slightly) more immutable nature of CDRs.

There are a plethora of other changes. For a full description of CDR behavior,
see the CDR specification on the Asterisk wiki.

(closes issue ASTERISK-21196)

Review: https://reviewboard.asterisk.org/r/2486/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 03:00:38 +00:00
Joshua Colp 671d7e62c7 Ensure that the number of added contacts never goes below 0.
This can happen when a REGISTER request is removing a contact.

(closes issue ASTERISK-21911)
Reported by: mdavenport


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 21:57:31 +00:00
Kinsey Moore b51b437bf3 Refactor CEL bridge events on top of Stasis-Core
This pulls bridge-related CEL event triggers out of the code in which
they were residing and pulls them into cel.c where they are now
triggered by changes in bridge snapshots. To get access to the
Stasis-Core parking topic in cel.c, the Stasis-Core portions of parking
init have been pulled into core Asterisk init.

This also adds a new CEL event (AST_CEL_BRIDGE_TO_CONF) that indicates
a two-party bridge has transitioned to a multi-party conference. The
reverse cannot occur in CEL terms even though it may occur in actuality
and two party bridges which receive a AST_CEL_BRIDGE_TO_CONF will be
treated as multi-party conferences for the duration of the bridge.

Review: https://reviewboard.asterisk.org/r/2563/
(closes issue ASTERISK-21564)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13 13:46:40 +00:00
Joshua Colp 65c492e851 Add support for requiring that all queued messages on a caching topic have been handled before
retrieving from the cache and also change adding channels to an endpoint to be an immediate
operation.

Review: https://reviewboard.asterisk.org/r/2599/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13 11:02:16 +00:00
David M. Lee 1e9faaf78a Fix segfault for certain invalid WebSocket input.
The WebSocket code would allocate, on the stack, a string large enough
to hold a key provided by the client, and the WEBSOCKET_GUID. If the key
is NULL, this causes a segfault. If the key is too large, it could
overflow the stack.

This patch checks the key for NULL and checks the length of the key to
avoid stack smashing nastiness.

(closes issue ASTERISK-21825)
Reported by: Alfred Farrugia
Tested by: Alfred Farrugia, David M. Lee
Patches:
    issueA21825_check_if_key_is_sent.patch uploaded by Walter Doekes (license 5674)
........

Merged revisions 391560 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-12 21:08:40 +00:00
Kinsey Moore 8cb0c33e48 Add AGI command arguments to AsyncAGI event
This makes the AGI AsyncAGI event put provided AGI command arguments in
the event's environment.

(closes issue ASTERISK-21304)
Patch-By: Dirk Wendland


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 16:03:51 +00:00
Kinsey Moore a5bbc790e7 Stasis-HTTP: Flesh out bridge-related capabilities
This adds support for Stasis applications to receive bridge-related
messages when the application shows interest in a given bridge.

To supplement this work and test it, this also adds support for the
following bridge-related Stasis-HTTP functionality:
* GET stasis/bridges
* GET stasis/bridges/{bridgeId}
* POST stasis/bridges
* DELETE stasis/bridges/{bridgeId}
* POST stasis/bridges/{bridgeId}/addChannel
* POST stasis/bridges/{bridgeId}/removeChannel

Review: https://reviewboard.asterisk.org/r/2572/
(closes issue ASTERISK-21711)
(closes issue ASTERISK-21621)
(closes issue ASTERISK-21622)
(closes issue ASTERISK-21623)
(closes issue ASTERISK-21624)
(closes issue ASTERISK-21625)
(closes issue ASTERISK-21626)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 13:07:11 +00:00
Jonathan Rose ed3f65ef96 res_parking: Add parking_devicestate.c left out from previous commit
(issue ASTERISK-21645)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2545/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 20:51:19 +00:00
Jason Parker f19ff9579a Implement ARI POST to /channels, to originate a call.
(closes issue ASTERISK-21617)
Review: https://reviewboard.asterisk.org/r/2597/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 18:39:42 +00:00
Jonathan Rose 8954661207 res_parking: Automatically generate extensions, hints, etc.
(closes issue ASTERISK-21645)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2545/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 16:07:18 +00:00
Kinsey Moore e36c6f714f Fix documentation generation
Regression from r390701


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 20:37:48 +00:00
Kinsey Moore 3c37bb646f Fix documentation that was in review during the great suffix/prefix swap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 20:30:56 +00:00
Jason Parker 0613100e63 Split AGI manager events, to remove SubEvent field.
This moves them to stasis, in the process.

(closes issue ASTERISK-21470)
Review: https://reviewboard.asterisk.org/r/2587/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 19:51:12 +00:00
Mark Michelson 94d8d0468f Remove remaining traces of remove_on_pull from hooks and hook APIs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 19:19:48 +00:00
Matthew Jordan 071c1e290d Pack the right number of items into the status and receive fax blobs
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-29 03:22:04 +00:00
Kinsey Moore 6851801a5e Resolve a merge conflict
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-29 02:26:17 +00:00
Matthew Jordan 2d2a47fae3 Fix some more fax test errors due to needing the peer in a bridge
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-27 01:33:12 +00:00
Matthew Jordan 9e35096623 Fix a few fax gateway failures
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-26 16:49:28 +00:00
Matthew Jordan fe3ca5401f Fix a variety of memory corruption/assertion errors
* 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-26 04:47:17 +00:00
Jason Parker 154fbf8cae Split Hold event into Hold/Unhold, and move it into core.
(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-24 21:21:25 +00:00
Kinsey Moore 1223199b3d Remove a junk define
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-24 21:01:30 +00:00
Matthew Jordan 06be8463b6 Migrate a large number of AMI events over to Stasis-Core
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-24 20:44:07 +00:00
David M. Lee 32a86f902a stasis-http: Provide a response body for 201 created responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23 21:46:38 +00:00