[svn-commits] kmoore: testsuite/asterisk/trunk r3678 - in /asterisk/trunk: lib/python/aster...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Mar 22 09:49:09 CDT 2013
Author: kmoore
Date: Fri Mar 22 09:49:05 2013
New Revision: 3678
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3678
Log:
Add tests for failed transfers
This integration test includes four subtests for failed transfers due
to bad extensions provided by the user. The four subtests cover blind
and attended transfers from caller and callee.
(closes issue SWP-5319)
Review: https://reviewboard.asterisk.org/r/2407/
Added:
asterisk/trunk/tests/bridge/transfer_failure/
asterisk/trunk/tests/bridge/transfer_failure/configs/
asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/
asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml (with props)
Modified:
asterisk/trunk/lib/python/asterisk/BridgeTestCase.py
asterisk/trunk/tests/bridge/tests.yaml
Modified: asterisk/trunk/lib/python/asterisk/BridgeTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/BridgeTestCase.py?view=diff&rev=3678&r1=3677&r2=3678
==============================================================================
--- asterisk/trunk/lib/python/asterisk/BridgeTestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/BridgeTestCase.py Fri Mar 22 09:49:05 2013
@@ -267,6 +267,13 @@
ami.playDTMF(channel, BridgeTestCase.FEATURE_MAP[feature['what']])
sleep(0.25)
+ if (feature['what'] == 'blindxfer' or feature['what'] == 'atxfer') and 'exten' in feature:
+ # playback the extension requested
+ for digit in list(feature['exten']):
+ sleep(0.25)
+ ami.playDTMF(channel, digit)
+ sleep(0.25)
+
def test_callback(self, ami, event):
if event.get('state') != 'FEATURE_DETECTION':
return
Modified: asterisk/trunk/tests/bridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/tests.yaml?view=diff&rev=3678&r1=3677&r2=3678
==============================================================================
--- asterisk/trunk/tests/bridge/tests.yaml (original)
+++ asterisk/trunk/tests/bridge/tests.yaml Fri Mar 22 09:49:05 2013
@@ -10,3 +10,4 @@
- test: 'dial_LS_options'
- test: 'connected_line_update'
- test: 'transfer_capabilities'
+ - test: 'transfer_failure'
Added: asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf?view=auto&rev=3678
==============================================================================
--- asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf Fri Mar 22 09:49:05 2013
@@ -1,0 +1,14 @@
+[default]
+
+exten => alice_blind,1,Dial(SIP/test_call at bob,,T)
+same => n,Hangup()
+
+exten => alice_attended,1,Dial(SIP/test_call at bob,,T)
+same => n,Hangup()
+
+exten => bob_blind,1,Dial(SIP/test_call at bob,,t)
+same => n,Hangup()
+
+exten => bob_attended,1,Dial(SIP/test_call at bob,,t)
+same => n,Hangup()
+
Propchange: asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/bridge/transfer_failure/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml?view=auto&rev=3678
==============================================================================
--- asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml (added)
+++ asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml Fri Mar 22 09:49:05 2013
@@ -1,0 +1,556 @@
+testinfo:
+ summary: 'Test failed blind and attended transfers via T and t dial options'
+ description: |
+ 'Test failed blind and attended transfers from Alice and Bob to ensure
+ that transfer attempts with invalid extensions do not succeed.'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ tags:
+ - bridge
+
+test-modules:
+ test-object:
+ config-section: bridge-config
+ typename: 'BridgeTestCase.BridgeTestCase'
+ modules:
+ -
+ config-section: 'ami-config'
+ typename: 'ami.AMIEventModule'
+ -
+ config-section: 'cel-config'
+ typename: 'cel.CELModule'
+ -
+ config-section: 'cdr-config'
+ typename: 'cdr.CDRModule'
+
+bridge-config:
+ -
+ originate_channel: 'SIP/alice_blind at uut'
+ hangup: 'alice'
+ features:
+ -
+ who: 'alice'
+ what: 'blindxfer'
+ success: 'true'
+ exten: '77'
+ -
+ originate_channel: 'SIP/alice_attended at uut'
+ hangup: 'alice'
+ features:
+ -
+ who: 'alice'
+ what: 'atxfer'
+ success: 'true'
+ exten: '77'
+ -
+ originate_channel: 'SIP/bob_blind at uut'
+ hangup: 'bob'
+ features:
+ -
+ who: 'bob'
+ what: 'blindxfer'
+ success: 'true'
+ exten: '77'
+ -
+ originate_channel: 'SIP/bob_attended at uut'
+ hangup: 'bob'
+ features:
+ -
+ who: 'bob'
+ what: 'atxfer'
+ success: 'true'
+ exten: '77'
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'VarSet'
+ Variable: 'BLINDTRANSFER'
+ count: '0'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'DTMF'
+ Digit: '7'
+ Direction: 'Received'
+ End: 'Yes'
+ count: '8'
+
+cel-config:
+ -
+ file: 'Master'
+ lines:
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'APP_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'BRIDGE_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'BRIDGE_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ eventextra: '16,.*/alice-.*,'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'APP_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ eventextra: '16,.*/alice-.*,ANSWER'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'LINKEDID_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_blind'
+ exten: 'alice_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'APP_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'BRIDGE_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'BRIDGE_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ eventextra: '16,.*/alice-.*,'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'APP_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ eventextra: '16,.*/alice-.*,ANSWER'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'LINKEDID_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'alice_attended'
+ exten: 'alice_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'APP_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'BRIDGE_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'BRIDGE_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ eventextra: '16,.*,'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'APP_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ eventextra: '16,.*,ANSWER'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'LINKEDID_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_blind'
+ exten: 'bob_blind'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'APP_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'CHAN_START'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'ANSWER'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'BRIDGE_START'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'BRIDGE_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ bridgepeer: '.*/bob-.*'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ eventextra: '16,.*,'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Bob'
+ cidnum: '4321'
+ channel: '.*/bob-.*'
+ app: 'AppDial'
+ appdata: '\(Outgoing Line\)'
+ -
+ eventtype: 'APP_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ app: 'Dial'
+ -
+ eventtype: 'HANGUP'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ eventextra: '16,.*,ANSWER'
+ -
+ eventtype: 'CHAN_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+ -
+ eventtype: 'LINKEDID_END'
+ cidname: 'Alice'
+ cidnum: '1234'
+ dnid: 'bob_attended'
+ exten: 'bob_attended'
+ context: 'default'
+ channel: '.*/alice-.*'
+
+cdr-config:
+ -
+ file: 'Master'
+ lines:
+ -
+ source: '1234'
+ destination: 'alice_blind'
+ dcontext: 'default'
+ callerid: '"Alice" <1234>'
+ channel: '.*/alice-.*'
+ dchannel: '.*/bob-.*'
+ lastapp: 'Dial'
+ disposition: 'ANSWERED'
+ amaflags: 'DOCUMENTATION'
+ -
+ source: '1234'
+ destination: 'alice_attended'
+ dcontext: 'default'
+ callerid: '"Alice" <1234>'
+ channel: '.*/alice-.*'
+ dchannel: '.*/bob-.*'
+ lastapp: 'Dial'
+ disposition: 'ANSWERED'
+ amaflags: 'DOCUMENTATION'
+ -
+ source: '1234'
+ destination: 'bob_blind'
+ dcontext: 'default'
+ callerid: '"Alice" <1234>'
+ channel: '.*/alice-.*'
+ dchannel: '.*/bob-.*'
+ lastapp: 'Dial'
+ disposition: 'ANSWERED'
+ -
+ source: '1234'
+ destination: 'bob_attended'
+ dcontext: 'default'
+ callerid: '"Alice" <1234>'
+ channel: '.*/alice-.*'
+ dchannel: '.*/bob-.*'
+ lastapp: 'Dial'
+ disposition: 'ANSWERED'
Propchange: asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/bridge/transfer_failure/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the svn-commits
mailing list