[asterisk-commits] mjordan: testsuite/asterisk/trunk r4967 - in /asterisk/trunk/tests/channels/S...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 17 14:53:22 CDT 2014


Author: mjordan
Date: Thu Apr 17 14:53:16 2014
New Revision: 4967

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4967
Log:
channels/SIP: Add a test for inbound calls that use TEL URIs

This test verifies support for TEL URIs in basic incoming calls.

An INVITE request with a TEL URI sends a request to Asterisk. The phone-context
specifies a domain for the global number. The From header contains a local
number with a phone-context that contains the prefix of a global number.

If the INVITE request is handled properly, the SIPURIPHONECONTEXT channel
variable will be set properly. If not set properly, the test will fail as the
channel will not be answered and hungup prematurely.

(issue ASTERISK-17179)

https://reviewboard.asterisk.org/r/3441/

Added:
    asterisk/trunk/tests/channels/SIP/tel_uri/
    asterisk/trunk/tests/channels/SIP/tel_uri/configs/
    asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/
    asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/channels/SIP/tel_uri/sipp/
    asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml   (with props)
    asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/SIP/tests.yaml

Added: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf?view=auto&rev=4967
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf Thu Apr 17 14:53:16 2014
@@ -1,0 +1,9 @@
+
+[default]
+
+exten => +15558675309,1,NoOp()
+ same => n,GotoIf($[${SIPURIPHONECONTEXT}=foo.com]?hangup)
+ same => n,Hangup(42)
+ same => n(hangup),NoOp()
+ same => n,Answer()
+ same => n,Hangup()

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf?view=auto&rev=4967
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf Thu Apr 17 14:53:16 2014
@@ -1,0 +1,10 @@
+[general]
+udpbindaddr = 127.0.0.1
+
+[1111]
+type = peer
+host = 127.0.0.1:5061
+context = default
+qualify = no
+insecure = invite,port
+

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml?view=auto&rev=4967
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml (added)
+++ asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml Thu Apr 17 14:53:16 2014
@@ -1,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE tel:+15558675309;phone-context=foo.com SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <tel:1111;phone-context=+1555>;tag=[pid]SIPpTag00[call_number]
+      To: sut <tel:+15558675309>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:sipp@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      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>
+
+  <recv response="181"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK tel:+15558675309;phone-context=foo.com SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <tel:1111;phone-context=+1555>;tag=[pid]SIPpTag00[call_number]
+      To: sut <tel:+15558675309>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:sipp@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <timewait milliseconds="4000"/>
+
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/sipp/tel_uac.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml?view=auto&rev=4967
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml Thu Apr 17 14:53:16 2014
@@ -1,0 +1,34 @@
+testinfo:
+    summary: 'TEL URI support in basic inbound calls'
+    description: |
+        This test verifies support for TEL URIs in basic incoming calls.
+        An INVITE request with a TEL URI sends a request to Asterisk. The
+        phone-context specifies a domain for the global number. The From
+        header contains a local number with a phone-context that contains
+        the prefix of a global number.
+        If the INVITE request is handled properly, the TELPHONECONTEXT
+        channel variable will be set properly. If not set properly, the
+        test will fail as the channel will not be answered and hungup
+        prematurely.
+
+properties:
+    minversion: '13.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - app : 'sipp'
+        - asterisk : 'chan_sip'
+    tags:
+        - SIP
+
+test-modules:
+    test-object:
+        config-section: sipp-config
+        typename: 'sipp.SIPpTestCase'
+
+sipp-config:
+    fail-on-any: True
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'tel_uac.xml', '-p': '5061',},}

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/tel_uri/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/channels/SIP/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tests.yaml?view=diff&rev=4967&r1=4966&r2=4967
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Thu Apr 17 14:53:16 2014
@@ -66,3 +66,4 @@
     - test: 'outbound_register_from'
     - test: 'outbound_reregister_from'
     - test: 'direct_rtp_fallback'
+    - test: 'tel_uri'




More information about the asterisk-commits mailing list