[asterisk-commits] file: testsuite/asterisk/trunk r6062 - in /asterisk/trunk/tests/rest_api/chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 9 09:47:57 CST 2014


Author: file
Date: Tue Dec  9 09:47:51 2014
New Revision: 6062

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6062
Log:
ari: Add test for originating with an originator specified.

This test does two originations:

1. The first origination specifies a custom channel uniqueid and waits.
2. The second origination is triggered when the first channel is in Stasis.
3. The second origination specifies the first channel as the originator.
4. The linkedid of the second channel is confirmed to be the uniqueid of the first channel.

ASTERISK-24552 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/4244/

Added:
    asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/
    asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/
    asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/
    asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/rest_api/channels/tests.yaml

Added: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf?view=auto&rev=6062
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf Tue Dec  9 09:47:51 2014
@@ -1,0 +1,16 @@
+[default]
+
+exten => stasis,1,NoOp()
+	same => n,Answer()
+	same => n,Stasis(testsuite)
+	same => n,Hangup()
+
+exten => one,1,NoOp()
+	same => n,Answer()
+	same => n,Wait(5)
+	same => n,Hangup()
+
+exten => two,1,NoOp()
+	same => n,Answer()
+	same => n,Wait(1)
+	same => n,Hangup()

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml?view=auto&rev=6062
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml Tue Dec  9 09:47:51 2014
@@ -1,0 +1,87 @@
+
+testinfo:
+    summary: 'Test LinkedID propagation with specified originator on ARI Originate'
+    description: |
+        * Originate the first channel with a defined Unique ID
+        * Once the first channel enters the Stasis application originate a second channel
+          * The second channel specifies the first channel as its originator
+        * Hang up the first channel once the second channel has hung up
+        * Check that the CEL events for the second channel contain the unique id of the first channel as the linked id
+
+properties:
+    minversion: '13.2.0'
+    dependencies:
+        - python : autobahn.websocket
+        - python : requests
+        - python : twisted
+        - python : starpy
+        - asterisk : res_ari_channels
+    tags:
+        - ARI
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: ari.AriOriginateTestObject
+    modules:
+        -
+            config-section: ari-config
+            typename: ari.WebSocketEventModule
+        -
+            config-section: cel-config
+            typename: 'ami.AMIEventModule'
+        -
+            config-section: ari-test-stopper
+            typename: pluggable_modules.EventActionModule
+
+test-object-config:
+    stop-on-end: False
+    test-iterations:
+        -
+            endpoint: 'Local/one at default'
+            channelId: 'MyCustomId'
+            app: 'testsuite'
+
+ari-test-stopper:
+    -
+        ari-events:
+            match:
+                type: ChannelDestroyed
+                application: testsuite
+                channel:
+                    id: 'MySecondId$'
+        stop_test:
+
+ari-config:
+    apps: testsuite
+    events:
+        -
+            # detect the first local channel
+            conditions:
+                match:
+                    type: StasisStart
+                    application: testsuite
+                    channel:
+                        id: 'MyCustomId$'
+            requests:
+                method: 'post'
+                uri: 'channels?originator=MyCustomId&app=testsuite&endpoint=Local%2Ftwo%40default&channelId=MySecondId'
+            count: 1
+
+cel-config:
+    -
+        type: 'cel'
+        conditions:
+            match:
+                Channel: 'Local/two at default-.{7}1;.'
+        requirements:
+            -
+                match:
+                    Channel: 'Local/two at default-.{7}1;1'
+                    EventName: 'CHAN_START'
+                    LinkedId: 'MyCustomId'
+            -
+                match:
+                    Channel: 'Local/two at default-.{7}1;2'
+                    EventName: 'CHAN_START'
+                    LinkedId: 'MyCustomId'

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rest_api/channels/originate_with_linkedid/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/rest_api/channels/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/tests.yaml?view=diff&rev=6062&r1=6061&r2=6062
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/channels/tests.yaml Tue Dec  9 09:47:51 2014
@@ -2,6 +2,7 @@
     - test: 'originate'
     - test: 'originate_with_vars'
     - test: 'originate_with_id'
+    - test: 'originate_with_linkedid'
     - test: 'originate_then_continue'
     - test: 'snoop_whisper'
     - test: 'snoop_spy'




More information about the asterisk-commits mailing list