[asterisk-dev] [Code Review] 2531: Implement REST API for playback to channel

David Lee reviewboard at asterisk.org
Tue May 21 09:22:56 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2531/
-----------------------------------------------------------

(Updated May 21, 2013, 9:22 a.m.)


Review request for Asterisk Developers.


Changes
-------

Addressed review feedback.

* Remove debugging statements
* Implemented some stub functions I forgot to do
* Extracted playback state_to_string function
* Plugged a memory leak


Bugs: ASTERISK-21283 and ASTERISK-21586
    https://issues.asterisk.org/jira/browse/ASTERISK-21283
    https://issues.asterisk.org/jira/browse/ASTERISK-21586


Repository: Asterisk


Description
-------

(depends on https://reviewboard.asterisk.org/r/2530)

This patch implements the REST API's for POST /channels/{channelId}/play
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/


Diffs (updated)
-----

  /trunk/include/asterisk/app.h 388896 
  /trunk/include/asterisk/stasis_app_playback.h PRE-CREATION 
  /trunk/include/asterisk/stasis_channels.h 388896 
  /trunk/include/asterisk/stasis_http.h 388896 
  /trunk/main/channel.c 388896 
  /trunk/main/channel_internal_api.c 388896 
  /trunk/main/stasis_channels.c 388896 
  /trunk/res/res_stasis_http.c 388896 
  /trunk/res/res_stasis_http_channels.c 388896 
  /trunk/res/res_stasis_json_events.c 388896 
  /trunk/res/res_stasis_json_events.exports.in 388896 
  /trunk/res/res_stasis_playback.c PRE-CREATION 
  /trunk/res/res_stasis_playback.exports.in PRE-CREATION 
  /trunk/res/stasis/control.c 388896 
  /trunk/res/stasis_http/resource_channels.h 388896 
  /trunk/res/stasis_http/resource_channels.c 388896 
  /trunk/res/stasis_http/resource_playback.c 388896 
  /trunk/res/stasis_json/resource_channels.h 388896 
  /trunk/res/stasis_json/resource_events.h 388896 
  /trunk/rest-api/api-docs/channels.json 388896 
  /trunk/rest-api/api-docs/events.json 388896 

Diff: https://reviewboard.asterisk.org/r/2531/diff/


Testing
-------

Poked the playback API manually.


Thanks,

David Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130521/6144208e/attachment.htm>


More information about the asterisk-dev mailing list