[svn-commits] rmudgett: testsuite/asterisk/trunk r2979 - in /asterisk/trunk/tests/channels/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jan 3 17:33:44 CST 2012


Author: rmudgett
Date: Tue Jan  3 17:33:41 2012
New Revision: 2979

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2979
Log:
Added external test of MessageSend(from) parameter with SIP.

(closes issue ASTERISK-18819)

Added:
    asterisk/trunk/tests/channels/SIP/message_unauth_from/
      - copied from r2978, asterisk/trunk/tests/channels/SIP/message_unauth/
Modified:
    asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf
    asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/sip.conf
    asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml
    asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml
    asterisk/trunk/tests/channels/SIP/tests.yaml

Modified: asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf?view=diff&rev=2979&r1=2978&r2=2979
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf Tue Jan  3 17:33:41 2012
@@ -6,4 +6,4 @@
 exten => user,n,Verbose(1,To: ${MESSAGE(to)})
 exten => user,n,Verbose(1,From: ${MESSAGE(from)})
 exten => user,n,Verbose(1,Body: ${MESSAGE(body)})
-exten => user,n,MessageSend(sip:user at 127.0.0.1:5062)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5062,fred)

Modified: asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/sip.conf?view=diff&rev=2979&r1=2978&r2=2979
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/sip.conf (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/sip.conf Tue Jan  3 17:33:41 2012
@@ -3,3 +3,8 @@
 sipdebug=yes
 accept_outofcall_message = yes
 auth_message_requests = no
+
+[fred]
+type=friend
+;host=dynamic
+callerid="Johnny Appleseed" <9876>        ; Full caller ID, to override the phones config

Modified: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml?view=diff&rev=2979&r1=2978&r2=2979
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml Tue Jan  3 17:33:41 2012
@@ -1,7 +1,19 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
 
 <scenario name="Basic MESSAGE send and receive">
   <recv request="MESSAGE" crlf="true">
+    <action>
+      <!-- Check that the From header is what we expect. -->
+      <!-- NOTE: The regexp action must assign_to a variable and that variable must be used. -->
+      <ereg regexp=".*" search_in="hdr" header="From:" check_it="true" assign_to="1" />
+      <log message="Received MESSAGE From header: [$1]." />
+      <!--
+      <ereg regexp="From: \"Johnny Appleseed\" <sip:9876@" search_in="msg" check_it="true" assign_to="2" />
+      -->
+      <ereg regexp=" \"Johnny Appleseed\" <sip:9876@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+      <log message="Using assigned value because I must: [$2]." />
+    </action>
   </recv>
 
   <send>

Modified: asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml?view=diff&rev=2979&r1=2978&r2=2979
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml Tue Jan  3 17:33:41 2012
@@ -1,7 +1,7 @@
 testinfo:
-    summary: 'Test inbound and outbound unauthenticated MESSAGE'
+    summary: 'Test MessageSend with specified from parameter.'
     description: |
-        'Send Asterisk a MESSAGE and wait for Asterisk to send it back.'
+        'Send Asterisk a MESSAGE and wait for Asterisk to send it back from a requested user.'
 
 properties:
     minversion: '10'

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=2979&r1=2978&r2=2979
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Tue Jan  3 17:33:41 2012
@@ -23,6 +23,7 @@
     - test: 'secure_bridge_media'
     - test: 'message_disabled'
     - test: 'message_unauth'
+    - test: 'message_unauth_from'
     - test: 'message_auth'
     - test: 'message_from_call'
     - test: 'handle_response_address_incomplete'




More information about the svn-commits mailing list