Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix [routes] keyword in UAS scenario.
The strrchr-logic did not do what was intended at all. Closes #262.
- Loading branch information
Showing
7 changed files
with
298 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# This regression test is a part of SIPp. | ||
# Author: Walter Doekes, OSSO B.V., 2016 | ||
# | ||
# Test Record-Route and [routes]. | ||
# | ||
. "`dirname "$0"`/../functions"; init | ||
|
||
sippbg -sf uas.xml -p 5070 -trace_msg -message_file uas.log | ||
sippfg -m 1 -sf uac.xml 127.0.0.1:5070 -trace_msg -message_file uac.log \ | ||
-timeout 5 -timeout_error >/dev/null 2>&1 | ||
status=$? | ||
|
||
test $status -ne 0 && fail "SIPp UAC job failed" | ||
|
||
uac_route=`sed -e '/^ACK /,/^$/!d;/^Route:/!d;s/[[:cntrl:]]//g' uac.log` | ||
uac_expected='Route: <sip:127.0.1.1:2;lr>, <sip:127.0.1.1:3;lr>, <sip:127.0.1.1:5060;lr>' | ||
|
||
uas_route=`sed -e '/^BYE /,/^$/!d;/^Route:/!d;s/[[:cntrl:]]//g' uas.log` | ||
uas_expected='Route: <sip:127.0.1.1:5060;lr>, <sip:127.0.1.1:3;lr>, <sip:127.0.1.1:2;lr>' | ||
|
||
if test "$uac_route" != "$uac_expected"; then | ||
fail "UAC Route unexpected, got: $uac_route" | ||
elif test "$uas_route" != "$uas_expected"; then | ||
fail "UAS Route unexpected, got: $uas_route" | ||
else | ||
ok | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
<scenario name="UAC that pretends to be a proxy"> | ||
|
||
<send retrans="500" start_txn="invite"> | ||
<![CDATA[ | ||
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
Via: SIP/2.0/[transport] [local_ip]:3;branch=[branch]-proxy2 | ||
Via: SIP/2.0/[transport] [local_ip]:2;branch=[branch]-proxy1 | ||
Via: SIP/2.0/[transport] [local_ip]:1;branch=[branch]-uac | ||
Record-Route: <sip:[local_ip]:[local_port];lr> | ||
Record-Route: <sip:[local_ip]:3;lr> | ||
Record-Route: <sip:[local_ip]:2;lr> | ||
From: sip:[service]@[local_ip]:[local_port];tag=[pid]SIPpTag00[call_number] | ||
To: sip:[service]@[remote_ip]:[remote_port] | ||
Call-ID: [call_id] | ||
CSeq: [cseq] INVITE | ||
Contact: <sip:[service]@[local_ip]:1;transport=[transport]> | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [rtpstream_audio_port] RTP/AVP 8 0 | ||
a=rtpmap:8 PCMA/8000 | ||
a=rtpmap:0 PCMU/8000 | ||
]]> | ||
</send> | ||
|
||
<recv response="100" optional="true" response_txn="invite"/> | ||
|
||
<recv response="180" optional="true" response_txn="invite"/> | ||
|
||
<recv response="183" optional="true" response_txn="invite"/> | ||
|
||
<recv response="200" rrs="true" response_txn="invite"/> | ||
|
||
<send ack_txn="invite"> | ||
<![CDATA[ | ||
ACK [next_url] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
Via: SIP/2.0/[transport] [local_ip]:3;branch=[branch]-proxy2 | ||
Via: SIP/2.0/[transport] [local_ip]:2;branch=[branch]-proxy1 | ||
Via: SIP/2.0/[transport] [local_ip]:1;branch=[branch]-uac | ||
[routes] | ||
From: sip:[service]@[local_ip]:[local_port];tag=[pid]SIPpTag00[call_number] | ||
To: sip:[service]@[remote_ip]:[remote_port][peer_tag_param] | ||
Call-ID: [call_id] | ||
CSeq: [cseq] ACK | ||
Contact: <sip:[service]@[local_ip]:1;transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv request="BYE"/> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<timewait milliseconds="1000"/><!-- retransmit 200's for a while --> | ||
|
||
</scenario> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
<scenario name="iinv-o200-obye.xml -- wjd 2014"> | ||
|
||
<recv request="INVITE" rrs="true"/> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 180 Ringing | ||
[last_Via:] | ||
[last_Record-Route:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag01[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[service]@[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_Record-Route:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag01[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[service]@[local_ip]:[local_port];transport=[transport]> | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [media_port] RTP/AVP 8 0 | ||
a=rtpmap:8 PCMA/8000 | ||
a=rtpmap:0 PCMU/8000 | ||
]]> | ||
</send> | ||
|
||
<recv request="ACK"> | ||
<action> | ||
<ereg regexp=": *(.*)" search_in="hdr" header="To" assign_to="_,us"/><!-- with tag --> | ||
<ereg regexp=": *(.*)" search_in="hdr" header="From" assign_to="_,them"/> | ||
</action> | ||
</recv> | ||
<Reference variables="_"/> | ||
|
||
<send start_txn="bye" retrans="500"> | ||
<![CDATA[ | ||
BYE [next_url] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
[routes] | ||
From: [$us] | ||
To: [$them] | ||
[last_Call-ID:] | ||
CSeq: [cseq] BYE | ||
Contact: <sip:[service]@[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv response="200" response_txn="bye"/> | ||
|
||
</scenario><!-- vim: set ts=8 sw=2 sts=2 et ai: --> |
Oops, something went wrong.