[Asterisk-code-review] tel uri: Add a test for TEL URI functionality for inbound calls (testsuite[master])

Kevin Harwell asteriskteam at digium.com
Fri Aug 18 14:46:46 CDT 2017


Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/6247


Change subject: tel_uri: Add a test for TEL URI functionality for inbound calls
......................................................................

tel_uri: Add a test for TEL URI functionality for inbound calls

ASTERISK-27152

Change-Id: Ib8dbd2ddb920c0d5c346569dd7a1eba824e95dd5
---
A tests/channels/pjsip/tel_uri/configs/ast1/extensions.conf
A tests/channels/pjsip/tel_uri/configs/ast1/pjsip.conf
A tests/channels/pjsip/tel_uri/sipp/tel_uac.xml
A tests/channels/pjsip/tel_uri/test-config.yaml
M tests/channels/pjsip/tests.yaml
5 files changed, 81 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/47/6247/1

diff --git a/tests/channels/pjsip/tel_uri/configs/ast1/extensions.conf b/tests/channels/pjsip/tel_uri/configs/ast1/extensions.conf
new file mode 100644
index 0000000..8dae664
--- /dev/null
+++ b/tests/channels/pjsip/tel_uri/configs/ast1/extensions.conf
@@ -0,0 +1,2 @@
+[default]
+
diff --git a/tests/channels/pjsip/tel_uri/configs/ast1/pjsip.conf b/tests/channels/pjsip/tel_uri/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..e791d94
--- /dev/null
+++ b/tests/channels/pjsip/tel_uri/configs/ast1/pjsip.conf
@@ -0,0 +1,18 @@
+[transport]
+type=transport
+bind=0.0.0.0
+protocol=udp
+
+[1000]
+type=aor
+
+[1000]
+type=endpoint
+direct_media=no
+allow=!all,ulaw
+aors=1000
+
+[1000]
+type=identify
+endpoint=1000
+match=127.0.0.1
diff --git a/tests/channels/pjsip/tel_uri/sipp/tel_uac.xml b/tests/channels/pjsip/tel_uri/sipp/tel_uac.xml
new file mode 100644
index 0000000..29c30b1
--- /dev/null
+++ b/tests/channels/pjsip/tel_uri/sipp/tel_uac.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE tel:+1000;phone-context=foo.com SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <tel:1000;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="416" /> <!-- Unsupported URI Scheme -->
+
+</scenario>
+
diff --git a/tests/channels/pjsip/tel_uri/test-config.yaml b/tests/channels/pjsip/tel_uri/test-config.yaml
new file mode 100644
index 0000000..2d2b0d9
--- /dev/null
+++ b/tests/channels/pjsip/tel_uri/test-config.yaml
@@ -0,0 +1,26 @@
+testinfo:
+    summary: 'TEL URI support in basic inbound calls'
+    description: |
+        This test verifies that TEL URIs are appropriately handled in a basic
+        incoming call situation.
+
+properties:
+    minversion: '13.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: sipp-config
+        typename: 'sipp.SIPpTestCase'
+
+sipp-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'tel_uac.xml', '-p': '5061'} }
diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml
index 54ff285..a25007f 100644
--- a/tests/channels/pjsip/tests.yaml
+++ b/tests/channels/pjsip/tests.yaml
@@ -54,3 +54,4 @@
     - test: 'cseq_method'
     - test: 'multipart_empty_part'
     - test: 'dtmf_info_fallback'
+    - test: 'tel_uri'

-- 
To view, visit https://gerrit.asterisk.org/6247
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8dbd2ddb920c0d5c346569dd7a1eba824e95dd5
Gerrit-Change-Number: 6247
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170818/1fd6e529/attachment.html>


More information about the asterisk-code-review mailing list