[Asterisk-code-review] testsuite: add validations for 181 and History-Info conversions (testsuite[16])

Kevin Harwell asteriskteam at digium.com
Tue Sep 15 13:45:14 CDT 2020


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/testsuite/+/14732 )

Change subject: testsuite: add validations for 181 and History-Info conversions
......................................................................


Patch Set 4: Code-Review-1

(19 comments)

Just some minor formatting whitespace issues

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/diversion_response_181/sipp/user1.xml 
File tests/channels/pjsip/diversion/diversion_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/diversion_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
Mix of tabs and spaces. Convert this to use tabs here.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_request/sipp/user1.xml 
File tests/channels/pjsip/diversion/history_info_request/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_request/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:amenhotep@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
convert spaces to tabs here.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_request/sipp/user1.xml@16 
PS4, Line 16:                         Content-Type: application/sdp
            :                         Content-Length: [len]
spaces vs tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_request/sipp/user2.xml 
File tests/channels/pjsip/diversion/history_info_request/sipp/user2.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_request/sipp/user2.xml@5 
PS4, Line 5:                 <action>
           :                         <!-- Check that the Diversion header is present and contains the correct name. -->
           : 	        	<ereg regexp="amenhotep" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
           : 		        <log message="Received INVITE with Diversion header: [$1]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_response_181/sipp/user1.xml 
File tests/channels/pjsip/diversion/history_info_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
convert spaces to tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/history_info_response_181/sipp/user1.xml@33 
PS4, Line 33:                 <action>
            :                         <!-- Check that the Diversion header is present and contains the correct name. -->
            : 	        	<ereg regexp="amenhotep" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
            : 		        <log message="Received 181 with Diversion header: [$1]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/no_diversion_response_181/sipp/user1.xml 
File tests/channels/pjsip/diversion/no_diversion_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/no_diversion_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
Convert spaces to tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/diversion/no_diversion_response_181/sipp/user1.xml@33 
PS4, Line 33:                 <action>
            :                         <!-- Check that the Diversion header is present and contains the correct name. -->
            : 	        	<ereg regexp=".+" search_in="hdr" header="Diversion:" check_it_inverse="true" assign_to="1" />
            : 		        <log message="Received 181 with Diversion header: [$1]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_request/sipp/user1.xml 
File tests/channels/pjsip/history_info/diversion_request/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_request/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           : 			Diversion: <sip:amenhotep at 127.0.0.1>;reason=unconditional
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
Convert spaces to tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_request/sipp/user2.xml 
File tests/channels/pjsip/history_info/diversion_request/sipp/user2.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_request/sipp/user2.xml@5 
PS4, Line 5:                 <action>
           :                         <!-- Check that the Diversion header is present and contains the correct name. -->
           : 	        	<ereg regexp="amenhotep" search_in="hdr" header="History-Info:" occurence="1" check_it="true" assign_to="1" />
           : 		        <log message="Received INVITE with History-Info header: [$1]." />
           : 	        	<ereg regexp="user2" search_in="hdr" header="History-Info:" occurence="2" check_it="true" assign_to="2" />
           : 		        <log message="Received INVITE with History-Info header: [$2]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_request/sipp/user2.xml@12 
PS4, Line 12:         </recv>
spaces vs tab here too.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_response_181/sipp/user1.xml 
File tests/channels/pjsip/history_info/diversion_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
Convert spaces to tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/diversion_response_181/sipp/user1.xml@33 
PS4, Line 33:                 <action>
            :                         <!-- Check that the Diversion header is present and contains the correct name. -->
            : 	        	<ereg regexp="user2" search_in="hdr" header="History-Info:" occurence="1" check_it="true" assign_to="1" />
            : 		        <log message="Received 181 with History-Info header: [$1]." />
            : 	        	<ereg regexp="amenhotep" search_in="hdr" header="History-Info:" occurence="2" check_it="true" assign_to="2" />
            : 		        <log message="Received 181 with History-Info header: [$2]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_request/sipp/user1.xml 
File tests/channels/pjsip/history_info/history_info_request/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_request/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:amenhotep@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           : 			History-Info: <sip:amenhotep at 127.0.0.1>;index=1
           : 			History-Info: <sip:user2 at 127.0.0.1;cause=302>;index=1.1
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_request/sipp/user2.xml 
File tests/channels/pjsip/history_info/history_info_request/sipp/user2.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_request/sipp/user2.xml@5 
PS4, Line 5:                 <action>
           :                         <!-- Check that the Diversion header is present and contains the correct name. -->
           : 	        	<ereg regexp="amenhotep" search_in="hdr" header="History-Info:" occurence="1" check_it="true" assign_to="1" />
           : 		        <log message="Received INVITE with History-Info header: [$1]." />
           : 	        	<ereg regexp="user2" search_in="hdr" header="History-Info:" occurence="2" check_it="true" assign_to="2" />
           : 		        <log message="Received INVITE with History-Info header: [$2]." />
           : 		</action>
           :         </recv>
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_response_181/sipp/user1.xml 
File tests/channels/pjsip/history_info/history_info_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
convert tabs to spaces.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/history_info_response_181/sipp/user1.xml@33 
PS4, Line 33:                 <action>
            :                         <!-- Check that the Diversion header is present and contains the correct name. -->
            : 	        	<ereg regexp="user2" search_in="hdr" header="History-Info:" occurence="1" check_it="true" assign_to="1" />
            : 		        <log message="Received 181 with History-Info header: [$1]." />
            : 	        	<ereg regexp="amenhotep" search_in="hdr" header="History-Info:" occurence="2" check_it="true" assign_to="2" />
            : 		        <log message="Received 181 with History-Info header: [$2]." />
fix mix of spaces and tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/no_diversion_response_181/sipp/user1.xml 
File tests/channels/pjsip/history_info/no_diversion_response_181/sipp/user1.xml:

https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/no_diversion_response_181/sipp/user1.xml@6 
PS4, Line 6:                         INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
           :                         Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
           :                         From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
           :                         To: user2 <sip:user2@[remote_ip]:[remote_port]>
           :                         Call-ID: [call_id]
           :                         CSeq: [cseq] INVITE
           :                         Contact: sip:user1@[local_ip]:[local_port]
           :                         Max-Forwards: 70
           :                         Content-Type: application/sdp
           :                         Content-Length: [len]
convert spaces to tabs.


https://gerrit.asterisk.org/c/testsuite/+/14732/4/tests/channels/pjsip/history_info/no_diversion_response_181/sipp/user1.xml@33 
PS4, Line 33:                 <action>
            :                         <!-- Check that the Diversion header is present and contains the correct name. -->
            : 	        	<ereg regexp="user2" search_in="hdr" header="History-Info:" occurence="1" check_it="true" assign_to="1" />
            : 		        <log message="Received 181 with History-Info header: [$1]." />
            : 	        	<ereg regexp=".+" search_in="hdr" header="History-Info:" occurence="2" check_it_inverse="true" assign_to="2" />
            : 		        <log message="Received 181 with History-Info header: [$2]." />
fix mix of spaces and tabs.



-- 
To view, visit https://gerrit.asterisk.org/c/testsuite/+/14732
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-Change-Id: I287c78b38f48817ea4547e3ab0370d26d2abf2e3
Gerrit-Change-Number: 14732
Gerrit-PatchSet: 4
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 15 Sep 2020 18:45:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200915/82bbe04c/attachment-0001.html>


More information about the asterisk-code-review mailing list