[svn-commits] jrose: testsuite/asterisk/trunk r5499 - in /asterisk/trunk/tests/rest_api/cha...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 21 17:59:48 CDT 2014
Author: jrose
Date: Thu Aug 21 17:59:43 2014
New Revision: 5499
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5499
Log:
Testsuite/ARI: Add a test for continuing from origating to an ARI application
Tests against an errant behavior described in ASTERISK-24043 where a Channel
would simply hang up after being told to continue from an ARI application if
it was originated to the ARI application without a PBX thread.
ASTERISK-24043 #close
Reported by: Krandon Bruse
Added:
asterisk/trunk/tests/rest_api/channels/originate_then_continue/
asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py (with props)
asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/
asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/
asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
asterisk/trunk/tests/rest_api/channels/tests.yaml
Modified: asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml?view=diff&rev=5499&r1=5498&r2=5499
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml (original)
+++ asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml Thu Aug 21 17:59:43 2014
@@ -6,7 +6,6 @@
test-modules:
add-test-to-search-path: True
test-object:
- config-section: test-object-config
typename: ari.AriTestObject
modules:
- config-section: ari-config
Added: asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py?view=auto&rev=5499
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py (added)
+++ asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py Thu Aug 21 17:59:43 2014
@@ -1,0 +1,24 @@
+'''
+Copyright (C) 2014, Digium, Inc.
+Jonathan Rose <jrose at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import logging
+
+LOGGER = logging.getLogger(__name__)
+
+def on_kickoff_start(ari, event, test_object):
+ LOGGER.debug("on_kickoff_start(%r)" % event)
+ ari.post('channels', endpoint='Local/1000 at default', app='testsuite',
+ channelId='continue_guy', appArgs='dummy')
+ ari.delete('channels', event['channel']['id'])
+ return True
+
+def on_channel_destroyed(ari, event, test_object):
+ LOGGER.debug("on_channel_destroyed(%r)" % event)
+ if event['channel']['id'] == 'continue_guy':
+ test_object.stop_reactor()
+ return True
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py
------------------------------------------------------------------------------
svn:executable = *
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/channel_originate.py
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf?view=auto&rev=5499
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf Thu Aug 21 17:59:43 2014
@@ -1,0 +1,14 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
+
+exten => 1000,1,Answer
+ same => n,Echo()
+
+exten => 2000,1,Answer
+ same => n,UserEvent(ExtensionExecuted)
+ same => n,Wait(2)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml?view=auto&rev=5499
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml Thu Aug 21 17:59:43 2014
@@ -1,0 +1,78 @@
+testinfo:
+ summary: Test continuing from calls originated into Stasis using ARI
+ description: |
+ Originate a call into ARI and then have that call continue to a PBX
+ extension that will generate the user event. Check for the user event
+ and all anticipated Stasis events.
+
+test-modules:
+ add-test-to-search-path: True
+ test-object:
+ typename: ari.AriTestObject
+ modules:
+ - config-section: ari-config
+ typename: ari.WebSocketEventModule
+
+ - config-section: ami-config
+ typename: ami.AMIEventModule
+
+ari-config:
+ apps: testsuite
+ events:
+ - conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ nomatch:
+ channel:
+ id: 'continue_guy'
+ count: 1
+ callback:
+ module: channel_originate
+ method: on_kickoff_start
+ - conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'continue_guy'
+ requests:
+ # Set the channel to continue
+ method: 'post'
+ uri: 'channels/continue_guy/continue'
+ params:
+ context: 'default'
+ extension: '2000'
+ priority: 1
+
+ count: 1
+ - conditions:
+ match:
+ type: ChannelDestroyed
+ application: testsuite
+ count: 2
+ callback:
+ module: channel_originate
+ method: on_channel_destroyed
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ requirements:
+ match:
+ UserEvent: 'ExtensionExecuted'
+
+properties:
+ minversion: '12.6.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : app_echo
+ tags:
+ - ARI
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate_then_continue/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=5499&r1=5498&r2=5499
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/channels/tests.yaml Thu Aug 21 17:59:43 2014
@@ -2,6 +2,7 @@
- test: 'originate'
- test: 'originate_with_vars'
- test: 'originate_with_id'
+ - test: 'originate_then_continue'
- test: 'snoop_whisper'
- test: 'snoop_spy'
- test: 'snoop_id'
More information about the svn-commits
mailing list