-
Notifications
You must be signed in to change notification settings - Fork 441
Enable CSV field and computed variable substitution in recv timeout parameters #802
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
aab495b
325da62
c7e15f0
03a2f3f
7dba0f0
138cd4c
e49bc84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| audio_found : 1 | ||
| primary_audio_cryptotag : 1 | ||
| secondary_audio_cryptotag : 2 | ||
| primary_audio_cryptosuite : AES_CM_128_HMAC_SHA1_80 | ||
| secondary_audio_cryptosuite : AES_CM_128_HMAC_SHA1_32 | ||
| primary_audio_cryptokeyparams : Ijmgrr3jQU/Z2HKBVPj4SNgR0QHH64i4KOCkeyA3 | ||
| secondary_audio_cryptokeyparams : UKUBHcjWoG0prpbzZrDleoWhWgRJG98Dlw0TZ4cZ | ||
| primary_unencrypted_audio_srtp : 0 | ||
| secondary_unencrypted_audio_srtp: 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| video_found : 1 | ||
| primary_video_cryptotag : 1 | ||
| secondary_video_cryptotag : 2 | ||
| primary_video_cryptosuite : AES_CM_128_HMAC_SHA1_80 | ||
| secondary_video_cryptosuite : AES_CM_128_HMAC_SHA1_32 | ||
| primary_video_cryptokeyparams : W2bmaZ2IKPX+JSEu91+A9a3ImZKjt9II46MqQg7+ | ||
| secondary_video_cryptokeyparams : 1Mh4k9bF8y/NiK813haiLO0ZnvXdG9mEy9YyLG+V | ||
| primary_unencrypted_video_srtp : 0 | ||
| secondary_unencrypted_video_srtp: 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| call::init(): (a) TX-UAC-AUDIO SRTP context - CLIENT setting SRTP header size to 12 | ||
| call::init(): (a) TX-UAC-VIDEO SRTP context - CLIENT setting SRTP header size to 12 | ||
| call::init(): (b) RX-UAC-AUDIO SRTP context - CLIENT setting SRTP header size to 12 | ||
| call::init(): (b) RX-UAC-VIDEO SRTP context - CLIENT setting SRTP header size to 12 | ||
| call::createSendingMessage(): E_Message_RTPStream_Audio_Port: 6000 | ||
| call::createSendingMessage(): E_Message_CryptoTag1Audio() - PRIMARY - CLIENT: 1 | ||
| call::createSendingMessage(): E_Message_CryptoSuiteAesCm128Sha1801Audio() - PRIMARY - CLIENT | ||
| call::createSendingMessage(): Marking preferred OFFER cryptosuite... | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams1Audio() - PRIMARY - CLIENT - component offset:0 | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams1Audio() - PRIMARY - CLIENT - generating new concatenated base64-encoded master key/salt:Ijmgrr3jQU/Z2HKBVPj4SNgR0QHH64i4KOCkeyA3 | ||
| call::createSendingMessage(): E_Message_CryptoTag2Audio() - SECONDARY - CLIENT: 2 | ||
| call::createSendingMessage(): E_Message_CryptoSuiteAesCm128Sha1322Audio() - SECONDARY - CLIENT | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams2Audio() - SECONDARY - CLIENT - component offset:0 | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams2Audio() - SECONDARY - CLIENT - generating new concatenated base64-encoded master key/salt:UKUBHcjWoG0prpbzZrDleoWhWgRJG98Dlw0TZ4cZ | ||
| call::createSendingMessage(): E_Message_RTPStream_Audio_Port: 6001 | ||
| call::createSendingMessage(): E_Message_RTPStream_Video_Port: 6002 | ||
| call::createSendingMessage(): E_Message_CryptoTag1Video() - PRIMARY - CLIENT: 1 | ||
| call::createSendingMessage(): E_Message_CryptoSuiteAesCm128Sha1801Video() - PRIMARY - CLIENT | ||
| call::createSendingMessage(): Marking preferred OFFER cryptosuite... | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams1Video() - PRIMARY - CLIENT - component offset:0 | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams1Video() - PRIMARY - CLIENT - generating new concatenated base64-encoded master key/salt:W2bmaZ2IKPX+JSEu91+A9a3ImZKjt9II46MqQg7+ | ||
| call::createSendingMessage(): E_Message_CryptoTag2Video() - SECONDARY - CLIENT: 2 | ||
| call::createSendingMessage(): E_Message_CryptoSuiteAesCm128Sha1322Video() - SECONDARY - CLIENT | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams2Video() - SECONDARY - CLIENT - component offset:0 | ||
| call::createSendingMessage(): E_Message_CryptoKeyParams2Video() - SECONDARY - CLIENT - generating new concatenated base64-encoded master key/salt:1Mh4k9bF8y/NiK813haiLO0ZnvXdG9mEy9YyLG+V | ||
| call::createSendingMessage(): E_Message_RTPStream_Video_Port: 6003 | ||
| call::createSendingMessage(): (b) RX-UAC-AUDIO SRTP context - ssrc:0x6b8b4567 address:127.0.0.2 port:6000 | ||
| call::createSendingMessage(): (b) RX-UAC-VIDEO SRTP context - ssrc:0x6b8b4568 address:127.0.0.2 port:6002 | ||
| call::createSendingMessage(): Switching session state: eNoSession --> eOfferSent |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/sh | ||
| # Simple test to demonstrate timeout variable functionality works | ||
| . "`dirname "$0"`/../functions"; init | ||
|
|
||
| # Test that scenarios with timeout variables can be parsed without errors | ||
| echo "SEQUENTIAL" > test_data.csv | ||
| echo "call1;user1;100;1000" >> test_data.csv | ||
|
|
||
| # Test 1: Parse scenario with CSV field timeout - should not produce parsing errors | ||
| timeout 3 "`get_sipp`" -sf uac_csv.xml -inf test_data.csv -p 5070 -m 0 127.0.0.1 2>&1 | grep -q "timeout.*field" && fail "parsing error with CSV field timeout" | ||
|
|
||
| # Test 2: Parse scenario with variable timeout - should not produce parsing errors | ||
| timeout 3 "`get_sipp`" -sf uac_variable.xml -inf test_data.csv -p 5071 -m 0 127.0.0.1 2>&1 | grep -q "timeout.*variable" && fail "parsing error with variable timeout" | ||
|
orgads marked this conversation as resolved.
|
||
|
|
||
| # Clean up | ||
| rm -f test_data.csv | ||
|
|
||
| ok | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please include newline at the end of all new files.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added newlines to all XML files in the regression test directory. All files now end with proper newlines. (7dba0f0)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You missed this file (run).
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added missing newline to regress/github-#0801/run file. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
| <!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
|
||
| <scenario name="UAC CSV timeout test"> | ||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| INVITE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| To: [field1] <sip:[field1]@[remote_ip]:[remote_port]> | ||
| Call-ID: [call_id] | ||
| CSeq: 1 INVITE | ||
| Contact: sip:sipp@[local_ip]:[local_port] | ||
| Max-Forwards: 70 | ||
| Subject: Performance Test - [field0] | ||
| Content-Type: application/sdp | ||
| Content-Length: [len] | ||
|
|
||
| v=0 | ||
| o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
| s=- | ||
| c=IN IP[local_ip_type] [local_ip] | ||
| t=0 0 | ||
| m=audio [media_port] RTP/AVP 0 | ||
| a=rtpmap:0 PCMU/8000 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv response="100" optional="true"> | ||
| </recv> | ||
|
|
||
| <recv response="200" rtd="true"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| To: [field1] <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param] | ||
| Call-ID: [call_id] | ||
| CSeq: 1 ACK | ||
| Contact: sip:sipp@[local_ip]:[local_port] | ||
| Max-Forwards: 70 | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <!-- Test CSV field variable in timeout parameter - should wait [field3] milliseconds --> | ||
| <recv request="BYE" timeout="[field3]"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| 200 OK SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: [field1] <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param] | ||
| To: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| Call-ID: [call_id] | ||
| CSeq: [cseq] BYE | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| </scenario> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
| <!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
|
||
| <scenario name="UAC Variable timeout test"> | ||
| <nop> | ||
| <action> | ||
| <assignstr assign_to="timervalue" value="[field3]" /> | ||
| <todouble assign_to="tmresult" variable="timervalue" /> | ||
| </action> | ||
| </nop> | ||
|
|
||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| INVITE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| To: [field1] <sip:[field1]@[remote_ip]:[remote_port]> | ||
| Call-ID: [call_id] | ||
| CSeq: 1 INVITE | ||
| Contact: sip:sipp@[local_ip]:[local_port] | ||
| Max-Forwards: 70 | ||
| Subject: Performance Test - [field0] | ||
| Content-Type: application/sdp | ||
| Content-Length: [len] | ||
|
|
||
| v=0 | ||
| o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
| s=- | ||
| c=IN IP[local_ip_type] [local_ip] | ||
| t=0 0 | ||
| m=audio [media_port] RTP/AVP 0 | ||
| a=rtpmap:0 PCMU/8000 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv response="100" optional="true"> | ||
| </recv> | ||
|
|
||
| <recv response="200" rtd="true"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| To: [field1] <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param] | ||
| Call-ID: [call_id] | ||
| CSeq: 1 ACK | ||
| Contact: sip:sipp@[local_ip]:[local_port] | ||
| Max-Forwards: 70 | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <!-- Test computed variable in timeout parameter - should wait [$tmresult] milliseconds --> | ||
| <recv request="BYE" timeout="[$tmresult]"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| 200 OK SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: [field1] <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param] | ||
| To: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] | ||
| Call-ID: [call_id] | ||
| CSeq: [cseq] BYE | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| </scenario> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
| <!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
|
||
| <scenario name="UAS CSV timeout test"> | ||
| <recv request="INVITE" crlf="true"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| SIP/2.0 100 Trying | ||
| [last_Via:] | ||
| [last_From:] | ||
| [last_To:];tag=[pid]SIPpTag01[call_number] | ||
| [last_Call-ID:] | ||
| [last_CSeq:] | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| SIP/2.0 200 OK | ||
| [last_Via:] | ||
| [last_From:] | ||
| [last_To:];tag=[pid]SIPpTag01[call_number] | ||
| [last_Call-ID:] | ||
| [last_CSeq:] | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Type: application/sdp | ||
| Content-Length: [len] | ||
|
|
||
| v=0 | ||
| o=uas 1 1 IN IP[local_ip_type] [local_ip] | ||
| s=- | ||
| c=IN IP[local_ip_type] [local_ip] | ||
| t=0 0 | ||
| m=audio [media_port] RTP/AVP 0 | ||
| a=rtpmap:0 PCMU/8000 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv request="ACK" rtd="true" crlf="true"> | ||
| </recv> | ||
|
|
||
| <!-- Wait 1 second before sending BYE to test timeout --> | ||
| <pause milliseconds="1000"/> | ||
|
|
||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| BYE sip:[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: [last_To:] | ||
| To: [last_From:] | ||
| [last_Call-ID:] | ||
| CSeq: 1 BYE | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv response="200" crlf="true"> | ||
| </recv> | ||
|
|
||
| </scenario> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
| <!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
|
||
| <scenario name="UAS Variable timeout test"> | ||
| <recv request="INVITE" crlf="true"> | ||
| </recv> | ||
|
|
||
| <send> | ||
| <![CDATA[ | ||
| SIP/2.0 100 Trying | ||
| [last_Via:] | ||
| [last_From:] | ||
| [last_To:];tag=[pid]SIPpTag01[call_number] | ||
| [last_Call-ID:] | ||
| [last_CSeq:] | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| SIP/2.0 200 OK | ||
| [last_Via:] | ||
| [last_From:] | ||
| [last_To:];tag=[pid]SIPpTag01[call_number] | ||
| [last_Call-ID:] | ||
| [last_CSeq:] | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Type: application/sdp | ||
| Content-Length: [len] | ||
|
|
||
| v=0 | ||
| o=uas 1 1 IN IP[local_ip_type] [local_ip] | ||
| s=- | ||
| c=IN IP[local_ip_type] [local_ip] | ||
| t=0 0 | ||
| m=audio [media_port] RTP/AVP 0 | ||
| a=rtpmap:0 PCMU/8000 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv request="ACK" rtd="true" crlf="true"> | ||
| </recv> | ||
|
|
||
| <!-- Wait 1 second before sending BYE to test timeout --> | ||
| <pause milliseconds="1000"/> | ||
|
|
||
| <send retrans="500"> | ||
| <![CDATA[ | ||
| BYE sip:[remote_ip]:[remote_port] SIP/2.0 | ||
| Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
| From: [last_To:] | ||
| To: [last_From:] | ||
| [last_Call-ID:] | ||
| CSeq: 1 BYE | ||
| Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
| Content-Length: 0 | ||
| ]]> | ||
| </send> | ||
|
|
||
| <recv response="200" crlf="true"> | ||
| </recv> | ||
|
|
||
| </scenario> |
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.
You added this file blindly with git add. It should be removed and added to .gitignore. Same goes for the other files added in this directory.
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.
Removed the accidentally committed debug files and added .gitignore patterns to prevent similar files from being committed in the future. (7dba0f0)