[asterisk-dev] [Code Review] 2612: REST API - channel recording support

David Lee reviewboard at asterisk.org
Mon Jun 24 13:55:27 CDT 2013



> On June 19, 2013, 4:58 p.m., Matt Jordan wrote:
> > /trunk/main/channel.c, lines 5313-5339
> > <https://reviewboard.asterisk.org/r/2612/diff/1/?file=39464#file39464line5313>
> >
> >     Why wouldn't we allocate the janitor as an ao2 object and just have it be ref counted?

The janitor is more akin to a scoped lock than an AO2 object. You would never have shared ownership of the janitor that gets passed around. You simply introduce the janitor in a particular scope, and it cleans up after itself at the end of scope.


> On June 19, 2013, 4:58 p.m., Matt Jordan wrote:
> > /trunk/main/file.c, line 1012
> > <https://reviewboard.asterisk.org/r/2612/diff/1/?file=39465#file39465line1012>
> >
> >     I'm pretty sure "beep" shouldn't be played regardless of the filename passed in

heh. oops.


> On June 19, 2013, 4:58 p.m., Matt Jordan wrote:
> > /trunk/res/res_stasis_recording.c, lines 343-408
> > <https://reviewboard.asterisk.org/r/2612/diff/1/?file=39471#file39471line343>
> >
> >     Why re-implement ast_play_and_record?

Well, you see... But this is... I just... Yeah, I should go look at that.


- David


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


On June 10, 2013, 2:17 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2612/
> -----------------------------------------------------------
> 
> (Updated June 10, 2013, 2:17 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21594
>     https://issues.asterisk.org/jira/browse/ASTERISK-21594
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch is the first step in adding recording support to the
> Asterisk REST Interface.
> 
> Recordings are stored in /var/spool/recording. Since recordings may be
> destructive (overwriting existing files), the API rejects attempts to
> escape the recording directory (avoiding issues if someone attempts to
> record to ../../lib/sounds/greeting, for example).
> 
> 
> Diffs
> -----
> 
>   /trunk/res/res_stasis_http_channels.c 391291 
>   /trunk/res/res_stasis_http_bridges.c 391291 
>   /trunk/main/utils.c 391291 
>   /trunk/main/file.c 391291 
>   /trunk/main/channel.c 391291 
>   /trunk/main/asterisk.c 391291 
>   /trunk/include/asterisk/utils.h 391291 
>   /trunk/include/asterisk/stasis_app_recording.h PRE-CREATION 
>   /trunk/include/asterisk/paths.h 391291 
>   /trunk/include/asterisk/file.h 391291 
>   /trunk/include/asterisk/channel.h 391291 
>   /trunk/Makefile 391291 
>   /trunk/res/res_stasis_http_recordings.c 391291 
>   /trunk/res/res_stasis_playback.c 391291 
>   /trunk/res/res_stasis_recording.c PRE-CREATION 
>   /trunk/res/res_stasis_recording.exports.in PRE-CREATION 
>   /trunk/res/stasis_http/resource_channels.h 391291 
>   /trunk/res/stasis_http/resource_channels.c 391291 
>   /trunk/res/stasis_http/resource_recordings.h 391291 
>   /trunk/res/stasis_http/resource_recordings.c 391291 
>   /trunk/rest-api-templates/asterisk_processor.py 391291 
>   /trunk/rest-api-templates/swagger_model.py 391291 
>   /trunk/rest-api/api-docs/channels.json 391291 
>   /trunk/rest-api/api-docs/recordings.json 391291 
>   /trunk/tests/test_utils.c 391291 
> 
> Diff: https://reviewboard.asterisk.org/r/2612/diff/
> 
> 
> Testing
> -------
> 
> Unit tests; swagger-ui for manual testing
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130624/46002780/attachment-0001.htm>


More information about the asterisk-dev mailing list