[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jun 13 15:16:16 CDT 2011


branch "review" has been updated
       via  b81f776bacffd2a2b048103ee7b1ab39e03dbd1a (commit)
      from  b0a77d405aafc2043b5ad79415586b0baec7ced5 (commit)

Summary of changes:
 plugins/sipp.py                                    |    2 +-
 .../scenarios/call-then-blind-transfer.xml         |  114 ++++++++++++++++++++
 .../scenarios/wait-for-call-do-hangup.xml          |   64 +++++++++++
 .../scenarios/wait-for-call.xml                    |   61 +++++++++++
 .../testcase.yaml                                  |  107 ++++++++++++++++++
 5 files changed, 347 insertions(+), 1 deletions(-)
 create mode 100644 tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml
 create mode 100644 tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml
 create mode 100644 tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml
 create mode 100644 tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml


- Log -----------------------------------------------------------------
commit b81f776bacffd2a2b048103ee7b1ab39e03dbd1a
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon Jun 13 15:16:08 2011 -0500

    test case and supporting scenario failes for blind transfer testing. additionally, a path change was made in the sipp module so that the scenario files would actually load from a scenario directory instead of in the test directory (makes things nice and clean).

diff --git a/plugins/sipp.py b/plugins/sipp.py
index ab61f0a..637645c 100644
--- a/plugins/sipp.py
+++ b/plugins/sipp.py
@@ -56,7 +56,7 @@ class plugin(TestSuite.RemoteBaseClass):
         return {'success':True}
 
     def _loadScenarioFile(self, fp, fn, remote):
-        fd = self.file().read(fp + '/' + fn)
+        fd = self.file().read(fp + '/scenarios/' + fn)
         return remote['rpc']('writeFile', fn, fd)
     
     def _execBuilder(self, list, string):
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml
new file mode 100644
index 0000000..3fbc69c
--- /dev/null
+++ b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Send Call then Blind Transfer">
+    <Global variables="file,user" />
+    <nop>
+        <action>
+            <lookup assign_to="line" file="[$file]" key="[$user]" />
+        </action>
+    </nop>
+    <Reference variables="file,user" />
+
+    <send retrans="500">
+        <![CDATA[
+
+        INVITE sip:[field2 line="[$line]"]@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: [field0 line="[$line]"] <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>;tag=[call_number]
+        To: [field2 line="[$line]"] <sip:[field2 line="[$line]"]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 INVITE
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Content-Type: application/sdp
+        Content-Length: [len]
+
+        v=0
+        o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+        s=-
+        c=IN IP[media_ip_type] [media_ip]
+        t=0 0
+        m=audio [media_port] RTP/AVP 0
+        a=rtpmap:0 PCMU/8000
+
+        ]]>
+    </send>
+
+    <recv response="100" optional="true" />
+    <recv response="180" optional="true" />
+    <recv response="183" optional="true" />
+    <recv response="200" rtd="true" rrs="true" />
+
+    <send>
+        <![CDATA[
+
+        ACK sip:[field2 line="[$line]"]@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: [field0 line="[$line]"] <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>;tag=[call_number]
+        To: [field2 line="[$line]"] <sip:[field2 line="[$line]"]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 ACK
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <pause milliseconds="1000" />
+
+    <send retrans="500">
+        <![CDATA[
+
+        REFER sip:[field2 line="[$line]"]@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: [field0 line="[$line]"] <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>;tag=[call_number]
+        To: [field2 line="[$line]"] <sip:[field2 line="[$line]"]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 2 REFER
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Content-Length: 0
+        Refer-To: <sip:[field3 line="[$line]"]@[remote_ip]:[remote_port]>
+        Reffered-By: <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>
+
+        ]]>
+    </send>
+
+    <recv response="202" optional="false" />
+    <recv request="NOTIFY" optional="false" />
+
+    <send>
+        <![CDATA[
+
+        SIP/2.0 200 OK
+        [last_Via:]
+        [last_From:]
+        [last_To:]
+        [last_Call-ID:]
+        [last_CSeq:]
+        [last_Record-Route:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv request="NOTIFY" optional="false" />
+
+    <send>
+        <![CDATA[
+
+        SIP/2.0 200 OK
+        [last_Via:]
+        [last_From:]
+        [last_To:]
+        [last_Call-ID:]
+        [last_CSeq:]
+        [last_Record-Route:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+</scenario>
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml
new file mode 100644
index 0000000..c3aa1e6
--- /dev/null
+++ b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="wait for a call, then hangup">
+    <Global variables="file,user" />
+    <nop>
+        <action>
+            <lookup assign_to="line" file="[$file]" key="[$user]" />
+        </action>
+    </nop>
+    <Reference variables="file,user" />
+
+    <recv request="INVITE" crlf="true" />
+
+    <send>
+        <![CDATA[
+
+        SIP/2.0 180 Ringing
+        [last_Via:]
+        [last_From:]
+        [last_To:];tag=[call_number]
+        [last_Call-ID:]
+        [last_CSeq:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+    <send>
+        <![CDATA[
+
+        SIP/2.0 200 OK
+        [last_Via:]
+        [last_From:]
+        [last_To:];tag=[call_number]
+        [last_Call-ID:]
+        [last_CSeq:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv request="ACK" optional="false" />
+
+    <pause milliseconds="2000" />
+
+    <send retrans="500">
+        <![CDATA[
+
+        BYE sip:[field2 line="[$line]"]@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: [field0 line="[$line]"] <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>;tag=[call_number]
+        To: [field2 line="[$line]"] <sip:[field2 line="[$line]"]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 2 BYE
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" optional="false" />
+</scenario>
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml
new file mode 100644
index 0000000..84b223e
--- /dev/null
+++ b/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="wait for a call followed by a hangup">
+
+    <Global variables="file,user" />
+    <nop>
+        <action>
+            <lookup assign_to="line" file="[$file]" key="[$user]" />
+        </action>
+    </nop>
+    <Reference variables="file,user" />
+
+    <recv request="INVITE" crlf="true" />
+
+    <send>
+        <![CDATA[
+
+        SIP/2.0 180 Ringing
+        [last_Via:]
+        [last_From:]
+        [last_To:];tag=[call_number]
+        [last_Call-ID:]
+        [last_CSeq:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+    <send>
+        <![CDATA[
+
+        SIP/2.0 200 OK
+        [last_Via:]
+        [last_From:]
+        [last_To:];tag=[call_number]
+        [last_Call-ID:]
+        [last_CSeq:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv request="ACK" optional="false" />
+    <recv request="BYE" optional="false" />
+
+    <send>
+        <![CDATA[
+
+        SIP/2.0 200 OK
+        [last_Via:]
+        [last_From:]
+        [last_To:];tag=[call_number]
+        [last_Call-ID:]
+        [last_CSeq:]
+        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
+        Content-Length: 0
+
+        ]]>
+    </send>
+</scenario>
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml b/tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml
new file mode 100644
index 0000000..54ecd2c
--- /dev/null
+++ b/tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml
@@ -0,0 +1,107 @@
+name : Functional_Basic_Call_Forward_Blind
+tests :
+    - ipv4toipv4_transfer_to_ipv4 :
+        expected_failure : False 
+        timeline:
+            - wireshark :
+                testsuite_remote_host : testsuite-remote-1.digium.internal
+                cmd :
+                    start:
+                        host_filter :
+                            - testsuite-remote-1.digium.internal
+                            - testsuite-remote-2.digium.internal
+                            - testsuite-remote-3.digium.internal
+                            - testsuite-remote-4.digium.internal
+                        protocol_filter :
+                            - sip
+                            - rtp
+                            - icmp
+                            - t38
+                            - dns
+            - asteriskscf_icebox :
+                testsuite_remote_host : testsuite-remote-1.digium.internal
+                cmd :
+                    start :
+                        - service_locator
+                        - bridge
+                        - routing
+                        - sip_session_gateway
+                        - media_rtp_pjmedia
+            - asteriskscf_configurator :
+                service_locator_host : testsuite-remote-1.digium.internal
+                configuration_wipe : False
+                cmd :
+                    sip :
+                        - listen_udp4 :
+                            type : transport_udp
+                            host : testsuite-remote-1.digium.internal
+                            port : 5060
+                            ipv4oripv6 : ipv4
+                        - wait_for_call :
+                            type : endpoint
+                            targethost : testsuite-remote-2.digium.internal
+                            targetport : 5060
+                            sourcehost : testsuite-remote-1.digium.internal
+                            sourceport : 5060
+                            ipv4oripv6 : ipv4
+                            direction : both
+                            securetransport : none
+                            rtpoveripv6 : False
+                        - wait_for_call_do_hangup :
+                            type : endpoint
+                            targethost : testsuite-remote-3.digium.internal
+                            targetport : 5060
+                            sourcehost : testsuite-remote-1.digium.internal
+                            sourceport : 5060
+                            ipv4oripv6 : ipv4
+                            direction : both
+                            securetransport : none
+                            rtpoveripv6 : False
+                        - call_then_blind_transfer :
+                            type : endpoint
+                            targethost : testsuite-remote-4.digium.internal
+                            targetport : 5060
+                            sourcehost : testsuite-remote-1.digium.internal
+                            sourceport : 5060
+                            ipv4oripv6 : ipv4
+                            direction : both
+                            securetransport : none
+                            rtpoveripv6 : False
+                    rtp :
+                         - general :
+                            startport : 10001
+                            endport : 20000
+                            workerthreadcount : 4
+            - sipp:
+                testsuite_remote_host : testsuite-remote-2.digium.internal
+                cmd :
+                    - uas :
+                        scenario_file : wait_for_call.xml
+                        transport : udp
+                        ipv4oripv6 : ipv4
+                        timeout : 10
+            - sipp:
+                testsuite_remote_host : testsuite-remote-3.digium.internal
+                cmd :
+                    - uas :
+                        scenario_file : wait_for_call_do_hangup.xml
+                        transport : udp
+                        ipv4oripv6 : ipv4
+                        timeout : 10
+            - sipp:
+                testsuite_remote_host : testsuite-remote-4.digium.internal
+                cmd :
+                    - uac :
+                        scenario_file : call_then_blind_transfer.xml
+                        calls : 1
+                        cps : 1
+                        duration : 10
+                        targethost : testsuite-remote-1.digium.internal
+                        ipv4oripv6 : ipv4
+                        transport : udp
+                        timeout : 10
+            - wireshark :
+                run_on_test_failure : True
+                testsuite_remote_host : testsuite-remote-1.digium.internal
+                cmd :
+                    stop :

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list