-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for last_XX:value, last_XX:uri, last_XX:param.tag
- Loading branch information
Showing
5 changed files
with
232 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# This regression test is a part of SIPp. | ||
# Author: Pietro Bertera, Snom Technology AG, 2016 | ||
|
||
. "`dirname "$0"`/../functions"; init | ||
|
||
sippbg -m 1 -sf uas.xml -p 5070 -i 127.0.0.1 \ | ||
-timeout 4 -timeout_error -trace_logs \ | ||
-log_file log.log >/dev/null 2>&1 | ||
|
||
job=$! | ||
|
||
sippfg -m 1 -sf uac.xml 127.0.0.1:5070 \ | ||
-timeout 4 -timeout_error >/dev/null 2>&1 | ||
|
||
status=$? | ||
wait $job || status=1 | ||
|
||
if test $status -eq 0; then | ||
if grep -e ^LAST\ From:\ \"Tom\ Jones\"\ \<sip:[email protected]\>\;tag=SIPpTag001$ log.log > /dev/null; then | ||
if grep -e ^LAST\ To:uri:\ sip:[email protected]$ log.log > /dev/null; then | ||
if grep -e ^LAST\ From-tag:\ SIPpTag001$ log.log > /dev/null; then | ||
ok | ||
else | ||
fail "From:param.tag not found" | ||
fi | ||
else | ||
fail "To:uri not found" | ||
fi | ||
else | ||
fail "From header not found" | ||
fi | ||
else | ||
fail "process failure" | ||
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,54 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
<scenario> | ||
<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=justafake | ||
From: "Tom Jones" <sip:[email protected]>;tag=SIPpTag00[call_number] | ||
To: "Fromage" <sip:[email protected]> | ||
Call-ID: [call_id] | ||
CSeq: 1 INVITE | ||
Contact: <sip:sipp@[local_ip]:[local_port]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv response="200" response_txn="invite" rrs="true"/> | ||
|
||
<send retrans="500" ack_txn="invite"> | ||
<![CDATA[ | ||
ACK [next_url] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=justafake | ||
From: "Tom Jones" <sip:[email protected]>;tag=SIPpTag00[call_number] | ||
To: "Fromage" <sip:[email protected]>[peer_tag_param] | ||
Call-ID: [call_id] | ||
CSeq: 1 ACK | ||
Contact: sip:sipp@[local_ip]:[local_port] | ||
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:] | ||
Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<timewait milliseconds="500"/> | ||
</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,51 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
<scenario> | ||
<recv request="INVITE"/> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
Via: [last_Via:value] | ||
From: [last_From:value] | ||
To: [last_To:value];tag=[pid]SIPpTag00[call_number] | ||
Call-ID: [last_Call-ID:value] | ||
CSeq: [last_CSeq:value] | ||
Contact: sip:sipp@[local_ip]:[local_port] | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv request="ACK" rrs="true"> | ||
<action> | ||
<log message="LAST Contact: [last_Contact]" /> | ||
<log message="LAST Via: [last_Via:value]"/> | ||
<log message="LAST From: [last_From:value]"/> | ||
<log message="LAST To: [last_To:value]"/> | ||
<log message="LAST To:uri: [last_To:uri]"/> | ||
<log message="LAST Contact:uri: [last_Contact:uri]"/> | ||
<log message="LAST From-tag: [last_From:param.tag]"/> | ||
</action> | ||
</recv> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
BYE [next_url] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
From: [last_To:value] | ||
To: [last_From:value] | ||
Call-ID: [call_id] | ||
CSeq: 2 BYE | ||
Contact: sip:sipp@[local_ip]:[local_port] | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv response="200"/> | ||
|
||
<timewait milliseconds="500"/> | ||
</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