-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snom patch: Last_ keywords extension #260
Open
pbertera
wants to merge
11
commits into
SIPp:master
Choose a base branch
from
Snomio:snom-last-extensions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
060d7ca
Support for last_XX:value, last_XX:uri, last_XX:param.tag
pbertera 909cae7
Support for last_XX:value, last_XX:uri, last_XX:param.tag
pbertera e755a4c
Merge branch 'snom-last-extensions' of github.com:Snomio/sipp into sn…
pbertera 6a3ec98
Code review
pbertera 3344940
Fixed regtest
pbertera 9442f8d
testcase debugging for travis falure
pbertera a6575cd
travis testcase fix
pbertera b82bfff
fixed regtest
pbertera 8a4ad21
Fixed github-#0260/run
pbertera 9b99ed2
Code review
pbertera e52e597
Unit tests
pbertera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,34 @@ | ||
#!/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 -i 127.0.0.1 -p 5060 127.0.0.1:5070 \ | ||
-timeout 4 -timeout_error >/dev/null 2>&1 | ||
|
||
status=$? | ||
wait $job || status=1 | ||
|
||
|
||
if test $status -ne 0; then | ||
fail "process failure" | ||
elif ! grep -qF 'LAST Contact|Contact: <sip:sipp@127.0.0.1:5060>' log.log; then | ||
fail "[last_Contact] header not found" | ||
elif ! grep -qF 'LAST Contact:|Contact: <sip:sipp@127.0.0.1:5060>' log.log; then | ||
fail "[last_Contact:] header not found" | ||
elif ! grep -qF 'LAST From:value|"Tom Jones" <sip:tom.jones@wales.uk>;tag=SIPpTag001' log.log; then | ||
fail "[last_From:value] not found" | ||
elif ! grep -qF 'LAST To:uri|sip:cheese@paris.fr' log.log; then | ||
fail "[last_To:uri] not found" | ||
elif ! grep -qF 'LAST From:param.tag|SIPpTag001' log.log; then | ||
fail "[last_From:param.tag] not found" | ||
fi | ||
|
||
ok |
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:tom.jones@wales.uk>;tag=SIPpTag00[call_number] | ||
To: "Fromage" <sip:cheese@paris.fr> | ||
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:tom.jones@wales.uk>;tag=SIPpTag00[call_number] | ||
To: "Fromage" <sip:cheese@paris.fr>[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,53 @@ | ||
<?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 | ||
[last_Contact] | ||
[last_via] | ||
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 Contact:|[last_Contact:]" /> | ||
<log message="LAST Contact:uri|[last_Contact:uri]"/> | ||
<log message="LAST Via:value[last_Via:value]"/> | ||
<log message="LAST From:value|[last_From:value]"/> | ||
<log message="LAST To:value|[last_To:value]"/> | ||
<log message="LAST To:uri|[last_To:uri]"/> | ||
<log message="LAST From:param.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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done without so much nesting with negative tests instead: