[asterisk-commits] kharwell: testsuite/asterisk/trunk r4222 - in /asterisk/trunk/tests/channels/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 26 14:00:53 CDT 2013


Author: kharwell
Date: Thu Sep 26 14:00:42 2013
New Revision: 4222

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4222
Log:
Testsuite: pjsip messaging tests

Testsuite tests for pjsip messaging.  Some have been ported from the old sip
messaging tests (chan_sip) and have been updated to work with the new sip
channel driver.  Tests include messages with custom headers, messages from
various identifiers, in dialog messaging, and messages via ami.

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

Added:
    asterisk/trunk/tests/channels/pjsip/message/
    asterisk/trunk/tests/channels/pjsip/message/message_basic/
    asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/
    asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/
    asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_from/
    asterisk/trunk/tests/channels/pjsip/message/message_from/configs/
    asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/
    asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/configs/
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/configs/ast1/manager.users.conf.inc   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/run-test   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/sipp/
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/sipp/message_recv.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/message_send_ami/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/message/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/tests.yaml

Added: asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,7 @@
+[default]
+
+exten => user1,1,Verbose(1,Got a message from SIPp)
+      same => n,Verbose(1,To: ${MESSAGE(to)})
+      same => n,Verbose(1,From: ${MESSAGE(from)})
+      same => n,Verbose(1,Body: ${MESSAGE(body)})
+      same => n,MessageSend(${MESSAGE(to)},sip:user)

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,34 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user]
+type=aor
+contact=sip:user at 127.0.0.1:5061
+max_contacts=1
+
+[user]
+type=endpoint
+context=default
+aors=user
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user1]
+type=aor
+contact=sip:user1 at 127.0.0.1:5062
+max_contacts=1
+
+[user1]
+type=endpoint
+context=default
+aors=user1
+direct_media=no
+disallow=all
+allow=ulaw

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <send retrans="500">
+    <![CDATA[
+
+      MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: <sip:user1@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 MESSAGE
+      Contact: sip:user@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Expires: 3600
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="202" rtd="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <recv request="MESSAGE" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 202 Accepted
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
+      Supported: replaces, timer
+      Content-Length: 0
+
+    ]]>
+  </send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,26 @@
+testinfo:
+    summary: 'Test inbound and outbound unauthenticated MESSAGE'
+    description: |
+        'Send a SIP MESSAGE to Asterisk and once received use the dialplan
+         application MessageSend to send a MESSAGE to a receiver.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_messaging'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'message.xml', '-p':'5061' } }

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_basic/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,8 @@
+[default]
+exten => user1,1,Verbose(1,Got a message from SIPp)
+      same => n,Verbose(1,To: ${MESSAGE(to)})
+      same => n,Verbose(1,From: ${MESSAGE(from)})
+      same => n,Verbose(1,X-Custom-Header: ${MESSAGE_DATA(X-Custom-Header)})
+      same => n,Verbose(1,Body: ${MESSAGE(body)})
+      same => n,Set(MESSAGE_DATA(X-Custom-Header)=Customized)
+      same => n,MessageSend(pjsip:user1,sip:user)

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,34 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user]
+type=aor
+contact=sip:user at 127.0.0.1:5061
+max_contacts=1
+
+[user]
+type=endpoint
+context=default
+aors=user
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user1]
+type=aor
+contact=sip:user1 at 127.0.0.1:5062
+max_contacts=1
+
+[user1]
+type=endpoint
+context=default
+aors=user1
+direct_media=no
+disallow=all
+allow=ulaw

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="MESSAGE with custom header">
+  <send retrans="500">
+    <![CDATA[
+      MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[call_number]
+      To: <sip:user1@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 MESSAGE
+      Contact: sip:user@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Expires: 3600
+      X-Custom-Header: Hello World
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="202" rtd="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="MESSAGE send and receive custom header">
+  <recv request="MESSAGE" crlf="true">
+    <action>
+      <!-- Check that the X-Custom-Header header is what we expect. -->
+      <ereg regexp=".*" search_in="hdr" header="X-Custom-Header:" check_it="true" assign_to="1" />
+      <log message="Received MESSAGE X-Custom-Header header: [$1]." />
+      <strcmp assign_to="result" variable="1" value=" Customized" />
+      <test assign_to="empty0" variable="result" compare="not_equal" value="" />
+    </action>
+  </recv>
+
+  <nop condexec="empty0">
+    <action>
+      <error message="Custom header did not match - expected 'Customized' but got [$1]" />
+    </action>
+  </nop>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 202 Accepted
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Allow: MESSAGE
+      Content-Length: 0
+
+    ]]>
+  </send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,27 @@
+testinfo:
+    summary: 'Test MessageSend with a custom header.'
+    description: |
+        'Tests Asterisk sending a SIP MESSAGE with a custom header.  Upon
+         receiving the message, the receiver will verify that the custom
+         header exists and it matches the one sent.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_messaging'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+               - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5062' } }
+               - { 'key-args': { 'scenario':'message.xml', '-p':'5061' } }

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_cust_hdr/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,13 @@
+[default]
+
+exten => user1,1,Verbose(1,Got a message from SIPp)
+      same => n,Verbose(1,To: ${MESSAGE(to)})
+      same => n,Verbose(1,To Hdr: ${MESSAGE_DATA(to)})
+      same => n,Verbose(1,From: ${MESSAGE(from)})
+      same => n,Verbose(1,From Hdr: ${MESSAGE_DATA(from)})
+      same => n,Verbose(1,Body: ${MESSAGE(body)})
+      ; Match the MessageSend() lines with the SIPp scenario
+      same => n,MessageSend(pjsip:user1, sip:user)
+      same => n,MessageSend(pjsip:user2, sip:user/user)
+      same => n,MessageSend(pjsip:user3, sip:user/user at 127.0.0.1)
+      same => n,MessageSend(pjsip:user4, sip:user/"user" <sip:user at 127.0.0.1>)

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,79 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user]
+type=aor
+contact=sip:user at 127.0.0.1:5061
+max_contacts=1
+
+[user]
+type=endpoint
+context=default
+aors=user
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user1]
+type=aor
+contact=sip:user1 at 127.0.0.1:5062
+max_contacts=1
+
+[user1]
+type=endpoint
+context=default
+aors=user1
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user2]
+type=aor
+contact=sip:user1 at 127.0.0.1:5063
+max_contacts=1
+
+[user2]
+type=endpoint
+context=default
+aors=user2
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user3]
+type=aor
+contact=sip:user1 at 127.0.0.1:5064
+max_contacts=1
+
+[user3]
+type=endpoint
+context=default
+aors=user3
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user4]
+type=aor
+contact=sip:user1 at 127.0.0.1:5065
+max_contacts=1
+
+[user4]
+type=endpoint
+context=default
+aors=user4
+direct_media=no
+disallow=all
+allow=ulaw

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <send retrans="500">
+    <![CDATA[
+
+      MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: <sip:user1@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 MESSAGE
+      Contact: sip:user@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Expires: 3600
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="202" rtd="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive">
+  <!-- "from" is assigned from the '-set' command line option -->
+  <Global variables="from" />
+
+  <recv request="MESSAGE" crlf="true">
+    <action>
+      <!-- Check that the From header is what we expect -->
+      <!-- note - from some reason the incoming header has leading spaces on it -->
+      <ereg regexp="\s*(.*>)" search_in="hdr" header="From:" assign_to="empty,from0" />
+      <log message="Comparing from=[$from] with from0=[$from0]"/>
+      <strcmp assign_to="result" variable="from" variable2="from0" />
+      <test assign_to="empty" variable="result" compare="not_equal" value="" />
+    </action>
+  </recv>
+
+  <nop condexec="empty">
+    <action>
+      <error message="From did not match - expected [$from] got [$from0]" />
+    </action>
+  </nop>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 202 Accepted
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Allow: MESSAGE
+      Content-Length: 0
+
+    ]]>
+  </send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,30 @@
+testinfo:
+    summary: 'Test MessageSend with specified from parameter.'
+    description: |
+        'Send Asterisk a MESSAGE, once received, and using the dialplan application
+         MessageSend send several messages using a different "from" field for each
+         to a receiver.  The receiver will then validate the "from"'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_messaging'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5062' }, 'ordered-args': ['-set', 'from', '<sip:user at 127.0.0.1>'] }
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5063' }, 'ordered-args': ['-set', 'from', '<sip:user at 127.0.0.1>'] }
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5064' }, 'ordered-args': ['-set', 'from', '<sip:user at 127.0.0.1>'] }
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5065' }, 'ordered-args': ['-set', 'from', '"user" <sip:user at 127.0.0.1>'] }
+                - { 'key-args': { 'scenario':'message.xml', '-p':'5061' } }

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_from/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,5 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(pjsip/user1)

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf Thu Sep 26 14:00:42 2013
@@ -1,0 +1,34 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user]
+type=aor
+contact=sip:user at 127.0.0.1:5061
+max_contacts=1
+
+[user]
+type=endpoint
+context=default
+aors=user
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user1]
+type=aor
+contact=sip:user1 at 127.0.0.1:5062
+max_contacts=1
+
+[user1]
+type=endpoint
+context=default
+aors=user1
+direct_media=no
+disallow=all
+allow=ulaw

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

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml?view=auto&rev=4222
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml Thu Sep 26 14:00:42 2013
@@ -1,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="In dialog MESSAGE send">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user <sip:user@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user1 <sip:user1@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP4 [local_ip]
+			s=-
+			c=IN IP4 [local_ip]
+			t=0 0
+			m=audio 2226 RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user1@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user@[local_ip]>;tag=[call_number]
+			To: <sip:user1@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Contact: <sip:user@[local_ip]>
+                        Allow: INVITE, ACK, MESSAGE, BYE
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<send>
+                <![CDATA[
+                        MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: <sip:user@[local_ip]:[local_port]>;tag=[call_number]
+                        To: <sip:user1@[remote_ip]:[remote_port]>[peer_tag_param]
+                        Call-ID: [call_id]
+                        CSeq: [cseq] MESSAGE
+                        Contact: sip:user@[local_ip]:[local_port]
+			Allow: INVITE, ACK, MESSAGE, BYE
+                        Max-Forwards: 70
+                        Expires: 3600
+                        Content-Type: text/plain
+                        Content-Length: 18
+
+                        Watson, come here.
+
+                ]]>
+        </send>
+
+        <recv response="202" crlf="true" />
+
+	<!-- allow the time for the message to be propagated -->
+	<pause milliseconds="7000" />
+
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user@[local_ip]>;tag=[call_number]
+			To: <sip:user1@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Contact: <sip:user@[local_ip]>
+                        Allow: INVITE, ACK, MESSAGE, BYE
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml

[... 467 lines stripped ...]



More information about the asterisk-commits mailing list