[svn-commits] mjordan: testsuite/asterisk/trunk r5433 - in /asterisk/trunk/tests/rest_api/r...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Aug 12 15:12:19 CDT 2014
Author: mjordan
Date: Tue Aug 12 15:12:08 2014
New Revision: 5433
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5433
Log:
rest_api/recording/duration: Actually add the test files
(Forgot to svn add the duration directory. Whoops.)
Added:
asterisk/trunk/tests/rest_api/recording/duration/
asterisk/trunk/tests/rest_api/recording/duration/configs/
asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/
asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml (with props)
Added: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf?view=auto&rev=5433
==============================================================================
--- asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf Tue Aug 12 15:12:08 2014
@@ -1,0 +1,21 @@
+[listener]
+exten => s,1,Answer()
+same => n,Echo()
+same => n,Hangup()
+
+[default]
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
+
+[soundtest]
+exten => audio,1,Answer()
+same => n,Set(TALK_DETECTED=0)
+same => n,BackgroundDetect(${SOUNDFILE},1,20,,20000)
+same => n,GoToIf($[${TALK_DETECTED}=0]?true:false)
+same => n(false),UserEvent(soundcheck, status: pass)
+same => n,Hangup()
+
+same => n(true),UserEvent(soundcheck, status: fail)
+same => n,Hangup()
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/recording/duration/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml?view=auto&rev=5433
==============================================================================
--- asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml Tue Aug 12 15:12:08 2014
@@ -1,0 +1,150 @@
+testinfo:
+ summary: Test detection of duration and talking_duration values of an ARI
+ recording. Also checks sound file size and energy levels.
+ description: |
+ This test creates two local channel halves that get sent into ARI.
+ One half plays the sound file once, which is tt-somethingwrong in this
+ instance, plays silence/2 to create two seconds of silence, and
+ then plays tt-somethingwrong again. The other half records the sound
+ files as they are being played. Checks the duration values then hangs up
+ the Local channel. Upon hanging up the channel, the SoundChecker
+ pluggable module checks the file size of the produced recording and also uses
+ BackgroundDetect to check if energy levels are sufficient.
+
+test-modules:
+ add-test-to-search-path: True
+ test-object:
+ config-section: test-object-config
+ typename: ari.AriOriginateTestObject
+ modules:
+ - config-section: ari-config
+ typename: ari.WebSocketEventModule
+ - config-section: sound-file-analyzer
+ typename: pluggable_modules.SoundChecker
+
+apps: testsuite
+
+test-object-config:
+ test-iterations:
+ -
+ endpoint: 'Local/s at default'
+ channelId: 'end1'
+ otherChannelId: 'end2'
+ app: 'testsuite'
+
+
+ari-config:
+ events:
+ -
+ conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'end1'
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'end2'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'channels/end1/record'
+ params:
+ name: 'the_recording'
+ format: 'wav'
+ maxSilenceSeconds: 4
+ #maxDurationSeconds: 10
+ -
+ conditions:
+ match:
+ type: RecordingStarted
+ application: testsuite
+ recording:
+ name: 'the_recording'
+ format: 'wav'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound1'
+ params:
+ media: 'sound:tt-somethingwrong'
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound2'
+ params:
+ media: 'sound:silence/2'
+ -
+ method: 'post'
+ uri: 'channels/end2/play/sound3'
+ params:
+ media: 'sound:tt-somethingwrong'
+ -
+ conditions:
+ match:
+ type: PlaybackFinished
+ application: testsuite
+ playback:
+ id: 'sound3'
+ target_uri: 'channel:end2$'
+ media_uri: 'sound:tt-somethingwrong'
+ count: 1
+ requests:
+ -
+ method: 'post'
+ uri: 'recordings/live/the_recording/stop'
+ -
+ conditions:
+ match:
+ type: RecordingFinished
+ application: testsuite
+ recording:
+ duration: 6
+ talking_duration: 4
+ silence_duration: 2
+ count: 1
+ requests:
+ -
+ method: 'delete'
+ uri: 'channels/end1'
+
+sound-file-analyzer:
+ auto-stop: True
+ sound-file-config:
+ -
+ trigger:
+ match:
+ event: 'Hangup'
+ channel: 'Local/s at default-.*'
+ sound-file:
+ file-name: 'recording/the_recording.wav'
+ file-path-type: 'relative'
+ actions:
+ -
+ type: 'size_check'
+ size: 96000
+ tolerance: 2000
+ -
+ type: 'energy_check'
+ channel: 'Local/audio at soundtest'
+ context: 'listener'
+ exten: 's'
+ priority: '1'
+
+properties:
+ minversion: '12.5.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : res_ari_recordings
+ - asterisk : res_stasis
+ tags:
+ - ARI
+
+
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/recording/duration/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the svn-commits
mailing list