[asterisk-commits] rmudgett: testsuite/asterisk/trunk r3007 - in /asterisk/trunk/tests/channels/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 25 12:01:57 CST 2012
Author: rmudgett
Date: Wed Jan 25 12:01:53 2012
New Revision: 3007
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3007
Log:
* Added more external tests of MessageSend(from) parameter with SIP.
* Added external test of authenticated MessageSend() with custom headers.
Added:
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/
- copied from r2994, asterisk/trunk/tests/channels/SIP/message_auth/
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/
- copied from r3006, asterisk/trunk/tests/channels/SIP/message_auth/configs/
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/run-test
- copied unchanged from r3006, asterisk/trunk/tests/channels/SIP/message_auth/run-test
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/
- copied from r3006, asterisk/trunk/tests/channels/SIP/message_auth/sipp/
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml
- copied, changed from r3006, asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml (with props)
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml (with props)
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_fred.xml
- copied, changed from r2994, asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml (with props)
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml (with props)
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml (with props)
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml (with props)
Removed:
asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml
Modified:
asterisk/trunk/tests/channels/SIP/message_auth/configs/ast1/extensions.conf
asterisk/trunk/tests/channels/SIP/message_auth/sipp/message_recv.xml
asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/sip.conf
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message.xml
asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message_recv.xml
asterisk/trunk/tests/channels/SIP/message_unauth_from/configs/ast1/extensions.conf
asterisk/trunk/tests/channels/SIP/message_unauth_from/run-test
asterisk/trunk/tests/channels/SIP/tests.yaml
Modified: asterisk/trunk/tests/channels/SIP/message_auth/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth/configs/ast1/extensions.conf?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth/configs/ast1/extensions.conf Wed Jan 25 12:01:53 2012
@@ -7,4 +7,9 @@
exten => _.,1,NoOp()
exten => user,1,Verbose(1,Got a message from SIPp)
+exten => user,n,Verbose(1,To: ${MESSAGE(to)})
+exten => user,n,Verbose(1,To Hdr: ${MESSAGE_DATA(to)})
+exten => user,n,Verbose(1,From: ${MESSAGE(from)})
+exten => user,n,Verbose(1,From Hdr: ${MESSAGE_DATA(from)})
+exten => user,n,Verbose(1,Body: ${MESSAGE(body)})
exten => user,n,MessageSend(sip:user2)
Modified: asterisk/trunk/tests/channels/SIP/message_auth/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth/sipp/message_recv.xml?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth/sipp/message_recv.xml (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth/sipp/message_recv.xml Wed Jan 25 12:01:53 2012
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
-<scenario name="Basic MESSAGE send and receive">
+<scenario name="Authenticated MESSAGE send and receive">
<recv request="MESSAGE" crlf="true">
</recv>
Modified: asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml Wed Jan 25 12:01:53 2012
@@ -1,7 +1,7 @@
testinfo:
- summary: 'Test inbound and outbound unauthenticated MESSAGE'
+ summary: 'Test inbound and outbound authenticated MESSAGE'
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 with authentication.'
properties:
minversion: '10'
Modified: asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf Wed Jan 25 12:01:53 2012
@@ -7,4 +7,11 @@
exten => _.,1,NoOp()
exten => user,1,Verbose(1,Got a message from SIPp)
-exten => user,n,MessageSend(sip:user2)
+exten => user,n,Verbose(1,To: ${MESSAGE(to)})
+exten => user,n,Verbose(1,To Hdr: ${MESSAGE_DATA(to)})
+exten => user,n,Verbose(1,From: ${MESSAGE(from)})
+exten => user,n,Verbose(1,From Hdr: ${MESSAGE_DATA(from)})
+exten => user,n,Verbose(1,X-Custom-Header: ${MESSAGE_DATA(X-Custom-Header)})
+exten => user,n,Verbose(1,Body: ${MESSAGE(body)})
+exten => user,n,Set(MESSAGE_DATA(X-Custom-Header)=Custom shopping)
+exten => user,n,MessageSend(sip:user2,fred)
Modified: asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/sip.conf?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/sip.conf (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/configs/ast1/sip.conf Wed Jan 25 12:01:53 2012
@@ -19,3 +19,10 @@
username=user2
secret=blah
+[fred]
+type=friend
+;host=dynamic
+callerid="Johnny Appleseed" <9876> ; Full caller ID, to override the phones config
+username=fred
+secret=blah
+
Modified: asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message.xml?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message.xml (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message.xml Wed Jan 25 12:01:53 2012
@@ -14,6 +14,7 @@
Contact: sip:user@[local_ip]:[local_port]
Max-Forwards: 20
Expires: 3600
+ X-Custom-Header: Hello Dolly
Content-Type: text/plain
Content-Length: 18
@@ -35,6 +36,7 @@
CSeq: 2 MESSAGE
Contact: sip:user@[local_ip]:[local_port]
Expires: 3600
+ X-Custom-Header: Hello Dolly
[authentication username=user password=blah]
Content-Type: text/plain
Content-Length: 18
Modified: asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message_recv.xml?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message_recv.xml (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/sipp/message_recv.xml Wed Jan 25 12:01:53 2012
@@ -1,7 +1,21 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
-<scenario name="Basic MESSAGE send and receive">
+<scenario name="Authenticated MESSAGE send and receive from Johnny Appleseed">
<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=" \"Johnny Appleseed\" <sip:9876@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ <!-- 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]." />
+ <ereg regexp="Custom shopping" search_in="hdr" header="X-Custom-Header:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
</recv>
<send>
@@ -18,6 +32,19 @@
</send>
<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=" \"Johnny Appleseed\" <sip:9876@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ <!-- 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]." />
+ <ereg regexp="Custom shopping" search_in="hdr" header="X-Custom-Header:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
</recv>
<send>
Copied: asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml (from r3006, asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml)
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml?view=diff&rev=3007&p1=asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml&r1=3006&p2=asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml Wed Jan 25 12:01:53 2012
@@ -1,7 +1,7 @@
testinfo:
- summary: 'Test inbound and outbound unauthenticated MESSAGE'
+ summary: 'Test MessageSend with authentication and custom headers.'
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 with custom headers.'
properties:
minversion: '10'
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=3007&r1=3006&r2=3007
==============================================================================
--- 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 Wed Jan 25 12:01:53 2012
@@ -4,6 +4,16 @@
exten => user,1,Verbose(1,Got a message from SIPp)
exten => user,n,Verbose(1,To: ${MESSAGE(to)})
+exten => user,n,Verbose(1,To Hdr: ${MESSAGE_DATA(to)})
exten => user,n,Verbose(1,From: ${MESSAGE(from)})
+exten => user,n,Verbose(1,From Hdr: ${MESSAGE_DATA(from)})
exten => user,n,Verbose(1,Body: ${MESSAGE(body)})
+; Match the MessageSend() lines with the SIPp scenario message_recv_xxx.xml files by port number.
exten => user,n,MessageSend(sip:user at 127.0.0.1:5062,fred)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5063,unknown_user)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5064)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5065,"Anonymous" <sip:anonymous at invalid>)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5066,"The Goober" <sip:3829 at 127.0.0.1>)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5067,<sip:6719 at 127.0.0.1>)
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5068,${MESSAGE(from)})
+exten => user,n,MessageSend(sip:user at 127.0.0.1:5069,${MESSAGE_DATA(from)})
Modified: asterisk/trunk/tests/channels/SIP/message_unauth_from/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/run-test?view=diff&rev=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/run-test Wed Jan 25 12:01:53 2012
@@ -18,10 +18,41 @@
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
SIPP_SCENARIOS = [
+ # Start the receiver SIPp scenario's first
+ # Match the scenarios below with the extensions.conf MessageSend() lines by port number.
{
- 'scenario' : 'message_recv.xml',
+ 'scenario' : 'message_recv_fred.xml',
'-p' : '5062'
},
+ {
+ 'scenario' : 'message_recv_unknown.xml',
+ '-p' : '5063'
+ },
+ {
+ 'scenario' : 'message_recv_default.xml',
+ '-p' : '5064'
+ },
+ {
+ 'scenario' : 'message_recv_anonymous.xml',
+ '-p' : '5065'
+ },
+ {
+ 'scenario' : 'message_recv_goober.xml',
+ '-p' : '5066'
+ },
+ {
+ 'scenario' : 'message_recv_noname.xml',
+ '-p' : '5067'
+ },
+ {
+ 'scenario' : 'message_recv_passed.xml',
+ '-p' : '5068'
+ },
+ {
+ 'scenario' : 'message_recv_passed.xml',
+ '-p' : '5069'
+ },
+ # Finally start the sending SIPp scenario that kicks everything off.
{
'scenario' : 'message.xml',
'-p' : '5061'
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive Anonymous">
+ <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=" \"Anonymous\" <sip:anonymous at invalid>" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_anonymous.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_anonymous.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive default from">
+ <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=" \"asterisk\" <sip:asterisk@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_default.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_default.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_fred.xml (from r2994, 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_fred.xml?view=diff&rev=3007&p1=asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml&r1=2994&p2=asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_fred.xml&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv.xml (original)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_fred.xml Wed Jan 25 12:01:53 2012
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
-<scenario name="Basic MESSAGE send and receive">
+<scenario name="Basic MESSAGE send and receive Johnny Appleseed">
<recv request="MESSAGE" crlf="true">
<action>
<!-- Check that the From header is what we expect. -->
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive The Goober">
+ <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=" \"The Goober\" <sip:3829@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_goober.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_goober.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive no-name">
+ <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="" \"asterisk\" <sip:6719@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_noname.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_noname.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive received from data">
+ <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=" \"user\" <sip:user@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_passed.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_passed.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml?view=auto&rev=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml (added)
+++ asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml Wed Jan 25 12:01:53 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic MESSAGE send and receive unknown_user">
+ <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=" \"unknown_user\" <sip:asterisk@" search_in="hdr" header="From:" check_it="true" assign_to="2" />
+ <log message="Using assigned value because I must: [$2]." />
+ </action>
+ </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/SIP/message_unauth_from/sipp/message_recv_unknown.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/message_unauth_from/sipp/message_recv_unknown.xml
------------------------------------------------------------------------------
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=3007&r1=3006&r2=3007
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Wed Jan 25 12:01:53 2012
@@ -26,6 +26,7 @@
- test: 'message_unauth'
- test: 'message_unauth_from'
- test: 'message_auth'
+ - test: 'message_auth_cust_hdr'
- test: 'message_from_call'
- test: 'handle_response_address_incomplete'
- test: 'realtime_sipregs'
More information about the asterisk-commits
mailing list