Commit Graph

72 Commits

Author SHA1 Message Date
Matthew Jordan
0365b85a35 ARI/AMI: Update versions; update UPGRADE/CHANGES notes for 12.1.0 changes
Due to backwards compatible changes made to AMI/ARI, the version needs to
be bumped to 1.1.0/2.1.0, respectively.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 14:22:16 +00:00
Joshua Colp
f0fb4acc75 res_stasis: Enable transfers and provide events when they occur.
This change enables transfers within ARI created bridges and adds events
for when they occur. Unlike other events these will be received if *any*
subscribed object is involved in the transfer.

(closes issue ASTERISK-22984)
Reported by: David M. Lee

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01 16:23:56 +00:00
Kinsey Moore
bf97a4c8d7 ARI: Support channel variables in originate
This adds back in support for specifying channel variables during an
originate without compromising the ability to specify query parameters
in the JSON body. This was accomplished by generating the body-parsing
code in a separate function instead of being integrated with the URI
query parameter parsing code such that it could be called by paths with
body parameters. This is transparent to the user of the API and
prevents manual duplication of code or data structures.

(closes issue ASTERISK-23051)
Review: https://reviewboard.asterisk.org/r/3122/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 14:15:21 +00:00
Jonathan Rose
1859c07f4f ARI: Add mailboxes resource for controlling and polling external MWI
Adds the following AMI commands:
PUT mailboxes/mailboxName
    modifies mailbox state and implicitly creates new mailboxes
GET mailboxes/mailboxName
    retrieves a JSON representation of a single mailbox if it exists
GET mailboxes
    retrieves a JSON array of all mailboxes
DELETE mailbox/mailboxName
    deletes a mailbox
Note that res_mwi_external must be loaded for these functions to
actually do anything.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 23:26:40 +00:00
David M. Lee
5f48de6336 ari: Remove support for specifying channel vars during origination.
When we added support for specifying channel variables for an
origination, we didn't consider how that would interact with another
feature, namely specifying request parameters in a JSON request body.

The method of specifying channel variables (as a flat JSON object passed
in the JSON body) interferes with parsing parameters out of the request
body.

Unfortunately, fixing this would be a backward incompatible change. In
the interest of keeping the API sane and keeping our release schedule,
we're dropping the feature for specifying channel variables in the
origination request.

We will bring the feature back soon, as a backward compatible addition
to the API.

(closes issue ASTERISK-23051)
Review: https://reviewboard.asterisk.org/r/3088


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 22:02:11 +00:00
Matthew Jordan
8385e4ba61 ari: Bump the version of ARI to 1.0.0
(closes issue ASTERISK-23007)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 12:36:40 +00:00
Jonathan Rose
93a096fe9f bridging: Give bridges a name and a known creator
Bridges have two new optional properties, a creator and a name.
Certain consumers of bridges will automatically provide bridges that
they create with these properties. Examples include app_bridgewait,
res_parking, app_confbridge, and app_agent_pool. In addition, a name
may now be provided as an argument to the POST function for creating
new bridges via ARI.

(closes issue AFS-47)
Review: https://reviewboard.asterisk.org/r/3070/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17 23:17:32 +00:00
Joshua Colp
6e7d64c79d res_stasis: Expose event for call forwarding and follow forwarded channel.
This change adds an event for when an originated call is redirected to
another target. This event contains the original channel and the newly
created channel. If a stasis subscription exists on the original originated
channel for a stasis application then a new subscription will also be
created on the stasis application to the redirected channel. This allows
the application to follow the call path completely.

(closes issue ASTERISK-22719)
Reported by: Joshua Colp

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14 17:15:54 +00:00
Kevin Harwell
0948170edb ARI: Allow specifying channel variables during a POST /channels
Added the ability to specify channel variables when creating/originating a
channel in ARI.  The variables are sent in the body of the request and should
be formatted as a single level JSON object.  No nested objects allowed.
For example: {"variable1": "foo", "variable2": "bar"}.

(closes issue ASTERISK-22872)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3052/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 17:17:48 +00:00
Kevin Harwell
010983be91 ARI: Adding a channel to a bridge while a live recording is active blocks
Added the ability to have rules that are checked when adding and/or removing
channels to/from a bridge.  In this case, if a channel is currently recording
and someone attempts to add it to a bridge an "is recording" rule is checked,
fails, and a 409 conflict is returned.

Also command functions now return an integer value that can be descriptive of
what kind of problems, if any, occurred before or during execution.

(closes issue ASTERISK-22624)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2947/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 16:32:53 +00:00
Joshua Colp
021f49bad7 res_ari: Add Recording events to the validator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-30 14:11:55 +00:00
Kevin Harwell
99d5cb8555 ARI: Implement device state API
Created a data model and implemented functionality for an ARI device state
resource.  The following operations have been added that allow a user to
manipulate an ARI controlled device:

Create/Change the state of an ARI controlled device
PUT    /deviceStates/{deviceName}&{deviceState}

Retrieve all ARI controlled devices
GET    /deviceStates

Retrieve the current state of a device
GET    /deviceStates/{deviceName}

Destroy a device-state controlled by ARI
DELETE /deviceStates/{deviceName}

The ARI controlled device must begin with 'Stasis:'.  An example controlled
device name would be Stasis:Example.  A 'DeviceStateChanged' event has also
been added so that an application can subscribe and receive device change
events.  Any device state, ARI controlled or not, can be subscribed to.

While adding the event, the underlying subscription control mechanism was
refactored so that all current and future resource subscriptions would be
the same.  Each event resource must now register itself in order to be able
to properly handle [un]subscribes.

(issue ASTERISK-22838)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3025/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 17:38:29 +00:00
Joshua Colp
22f800d14e ari: Add events for playback and recording.
While there were events defined for playback and recording
these were not actually sent. This change implements the
to_json handlers which produces them.

(closes issue ASTERISK-22710)
Reported by: Jonathan Rose

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 12:51:31 +00:00
Joshua Colp
60e700565a ari: Add Snoop operation for spying/whispering on channels.
The Snoop operation can be invoked on a channel to spy or
whisper on it. It returns a channel that any channel operations
can then be invoked on (such as record to do monitoring).

(closes issue ASTERISK-22780)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 12:38:04 +00:00
David M. Lee
4fd244e273 ari: Add silence generator controls
This patch adds the ability to start a silence generator on a channel
via ARI. This generator will play silence on the channel (avoiding audio
timeouts on the peer) until it is stopped, or some other media operation
is started (like playing media, starting music on hold, etc.).

(closes issue ASTERISK-22514)
Review: https://reviewboard.asterisk.org/r/3019/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 15:55:33 +00:00
Joshua Colp
0f7db6c413 res_ari_channels: Add the ability to stop locally generated ringing on a channel.
Using the 'ring' operation it is possible to start locally generated ringback if
the channel is answered. This change adds the ability to stop it by using DELETE.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-13 23:09:38 +00:00
Kevin Harwell
59dc668622 ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
Implementation listing endpoints by technology returned an empty array if no
matching endpoints were found.  Fixed so a "404 Not Found" will be returned
instead.

(closes issue ASTERISK-22803)
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 22:15:41 +00:00
David M. Lee
1432a9d59d Fixed a typ.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 15:26:26 +00:00
Kevin Harwell
952cd73827 ARI playback: Rename ARI Playback to Playbacks
Before playback was the only non plural resource.  It has been renamed to
playbacks for consistency.

(closes issue ASTERISK-22737)
Reported by: Paul Belanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 17:39:43 +00:00
David M. Lee
2f92695c22 ari: User better nicknames for ARI operations
While working on building client libraries from the Swagger API, I
noticed a problem with the nicknames.

    channel.deleteChannel()
    channel.answerChannel()
    channel.muteChannel()

Etc. We put the object name in the nickname (since we were generating C
code), but it makes OO generators redundant.

This patch makes the nicknames more OO friendly. This resulted in a lot
of name changing within the res_ari_*.so modules, but not much else.

There were a couple of other fixed I made in the process.

 * When reversible operations (POST /hold, POST /unhold) were made more
   RESTful (POST /hold, DELETE /unhold), the path for the second operation
   was left in the API declaration. This worked, but really the two
   operations should have been on the same API.
 * The POST /unmute operation had still not been REST-ified.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-07 21:09:18 +00:00
Joshua Colp
26458aa615 res_ari_channels: Add ring operation, dtmf operation, hangup reasons, and tweak early media.
The ring operation sends ringing to the specified channel it is invoked on.
The dtmf operation can be used to send DTMF digits to the specified channel
of a specific length with a wait time in between. Finally hangup reasons
allow you to specify why a channel is being hung up (busy, congestion).

Early media behavior has also been tweaked slightly. When playing media to a channel
it will no longer automatically answer. If it has not been answered a progress indication
is sent instead.

(closes issue ASTERISK-22701)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-01 14:37:00 +00:00
Kinsey Moore
e81d1ab8cd ARI: Remove channels/{channelId}/dial
This removes the /ari/channels/{channelId}/dial URI since it is
redundant, overly complex, is likely to become more externally complex
over time, and is too high-level compared with other ARI operations.
See the following for further information:
http://lists.digium.com/pipermail/asterisk-app-dev/2013-October/000002.html

(closes issue ASTERISK-22784)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2968/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-29 12:51:15 +00:00
Joshua Colp
8de298e17b res_ari_playback: Add missing 404 error response for GET and DELETE.
(closes issue ASTERISK-22722)
Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-29 11:15:16 +00:00
Jonathan Rose
0bdbdbf3fc ARI: channel/bridge recording errors when invalid format specified
Asterisk will now issue 422 if recording is requested against channels
or bridges with an unknown format

(closes issue ASTERISK-22626)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2939/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 21:53:31 +00:00
Jonathan Rose
f503fc5673 ARI recordings: Issue HTTP failures for recording requests with file conflicts
If a file already exists in the recordings directory with the same name as what
we would record, issue a 422 instead of relying on the internal failure and
issuing success.

(closes issue ASTERISK-22623)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2922/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 21:20:42 +00:00
David M. Lee
5f31d0b182 The Swagger 1.2 specification for type extension ended up being
slightly different than my proposal. Instead of putting an 'extends'
field on the subtype, the base type has a 'subTypes' field, which is a
list of the subTypes. Given that its a messaging model and not an
object model, kinda makes sense.

This patch changes the events.json api-doc, and the python translators
to take the new format into account.

Other changes that are in Swagger 1.2 were not adopted, since the spec
is still in flux, and could change before it's finalized.

A summary of changes to the Swagger-1.2 spec can be found at
https://github.com/wordnik/swagger-core/wiki/1.2-transition.

(closes issue ASTERISK-22440)
Review: https://reviewboard.asterisk.org/r/2909/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 03:12:06 +00:00
David M. Lee
222e34644f Fixing r401281; the model name is Channel, with a capital C
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 18:58:37 +00:00
Joshua Colp
abcc1c0c15 Return a channel snapshot when originating using ARI, and subscribe the Stasis application to it.
This change allows a user of ARI to know what channel it has originated and also follow any
progress. If a Stasis application is provided it will be automatically subscribed to the
originated channel immediately.

(closes issue ASTERISK-22485)
Reported by: David Lee

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-19 14:43:41 +00:00
Kinsey Moore
24fe1d52fb Clarify documentation for channel and bridge list
This makes it clear that the ARI API calls for listing channels and
bridges will list all channels or bridges in the system and not just
those that are in or are controlled by a Stasis application.

(closes issue ASTERISK-22635)
Reported by: Kevin Harwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 14:01:04 +00:00
Paul Belanger
c76d5392f5 Use POST / DELETE to toggle ARI bridge moh
Review: https://reviewboard.asterisk.org/r/2911/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 00:02:45 +00:00
Kinsey Moore
8dbc1d6f30 Ensure bridge record error responses validate
This adds the list of expected errors to the /bridges/{bridgeId}/record
ARI documentation so that outbound 4xx errors validate properly.
Previously, this would result in a response validation failure.

(closes issue ASTERISK-22627)
Reported by: Joshua Colp


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-15 20:02:08 +00:00
Paul Belanger
56757b114b Use POST / DELETE to toggle hold / moh for ARI channels
This change updates how we handle toggle events, rather then create two
different function names, we'll just use POST / DELETE from HTTP to handle it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-15 15:26:17 +00:00
David M. Lee
1af791acb0 Fix a stupid copy/paste error in ARI docs.
Patches:
    ari-doc-patch.txt uploaded by jbigelow (license 5091)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-11 16:18:46 +00:00
David M. Lee
945108058c Updated /play resource docs. The playback of http: resources isn't implemented... yet
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-10 19:26:19 +00:00
David M. Lee
cd2ddccaf2 Added missing file from r400522
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 19:31:35 +00:00
Matthew Jordan
7fc567bd76 ARI: Add subscription support
This patch adds an /applications API to ARI, allowing explicit management of
Stasis applications.

 * GET /applications - list current applications
 * GET /applications/{applicationName} - get details of a specific application
 * POST /applications/{applicationName}/subscription - explicitly subscribe to
   a channel, bridge or endpoint
 * DELETE /applications/{applicationName}/subscription - explicitly unsubscribe
   from a channel, bridge or endpoint

Subscriptions work by a reference counting mechanism: if you subscript to an
event source X number of times, you must unsubscribe X number of times to stop
receiveing events for that event source.

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

(issue ASTERISK-22451)
Reported by: Matt Jordan




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 15:54:57 +00:00
David M. Lee
096ce6c5b7 Corrected response class for stopPlayback
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 04:54:51 +00:00
Kinsey Moore
1dc2ea65f7 Correct allowable values for ARI general information filter
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02 19:19:25 +00:00
David M. Lee
730ad84481 Added note about expected behavior of originate
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@398638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 19:01:54 +00:00
David M. Lee
eae2405dff ARI: Implement /recordings/stored API's
his patch implements the ARI API's for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
'wishful thinking' fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it's not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we'd probably want to
also list all of the current playbacks. Which seems weird.)

(closes issue ASTERISK-21582)
Review: https://reviewboard.asterisk.org/r/2693/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:17:12 +00:00
David M. Lee
7a581537e8 ARI: Correct error codes for bridge operations
This patch adds error checking to ARI bridge operations, when
adding/removing channels to/from bridges.

In general, the error codes fall out as follows:
 * Bridge not found - 404 Not Found
 * Bridge not in Stasis - 409 Conflict
 * Channel not found - 400 Bad Request
 * Channel not in Stasis - 422 Unprocessable Entity
 * Channel not in this bridge (on remove) - 422 Unprocessable Entity

(closes issue ASTERISK-22036)
Review: https://reviewboard.asterisk.org/r/2769/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 17:19:02 +00:00
Jonathan Rose
21e22310c7 ARI: Music on Hold/Background Music for bridges
Adds ARI functions to be able to turn on/off music on hold in a
bridge. It actually functions more as a background music without
further actions on the bridge since if the rest of the channels
in the bridge aren't explicitly muted, they will still be able
to communicate.

(closes issue ASTERISK-21974)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2688/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 00:26:19 +00:00
David M. Lee
5762c1b4ac ARI: Correct segfault with /variable calls are missing ?variable parameter.
Both /asterisk/variable and /channel/{channelId}/variable requires a
?variable parameter to be passed into the query. But we weren't checking
for the parameter being missing, which caused a segfault.

All calls now properly return 400 Bad Request errors when the parameter
is missing. The Swagger api-docs were updated accordingly.

(closes issue ASTERISK-22273)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 16:23:59 +00:00
David M. Lee
c790848794 ARI: Add recording controls
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-06 14:44:45 +00:00
Jonathan Rose
e47794ead1 ARI: bridges/{bridgeID}/addChannel: add roles parameter
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-05 16:59:13 +00:00
David M. Lee
5114e4fc0b ARI - GET /ari/asterisk/info
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-02 14:46:21 +00:00
David M. Lee
537ecebd2d ARI - implement allowMultiple for parameters
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-02 14:36:32 +00:00
Jonathan Rose
a6329a3acf ARI: MOH start and stop for a channel
(issue ASTERISK-21974)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2680/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 19:40:27 +00:00
Jonathan Rose
17c546173f ARI: Bridge Playback, Bridge Record
Adds a new channel driver for creating channels for specific purposes
in bridges, primarily to act as either recorders or announcers. Adds
ARI commands for playing announcements to ever participant in a bridge
as well as for recording a bridge. This patch also includes some
documentation/reponse fixes to related ARI models such as playback
controls.

(closes issue ASTERISK-21592)
Reported by: Matt Jordan

(closes issue ASTERISK-21593)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 19:35:21 +00:00
David M. Lee
15036c2979 Document the 400 error response for originate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 17:13:21 +00:00