[svn-commits] jbigelow: testsuite/asterisk/trunk r4281 - in /asterisk/trunk: configs/bridge...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 23 12:01:38 CDT 2013


Author: jbigelow
Date: Wed Oct 23 12:01:30 2013
New Revision: 4281

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4281
Log:
Add support for the 'atxferthreeway' feature and a test to test the feature

This does the following:
* adds support for the 'atxferthreeway' feature to the BridgeTestCase class
* adds a test to verify that the 'atxferthreeway' feature is detected and
executed.

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


Added:
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf   (with props)
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf   (with props)
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf   (with props)
    asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml   (with props)
Modified:
    asterisk/trunk/configs/bridge/ast1/features.conf
    asterisk/trunk/lib/python/asterisk/BridgeTestCase.py
    asterisk/trunk/sample-yaml/bridge-config.yaml.sample
    asterisk/trunk/tests/bridge/tests.yaml

Modified: asterisk/trunk/configs/bridge/ast1/features.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/configs/bridge/ast1/features.conf?view=diff&rev=4281&r1=4280&r2=4281
==============================================================================
--- asterisk/trunk/configs/bridge/ast1/features.conf (original)
+++ asterisk/trunk/configs/bridge/ast1/features.conf Wed Oct 23 12:01:30 2013
@@ -1,4 +1,5 @@
 [general]
+atxferthreeway => 7
 
 [featuremap]
 blindxfer => 1

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=4281&r1=4280&r2=4281
==============================================================================
--- asterisk/trunk/lib/python/asterisk/BridgeTestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/BridgeTestCase.py Wed Oct 23 12:01:30 2013
@@ -28,7 +28,8 @@
             'disconnect' : 3,
             'automon' : 4,
             'automixmon' : 5,
-            'parkcall' : 6
+            'parkcall' : 6,
+            'atxferthreeway' : 7
             }
 
     def __init__(self, test_path = '', test_config = None):
@@ -217,12 +218,14 @@
 
     # Callbacks for new bridging architecture
     def uut_bridge_create_callback(self, ami, event):
+        LOGGER.debug('Bridge ID: %s' % event.get('bridgeuniqueid'))
         self.uut_bridge_id = event.get('bridgeuniqueid')
 
     def uut_bridge_enter_callback(self, ami, event):
         if self.uut_bridge_id != event.get('bridgeuniqueid'):
             return
 
+        LOGGER.debug('Bridge ID: %s' % event.get('bridgeuniqueid'))
         channel = event.get('channel')
 
         if 'alice' in channel and self.uut_alice_channel is None:
@@ -239,6 +242,7 @@
                 self.send_hangup()
 
     def uut_bridge_leave_callback(self, ami, event):
+        LOGGER.debug('Bridge ID: %s' % event.get('bridgeuniqueid'))
         LOGGER.debug("Bridge is down")
         self.bridged = False
 

Modified: asterisk/trunk/sample-yaml/bridge-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/sample-yaml/bridge-config.yaml.sample?view=diff&rev=4281&r1=4280&r2=4281
==============================================================================
--- asterisk/trunk/sample-yaml/bridge-config.yaml.sample (original)
+++ asterisk/trunk/sample-yaml/bridge-config.yaml.sample Wed Oct 23 12:01:30 2013
@@ -49,6 +49,7 @@
 
 				# What feature should be executed? This must be either
 				# - atxfer
+				# - atxferthreeway
 				# - blindxfer
 				# - disconnect
 				# - automon

Added: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf?view=auto&rev=4281
==============================================================================
--- asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf Wed Oct 23 12:01:30 2013
@@ -1,0 +1,11 @@
+[default]
+
+exten => alice_atxfer,1,Dial(SIP/test_call at bob,,T)
+	same => n,Hangup()
+
+exten => bob_atxfer,1,Dial(SIP/test_call at bob,,t)
+        same => n,Hangup()
+
+exten => 123,1,NoOp(This is our transfer target)
+	same => n,Dial(SIP/transfer at charlie,,Tt)
+	same => n,Hangup()

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf?view=auto&rev=4281
==============================================================================
--- asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf (added)
+++ asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf Wed Oct 23 12:01:30 2013
@@ -1,0 +1,9 @@
+[alice-extra](!)
+
+[charlie]
+sendrpid=pai
+callerid=Charlie <5678>
+type = peer
+host = 127.0.0.1
+port = 5063
+

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast1/sip-alice.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf?view=auto&rev=4281
==============================================================================
--- asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf (added)
+++ asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf Wed Oct 23 12:01:30 2013
@@ -1,0 +1,8 @@
+[general]
+
+[default]
+
+exten => transfer,1,NoOp(Incoming call transfer)
+same => n,Answer()
+same => n,Wait(1)
+same => n,Echo()

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf?view=auto&rev=4281
==============================================================================
--- asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf (added)
+++ asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf Wed Oct 23 12:01:30 2013
@@ -1,0 +1,7 @@
+[general]
+udpbindaddr=127.0.0.1:5063
+
+[uut]
+type=peer
+host=127.0.0.1
+port=5060

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/configs/ast4/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml?view=auto&rev=4281
==============================================================================
--- asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml (added)
+++ asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml Wed Oct 23 12:01:30 2013
@@ -1,0 +1,115 @@
+testinfo:
+    summary: 'Test the attended transfer three-way call feature'
+    description: |
+        'Set up a bridge between two endpoints and initiate an attended
+        transfer without completing it. Then execute the attended transfer
+        three-way call feature and ensure it is detected and executed properly.
+        Two transfers are performed; one initiated by Alice, and the other by
+        Bob. In both cases, the destination is Charlie.'
+
+test-modules:
+    test-object:
+        config-section: bridge-config
+        typename: 'BridgeTestCase.BridgeTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+        -
+            config-section: 'hangup-config'
+            typename: 'PluggableModules.AMIChannelHangupAll'
+
+bridge-config:
+    asterisk-instances: 4
+    test-runs:
+      -
+          originate_channel: 'SIP/alice_atxfer at uut'
+          features:
+              -
+                  who: 'alice'
+                  what: 'atxfer'
+                  success: 'true'
+                  exten: '123'
+              -
+                  who: 'alice'
+                  what: 'atxferthreeway'
+                  success: 'true'
+      -
+          originate_channel: 'SIP/bob_atxfer at uut'
+          features:
+              -
+                  who: 'bob'
+                  what: 'atxfer'
+                  success: 'true'
+                  exten: '123'
+              -
+                  who: 'bob'
+                  what: 'atxferthreeway'
+                  success: 'true'
+
+ami-config:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'BridgeMerge'
+        requirements:
+            match:
+                ToBridgeNumChannels: '1'
+                FromBridgeNumChannels: '2'
+        count: '2'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'AttendedTransfer'
+                OrigTransfererChannel: 'SIP/alice-*'
+                OrigTransfererConnectedLineNum: '5678'
+                OrigTransfererConnectedLineName: 'Charlie'
+                SecondTransfererChannel: 'SIP/alice-*'
+                SecondTransfererConnectedLineNum: '5678'
+                SecondTransfererConnectedLineName: 'Charlie'
+                DestType: 'Threeway'
+        requirements:
+            match:
+                Result: 'Success'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'AttendedTransfer'
+                OrigTransfererChannel: 'SIP/bob-*'
+                OrigTransfererConnectedLineNum: '5678'
+                OrigTransfererConnectedLineName: 'Charlie'
+                SecondTransfererChannel: 'SIP/bob-*'
+                SecondTransfererConnectedLineNum: '5678'
+                SecondTransfererConnectedLineName: 'Charlie'
+                DestType: 'Threeway'
+        requirements:
+            match:
+                Result: 'Success'
+        count: '1'
+
+hangup-config:
+    type: 'headermatch'
+    id: '0'
+    conditions:
+        match:
+            Event: 'VarSet'
+            Channel: 'SIP/charlie-*'
+            ChannelState: '6'
+            Variable: 'BRIDGEPEER'
+            Value: '(SIP/bob-.{8},SIP/alice-.{8}|SIP/alice-.{8},SIP/bob-.{8})'
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - buildoption: 'TEST_FRAMEWORK'
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - bridge

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/bridge/atxfer_threeway_nominal/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/bridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/bridge/tests.yaml?view=diff&rev=4281&r1=4280&r2=4281
==============================================================================
--- asterisk/trunk/tests/bridge/tests.yaml (original)
+++ asterisk/trunk/tests/bridge/tests.yaml Wed Oct 23 12:01:30 2013
@@ -20,3 +20,4 @@
     - test: 'transfer_capabilities_bridgefeatures'
     - test: 'transfer_failure'
     - test: 'bridge_action'
+    - test: 'atxfer_threeway_nominal'




More information about the svn-commits mailing list