[Home]

Summary:ASTERISK-24586: TestSuite: Write channel subscription tests for ARI
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-12-02 16:38:48.000-0600Date Closed:2015-03-06 13:47:00.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_ari Resources/res_ari_channels Resources/res_stasis Tests/testsuite
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When ARI creates a channel, it creates an implicit subscription for that channel. Certain aspects of that subscription are not currently tested - namely, persisting a subscription out to both halves of a Local channel.

We currently have tests for:
* Subscribing to channels ({{tests/rest_api/applications/subscribe-channel}})
* Creating channels:
** Vanilla - {{tests/rest_api/channels/originate}}
** With an ID - {{tests/rest_api/channels/originate_with_id}}
** With variables - {{tests/rest_api/channels/originate_with_vars}}
** With a continue - {{tests/rest_api/channels/originate_then_continue}}

There are a few gaps here:
* Creation of channels to the dialplan
* Creation of channels to other Stasis applications

Both of these should be covered with Local and non-Local channels.

h1. Originate to Dialplan

h2. Local channels

* Create a Local channel using {{POST /channels}}. Both halves of the Local channel should be sent to different dialplan locations.
* Verify that no {{StasisStart}} event is received for the channel halves, and that no subsequent ARI events are received
* Verify that the Local channels execute dialplan at the correct location

h2. PJSIP channel (non-Local)

* Create a PJSIP channel using {{POST /channels}}. The destination of the channel on Answer should be a dialplan location.
* Verify that no {{StasisStart}} event is received for the channel. Verify that no subsequent ARI events are received.
* Verify that on answer, the PJSIP channel executes dialplan at the correct location.

h1. Originate to Stasis application

*Note*: Most tests currently already do this. What they don't test is creating a Local channel and checking the subscription of the portion sent to the dialplan.

h2. Local channels

* Create a Local channel using {{POST /channels}}. One half should be sent to the application that created the channel; the other should be sent to the dialplan.
* Verify that a {{StasisStart}} event is received for the {{;1}} half. Verify that the {{;2}} side executes dialplan, and that the {{Stasis}} application receives ARI events showing the progress of dialplan execution.

h1. Originate to other Stasis application

h2. Local channels

* Create a Local channel using {{POST /channels}}. One half should be sent to a separate Stasis application; the other should be sent to the dialplan.
* Verify that the application that created the channel does *not* receive a {{StasisStart}} event.
* Verify that a {{StasisStart}} event is received for the {{;1}} half in the application that the channel was sent to. Verify that the {{;2}} side executes dialplan, and that the {{Stasis}} application specified receives ARI events showing the progress of dialplan execution.

h2. PJSIP channel (non-Local)

* Create a PJSIP channel using {{POST /channels}} with a destination of a separate Stasis application than the one that created the channel.
* Verify that the application that created the channel does *not* receive a {{StasisStart}} event.
* Verify that a {{StasisStart}} event is received in the application that the channel was sent to.

Comments:By: John Bigelow (jbigelow) 2015-03-06 13:46:50.269-0600

Committed revision 6491.