[asterisk-dev] [Code Review] 3770: ARI: report duration values in LiveRecording objects

Samuel Galarneau reviewboard at asterisk.org
Tue Jul 15 13:46:12 CDT 2014



> On July 14, 2014, 6:27 p.m., Samuel Galarneau wrote:
> > /branches/12/rest-api/api-docs/recordings.json, line 320
> > <https://reviewboard.asterisk.org/r/3770/diff/1/?file=63111#file63111line320>
> >
> >     Instead of showing energy, which I did not understand until this morning, I wonder if showing the number of seconds of silence, or even the percentage of the recording that is made up of silence would be more beneficial to end users of the API.
> >     
> >     If the goal is to enable discarding "empty" recordings, a percentage would indicate that more clearly.
> 
> Joshua Colp wrote:
>     How about three. total_duration, talking_duration, silence_duration. While given total and one of the others you can derive the other... I think from a user perspective looking at the API it'll just become obvious and feel more natural.

That would also work.


- Samuel


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


On July 13, 2014, 10:21 p.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3770/
> -----------------------------------------------------------
> 
> (Updated July 13, 2014, 10:21 p.m.)
> 
> 
> Review request for Asterisk Developers and Samuel Galarneau.
> 
> 
> Bugs: ASTERISK-24037
>     https://issues.asterisk.org/jira/browse/ASTERISK-24037
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch adds two new fields to the LiveRecording model, duration and energy_duration. duration is the time, in seconds, of the entire recording as reported by the Asterisk core; energy_duration is the time, in seconds, of the recording minus any silence that was detected while recording took place.
> 
> This is particularly useful when you want to throw away short recordings or recordings that are all silence.
> 
> Example RecordingFinished event:
> 
> {
>  "application":"testsuite",
>  "type":"RecordingFinished",
>  "recording":{"state":"done",
>               "format":"wav",
>               "name":"superfly",
>               "duration":5,
>               "target_uri":"channel:1405289721.1",
>               "energy_duration":4
>              }
> }
> 
> 
> Diffs
> -----
> 
>   /branches/12/rest-api/api-docs/recordings.json 418507 
>   /branches/12/res/res_stasis_recording.c 418507 
>   /branches/12/res/ari/ari_model_validators.c 418507 
>   /branches/12/res/ari/ari_model_validators.h 418507 
> 
> Diff: https://reviewboard.asterisk.org/r/3770/diff/
> 
> 
> Testing
> -------
> 
> Testsuite tests will still need to be written for this feature. This will review will be updated once a test has been written that verifies audio + silence + audio along with expected durations.
> 
> 
> Thanks,
> 
> Matt Jordan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140715/31b9644e/attachment.html>


More information about the asterisk-dev mailing list