[asterisk-commits] file: testsuite/asterisk/trunk r6171 - in /asterisk/trunk/tests/channels/pjsi...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 5 11:55:06 CST 2015


Author: file
Date: Mon Jan  5 11:55:02 2015
New Revision: 6171

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6171
Log:
pjsip: Add tests for 'PJSIP_AOR' and 'PJSIP_CONTACT' dialplan functions.

These tests do a registration followed by a call. The call tests the aspects
of the registration as well as permanent contact.

ASTERISK-24341
Reported by: xrobau

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

Added:
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf Mon Jan  5 11:55:02 2015
@@ -1,0 +1,44 @@
+
+[default]
+
+exten => test_variable,1,NoOp()
+same => n,Set(aor=${LOCAL(ARG1)})
+same => n,Set(field=${LOCAL(ARG2)})
+same => n,Set(expected=${LOCAL(ARG3)})
+same => n,Verbose(1, Calling PJSIP_AOR for AOR ${aor}, field ${field})
+same => n,GotoIf($["${PJSIP_AOR(${aor},${field})}"="${expected}"]?pass)
+same => n,UserEvent(Result, Status: failed, Message: ${aor}, ${field} did not match expected value ${expected} - actual ${PJSIP_AOR(${aor},${field})})
+same => n(pass),NoOp()
+same => n,Return()
+
+exten => s,1,NoOp()
+same => n,Answer()
+
+; Test Alice's (dynamic registration) properties
+same => n,GoSub(default,test_variable,1(alice,contact,alice\;@sip:alice at 127.0.0.1:5061))
+same => n,GoSub(default,test_variable,1(alice,authenticate_qualify,false))
+same => n,GoSub(default,test_variable,1(alice,default_expiration,30))
+same => n,GoSub(default,test_variable,1(alice,mailboxes,))
+same => n,GoSub(default,test_variable,1(alice,max_contacts,1))
+same => n,GoSub(default,test_variable,1(alice,maximum_expiration,7200))
+same => n,GoSub(default,test_variable,1(alice,minimum_expiration,5))
+same => n,GoSub(default,test_variable,1(alice,outbound_proxy,))
+same => n,GoSub(default,test_variable,1(alice,qualify_frequency,0))
+same => n,GoSub(default,test_variable,1(alice,remove_existing,false))
+same => n,GoSub(default,test_variable,1(alice,support_path,false))
+
+; Test Bob's (static contact) properties
+same => n,GoSub(default,test_variable,1(bob,contact,bob@@sip:1000 at 127.0.0.1))
+same => n,GoSub(default,test_variable,1(bob,authenticate_qualify,false))
+same => n,GoSub(default,test_variable,1(bob,default_expiration,3600))
+same => n,GoSub(default,test_variable,1(bob,mailboxes,))
+same => n,GoSub(default,test_variable,1(bob,max_contacts,0))
+same => n,GoSub(default,test_variable,1(bob,maximum_expiration,7200))
+same => n,GoSub(default,test_variable,1(bob,minimum_expiration,60))
+same => n,GoSub(default,test_variable,1(bob,outbound_proxy,))
+same => n,GoSub(default,test_variable,1(bob,qualify_frequency,0))
+same => n,GoSub(default,test_variable,1(bob,remove_existing,false))
+same => n,GoSub(default,test_variable,1(bob,support_path,false))
+
+same => n,UserEvent(Result, Status: passed)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf Mon Jan  5 11:55:02 2015
@@ -1,0 +1,27 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw
+
+[alice](endpoint-template)
+aors=alice
+
+[alice]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
+[bob](endpoint-template)
+aors=bob
+
+[bob]
+type=aor
+contact=sip:1000 at 127.0.0.1

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml Mon Jan  5 11:55:02 2015
@@ -1,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        Subject: Performance Test
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+        <action>
+		<ereg regexp="sip:((alice|bob)@127.0.0.1:506[1-2]>;expires=(30|2[5-9])|(charlie|carol)@.::1.:506[3-4]>;expires=(30|2[5-9]))" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
+	</action>
+    </recv>
+
+    <Reference variables="1" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <recv request="BYE" crlf="true" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Content-Type: application/sdp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml Mon Jan  5 11:55:02 2015
@@ -1,0 +1,58 @@
+testinfo:
+    summary:     'Register a single contact on an AOR and confirm PJSIP_AOR returns the correct information'
+    description: |
+        'Register a single contact to an AOR using IPv4 UDP. Once done place a call into Asterisk
+         which executes dialplan. This dialplan uses the PJSIP_AOR dialplan function to confirm that the
+         information on the AOR registered against is correct. An AOR with a static contact is also checked
+         to ensure the correct information is present.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    fail-on-any: False
+    reactor-timeout: 10
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'dynamic-contact.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+ami-config:
+    -
+        id: '0'
+        type: 'headermatch'
+        count: '1'
+        conditions:
+            match:
+                Event: 'UserEvent'
+        requirements:
+            match:
+                Status: 'passed'
+    -
+        id: '0'
+        type: 'headermatch'
+        count: '0'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                Status: 'failed'
+
+properties:
+    minversion: '13.2.0'
+    dependencies:
+        - python: 'twisted'
+        - python: 'starpy'
+        - sipp:
+            version: 'v3.3'
+        - asterisk: 'res_pjsip'
+        - asterisk: 'func_pjsip_aor'
+    tags:
+        - pjsip
+

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_aor/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf Mon Jan  5 11:55:02 2015
@@ -1,0 +1,29 @@
+
+[default]
+
+exten => test_variable,1,NoOp()
+same => n,Set(contact=${LOCAL(ARG1)})
+same => n,Set(field=${LOCAL(ARG2)})
+same => n,Set(expected=${LOCAL(ARG3)})
+same => n,Verbose(1, Calling PJSIP_CONTACT for contact ${contact}, field ${field})
+same => n,GotoIf($["${PJSIP_CONTACT(${contact},${field})}"="${expected}"]?pass)
+same => n,UserEvent(Result, Status: failed, Message: ${aor}, ${field} did not match expected value ${expected} - actual ${PJSIP_CONTACT(${contact},${field})})
+same => n(pass),NoOp()
+same => n,Return()
+
+exten => s,1,NoOp()
+same => n,Answer()
+
+; Test Alice's (dynamic registration) properties
+same => n,GoSub(default,test_variable,1(alice\;@sip:alice at 127.0.0.1:5061,uri,sip:alice at 127.0.0.1:5061))
+same => n,GoSub(default,test_variable,1(alice\;@sip:alice at 127.0.0.1:5061,status,Unknown))
+same => n,GoSub(default,test_variable,1(alice\;@sip:alice at 127.0.0.1:5061,rtt,N/A))
+same => n,GoSub(default,test_variable,1(alice\;@sip:alice at 127.0.0.1:5061,user_agent,Test))
+
+; Test Bob's (static contact) properties
+same => n,GoSub(default,test_variable,1(bob@@sip:1000 at 127.0.0.1,uri,sip:1000 at 127.0.0.1))
+same => n,GoSub(default,test_variable,1(bob@@sip:1000 at 127.0.0.1,status,Unknown))
+same => n,GoSub(default,test_variable,1(bob@@sip:1000 at 127.0.0.1,rtt,N/A))
+
+same => n,UserEvent(Result, Status: passed)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf Mon Jan  5 11:55:02 2015
@@ -1,0 +1,27 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw
+
+[alice](endpoint-template)
+aors=alice
+
+[alice]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
+[bob](endpoint-template)
+aors=bob
+
+[bob]
+type=aor
+contact=sip:1000 at 127.0.0.1

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml Mon Jan  5 11:55:02 2015
@@ -1,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        User-Agent: Test
+        Subject: Performance Test
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+        <action>
+		<ereg regexp="sip:((alice|bob)@127.0.0.1:506[1-2]>;expires=(30|2[5-9])|(charlie|carol)@.::1.:506[3-4]>;expires=(30|2[5-9]))" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
+	</action>
+    </recv>
+
+    <Reference variables="1" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <recv request="BYE" crlf="true" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Content-Type: application/sdp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/sipp/dynamic-contact.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml?view=auto&rev=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml Mon Jan  5 11:55:02 2015
@@ -1,0 +1,58 @@
+testinfo:
+    summary:     'Register a single contact on an AOR and confirm PJSIP_CONTACT returns the correct information'
+    description: |
+        'Register a single contact to an AOR using IPv4 UDP. Once done place a call into Asterisk
+         which executes dialplan. This dialplan uses the PJSIP_CONTACT dialplan function to confirm that the
+         information on the contact registered is correct. An AOR with a static contact is also checked
+         to ensure the correct information is present.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    fail-on-any: False
+    reactor-timeout: 10
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'dynamic-contact.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+ami-config:
+    -
+        id: '0'
+        type: 'headermatch'
+        count: '1'
+        conditions:
+            match:
+                Event: 'UserEvent'
+        requirements:
+            match:
+                Status: 'passed'
+    -
+        id: '0'
+        type: 'headermatch'
+        count: '0'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                Status: 'failed'
+
+properties:
+    minversion: '13.2.0'
+    dependencies:
+        - python: 'twisted'
+        - python: 'starpy'
+        - sipp:
+            version: 'v3.3'
+        - asterisk: 'res_pjsip'
+        - asterisk: 'func_pjsip_contact'
+    tags:
+        - pjsip
+

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_contact/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml?view=diff&rev=6171&r1=6170&r2=6171
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml Mon Jan  5 11:55:02 2015
@@ -2,3 +2,5 @@
 tests:
     - test: 'pjsip_channel'
     - test: 'pjsip_endpoint'
+    - test: 'pjsip_aor'
+    - test: 'pjsip_contact'




More information about the asterisk-commits mailing list