[svn-commits] kmoore: testsuite/asterisk/trunk r5387 - /asterisk/trunk/tests/rest_api/bridg...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 7 14:35:26 CDT 2014
Author: kmoore
Date: Thu Aug 7 14:35:19 2014
New Revision: 5387
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5387
Log:
Testsuite: Update ARI attended transfer test
This updates the ARI attended transfer test to handle the changes
introduced by review 3731 which adds new messages conveying movement of
channels by non-stasis entities.
ASTERISK-23941 #close
Review: https://reviewboard.asterisk.org/r/3732/
Modified:
asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py
asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml
Modified: asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py?view=diff&rev=5387&r1=5386&r2=5387
==============================================================================
--- asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py (original)
+++ asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py Thu Aug 7 14:35:19 2014
@@ -17,6 +17,7 @@
class TestLogic(object):
def __init__(self):
self.originated_id = None
+ self.swap_id = None
self.bridge_id = None
TEST = TestLogic()
@@ -53,6 +54,18 @@
ari.post('bridges', TEST.bridge_id, 'addChannel', channel=event['channel']['id'])
return True
+def on_swap_start(ari, event, test_object):
+ LOGGER.debug("on_swap_start(%r)" % event)
+
+ TEST.swap_id = event['channel']['id']
+ return True
+
+def on_swap_enter(ari, event, test_object):
+ LOGGER.debug("on_swap_enter(%r)" % event)
+
+ ari.delete('channels', TEST.swap_id)
+ return True
+
def on_attended_transfer(ari, event, test_object):
LOGGER.debug("on_attended_transfer(%r)" % event)
Modified: asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml?view=diff&rev=5387&r1=5386&r2=5387
==============================================================================
--- asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml (original)
+++ asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml Thu Aug 7 14:35:19 2014
@@ -63,12 +63,35 @@
method: on_test_start
- conditions:
match:
+ type: StasisStart
+ application: testsuite
+ args: []
+ channel:
+ name: 'Local/_attended at transfer-.*'
+ replace_channel:
+ name: 'PJSIP/bob-.*'
+ count: 1
+ callback:
+ module: attended_transfer
+ method: on_swap_start
+ - conditions:
+ match:
type: BridgeAttendedTransfer
application: testsuite
count: 1
callback:
module: attended_transfer
method: on_attended_transfer
+ - conditions:
+ match:
+ type: ChannelEnteredBridge
+ application: testsuite
+ channel:
+ name: 'Local/_attended at transfer-.*'
+ count: 1
+ callback:
+ module: attended_transfer
+ method: on_swap_enter
properties:
minversion: '12.1.0'
@@ -79,5 +102,7 @@
- python : starpy
- asterisk : res_ari_channels
- asterisk : app_echo
+ - asterisk : chan_pjsip
tags:
- ARI
+ - pjsip
More information about the svn-commits
mailing list