app_signal: Add tests for Signal and WaitForSignal
[asterisk/testsuite.git] / tests / rest_api / channels / playback / lists / basic / test-config.yaml
1 testinfo:
2     summary: 'Test playback start and manipulation using IDs'
3     description: |
4         * Originate a channel
5         * Playback a list of audio files
6         * Pause it
7         * Unpause it
8         * Restart it
9         * Delete the channel
10         * Validate all the events
11
12 properties:
13     minversion: '14.0.0'
14     dependencies:
15         - python : autobahn.websocket
16         - python : requests
17         - python : twisted
18         - python : starpy
19         - asterisk : res_ari_channels
20         - asterisk : res_ari_playbacks
21         - asterisk : app_echo
22     tags:
23         - ARI
24
25 test-modules:
26     test-object:
27         config-section: test-object-config
28         typename: ari.AriOriginateTestObject
29     modules:
30         -
31             config-section: ari-config
32             typename: ari.WebSocketEventModule
33         -
34             config-section: ari-test-stopper
35             typename: pluggable_modules.EventActionModule
36         -
37             config-section: asterisk-config
38             typename: pluggable_modules.AsteriskConfigModule
39
40 asterisk-config:
41     -
42         src: 'tests/rest_api/channels/playback/lists/configs/extensions.conf'
43         dst: 'extensions.conf'
44
45 test-object-config:
46     stop-on-end: False
47
48 ari-test-stopper:
49     -
50         ari-events:
51             match:
52                 type: ChannelDestroyed
53                 application: testsuite
54                 channel:
55                     id: 'testsuite-default-id$'
56         stop_test:
57
58 ari-config:
59     apps: testsuite
60     events:
61         -
62             conditions:
63                 match:
64                     type: 'ChannelStateChange'
65             count: '>1'
66         -
67             conditions:
68                 match:
69                     type: StasisStart
70                     application: testsuite
71                     channel:
72                         id: 'testsuite-default-id$'
73             count: 1
74             requests:
75                 method: 'post'
76                 uri: 'channels/testsuite-default-id/play/MyPlaybackId'
77                 params:
78                     media: 'sound:silence/1,sound:silence/2,sound:silence/3'
79         -
80             conditions:
81                 match:
82                     type: PlaybackStarted
83                     application: testsuite
84                     playback:
85                         id: 'MyPlaybackId'
86                         media_uri: 'sound:silence/1'
87                         next_media_uri: 'sound:silence/2'
88                         target_uri: 'channel:testsuite-default-id$'
89                         state: 'playing'
90             count: 1
91         -
92             conditions:
93                 match:
94                     type: PlaybackContinuing
95                     application: testsuite
96                     playback:
97                         id: 'MyPlaybackId'
98                         media_uri: 'sound:silence/1'
99                         next_media_uri: 'sound:silence/2'
100                         target_uri: 'channel:testsuite-default-id$'
101                         state: 'continuing'
102             count: 1
103         -
104             conditions:
105                 match:
106                     type: PlaybackStarted
107                     application: testsuite
108                     playback:
109                         id: 'MyPlaybackId'
110                         media_uri: 'sound:silence/2'
111                         next_media_uri: 'sound:silence/3'
112                         target_uri: 'channel:testsuite-default-id$'
113                         state: 'playing'
114             count: 1
115         -
116             conditions:
117                 match:
118                     type: PlaybackContinuing
119                     application: testsuite
120                     playback:
121                         id: 'MyPlaybackId'
122                         media_uri: 'sound:silence/2'
123                         next_media_uri: 'sound:silence/3'
124                         target_uri: 'channel:testsuite-default-id$'
125                         state: 'continuing'
126             count: 1
127         -
128             conditions:
129                 match:
130                     type: PlaybackStarted
131                     application: testsuite
132                     playback:
133                         id: 'MyPlaybackId'
134                         media_uri: 'sound:silence/3'
135                         target_uri: 'channel:testsuite-default-id$'
136                         state: 'playing'
137             count: 2
138             requests:
139                 -
140                     instance: 1
141                     delay: 1
142                     method: 'post'
143                     uri: 'playbacks/MyPlaybackId/control'
144                     params:
145                         operation: pause
146                     # pause operation does not generate an event
147                 -
148                     instance: 1
149                     delay: 2
150                     method: 'post'
151                     uri: 'playbacks/MyPlaybackId/control'
152                     params:
153                         operation: unpause
154                     # unpause operation triggers PlaybackStarted instance #2
155                 -
156                     instance: 2
157                     method: 'post'
158                     uri: 'playbacks/MyPlaybackId/control'
159                     params:
160                         operation: restart
161         -
162             conditions:
163                 match:
164                     type: PlaybackFinished
165                     application: testsuite
166                     playback:
167                         id: 'MyPlaybackId'
168                         media_uri: 'sound:silence/3'
169                         target_uri: 'channel:testsuite-default-id$'
170                         state: 'done'
171             count: 1
172             requests:
173                 # playback is already deleted
174                 method: 'delete'
175                 uri: 'channels/testsuite-default-id'
176         -
177             conditions:
178                 match:
179                     type: ChannelHangupRequest
180                     application: testsuite
181                     channel:
182                         id: 'testsuite-default-id$'
183             count: 1
184
185         -
186             conditions:
187                 match:
188                     type: StasisEnd
189                     application: testsuite
190                     channel:
191                         id: 'testsuite-default-id$'
192             count: 1