-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test if chan_pjsip replies w/ 422 (Session Interval Too Small) response to an INVITE request w/ Session-Expires lower than timers_min_se setting.
- Loading branch information
Showing
6 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
tests/channels/pjsip/session_timers/session-timer-minse/configs/ast1/extensions.conf
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,4 @@ | ||
[default] | ||
exten => test,1,Answer() | ||
same => n,Wait(10) | ||
same => n,Hangup |
14 changes: 14 additions & 0 deletions
14
tests/channels/pjsip/session_timers/session-timer-minse/configs/ast1/pjsip.conf
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,14 @@ | ||
[system] | ||
type=system | ||
timer_t1=100 | ||
timer_b=6400 | ||
|
||
[local-transport-udp] | ||
type=transport | ||
protocol=udp | ||
bind=127.0.0.1 | ||
|
||
[sipp] | ||
type=endpoint | ||
context=default | ||
timers_min_se=180 |
57 changes: 57 additions & 0 deletions
57
tests/channels/pjsip/session_timers/session-timer-minse/sipp/session-timer-minse.xml
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,57 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" ?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
||
<scenario name="empty reinvite all codecs"> | ||
<!-- In client mode (sipp placing calls), the Call-ID MUST be --> | ||
<!-- generated by sipp. To do so, use [call_id] keyword. --> | ||
<send retrans="500"> | ||
<![CDATA[ | ||
INVITE sip:test@[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: sut <sip:[service]@[remote_ip]> | ||
Call-ID: [call_id] | ||
CSeq: 1 INVITE | ||
Contact: sip:sipp@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Supported: timer | ||
Session-Expires: 120;refresher=uac | ||
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 0 8 | ||
a=rtpmap:8 PCMA/8000 | ||
a=rtpmap:0 PCMU/8000 | ||
a=ptime:20 | ||
]]> | ||
</send> | ||
|
||
<recv response="100" optional="true"/> | ||
|
||
<recv response="422"/> | ||
|
||
<send> | ||
<![CDATA[ | ||
ACK sip:[service]@[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: sut <sip:[service]@[remote_ip]>[peer_tag_param] | ||
Call-ID: [call_id] | ||
CSeq: 1 ACK | ||
Contact: sip:sipp@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Subject: Performance Test | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
</scenario> |
27 changes: 27 additions & 0 deletions
27
tests/channels/pjsip/session_timers/session-timer-minse/test-config.yaml
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,27 @@ | ||
testinfo: | ||
summary: 'Ensure Session Interval Too Small response' | ||
description: | | ||
'A SIPp scenario places a call into Asterisk w/ Session-Expires smaller than | ||
configured Min-SE. Asterisk should respond w/ 422.' | ||
test-modules: | ||
test-object: | ||
config-section: sipp-config | ||
typename: 'sipp.SIPpTestCase' | ||
|
||
sipp-config: | ||
memcheck-delay-stop: 7 | ||
test-iterations: | ||
- | ||
scenarios: | ||
- { 'key-args': {'scenario': 'session-timer-minse.xml'}} | ||
|
||
properties: | ||
dependencies: | ||
- python: 'twisted' | ||
- python: 'starpy' | ||
- app: 'sipp' | ||
- asterisk: 'res_pjsip' | ||
- asterisk: 'res_pjsip_session' | ||
tags: | ||
- pjsip |
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,2 @@ | ||
tests: | ||
- test: 'session-timer-minse' |
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