[asterisk-bugs] [JIRA] (ASTERISK-24010) Testsuite: Create a general pluggable module that performs energy detection on a specified file

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Jul 9 11:19:56 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan moved SWP-7113 to ASTERISK-24010:
---------------------------------------------

    Asterisk Issue Guidelines: Yes.
                     Security: None  (was: Digium Only)
                  Component/s:     (was: Asterisk Test Suite)
                               Tests/testsuite
                 Story Points:   (was: 8)
                   Regression: No
                     Workflow: Subtask and Courtesy Workflow  (was: Software Planning Workflow)
                          Key: ASTERISK-24010  (was: SWP-7113)
                      Project: Asterisk  (was: Software Planning (Internal))

> Testsuite: Create a general pluggable module that performs energy detection on a specified file
> -----------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24010
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24010
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Tests/testsuite
>            Reporter: Matt Jordan
>            Assignee: Christopher Wolfe
>
> A large number of tests have to record a file. Examples include the {{tests/apps/mixmonitor}} test, as well as the {{chanspy_w_mixmonitor}} test.
> Many of these tests have to verify two properties:
> # That some energy was recorded in the file. This is typically done using the [BackgroundDetect|https://wiki.asterisk.org/wiki/display/AST/Application_BackgroundDetect?src=search] application, and is performed after the test runs. When the test has completed, a Local channel is typically started which - on one half of the Local channel, performs a Playback of the recorded file, while the other half sits in BackgroundDetect. If talking is detected, an AGI (or UserEvent) is fired.
> # That the file is of a certain size, within some expected tolerance. This verifies that the entire file was written out to disk.
> We need a pluggable module to verify this. This module should be able to do the following:
> # Find either a specific file (given by a hard coded path) or a file in a relative location to some instance of Asterisk's location. That is, if there are two instances of Asterisk in a test, and the test being executed is run 4, and we need to find a file named 'talking.wav' in the {{monitor}} directory of the second Asterisk instance, then the module should construct this as:
> {noformat}
> /tmp/asterisk-testsuite/[test path]/run_4/ast2/var/spool/asterisk/monitor/talking.wav
> {noformat}
> # If the file does not exist, fail the test.
> # For the specified file, optionally check the file size within some expected tolerance. 
> # For the specified file, optionally Originate a channel into a location in the dialplan and perform a BackgroundDetect on the specified file. This can use the Originator module directly from this pluggable module. The documentation for the pluggable module should specify directly the dialplan that must exist for it to work. The location of the extensions for the Local channel that performs the analysis should be configurable.
> # Support doing all of the above for one or more files
> A proposed YAML schema:
> {code}
> file-analyzer:
>     id: '2' # Asterisk instance to look at
>     files:
>         -
>             file_name: 'monitor/talking.wav'
>             file_path_type: 'relative'
>             actions:
>                 -
>                     type: 'size_check'
>                     size: '50000'
>                     tolerance: '5000'
>                 -
>                     type: 'energy_check'
>                     channel: 'Local/sound_check at default'
>                     context: 'default'
>                     exten: 'play_file'
>                     priority: '1'
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list