MT#60035 Scenario invite_blockout_ncos extended for adm_ncos_exceptions

Scenario invite_blockout_ncos now performs an additional test call
to test adm_ncos_exceptions, the second call must be accepted even if it matches
the ncos pattern because destination is listed into adm_ncos_exceptions new
user preference

Change-Id: Icc5f78d9b0c2982dc0ab34f5eba7505a156e42d4
mr13.0
Alessio Garzi 10 months ago
parent 0a7353c80f
commit 083c97d86f

@ -58,6 +58,8 @@ flow:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_DETECT_LOOP:
- return|ROUTE_DETECT_LOOP:
- start|ROUTE_CALLEE_PROCESS_SPEEDDIALS:
- return|ROUTE_CALLEE_PROCESS_SPEEDDIALS:
- start|ROUTE_CLEAR_CALLEE_PREF:
- return|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_PREF:

@ -9,3 +9,13 @@ cdr:
call_status: 'other'
call_code: '403'
duration: '0'
- source_user: 'testuser1002'
source_domain: 'invite-blockout-ncos.scenarios.test'
source_cli: '[% invite_blockout_ncos_scenarios_test.testuser1002.phone_number %]'
destination_user: 'testuser1004'
destination_domain: 'invite-blockout-ncos.scenarios.test'
destination_user_dialed: '[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]'
call_type: 'call'
call_status: 'noanswer'
call_code: '480'
duration: '0'

@ -3,6 +3,7 @@
"nat_sipping": "no"
},
"testuser1002@invite-blockout-ncos.scenarios.test": {
"ncos": "ncos_test_00"
"ncos": "ncos_test_00",
"adm_ncos_exceptions": ["[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]"]
}
}

@ -1,5 +1,11 @@
---
test_uuid: invite_blockout_ncos
description: |
this scenario checks ncos feature.
Fist call gets blocked by ncos because callee matches pattern ^431.
Second call also matches pattern ^431 but
it is allowed because destination is listed into
adm_ncos_exceptions preference
domains:
invite-blockout-ncos.scenarios.test:
reseller_id: 1
@ -15,6 +21,12 @@ customers:
reseller_id: 1
subscribers:
invite-blockout-ncos.scenarios.test:
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1003:
customer: 'customer.test'
password: testuser
@ -37,3 +49,12 @@ scenarios:
domain: invite-blockout-ncos.scenarios.test
register: 'no'
active: 'no'
- ip: 127.126.0.1
username: testuser1002
domain: invite-blockout-ncos.scenarios.test
responders:
- ip: 127.1.0.2
username: testuser1004
domain: invite-blockout-ncos.scenarios.test
register: 'no'
active: 'no'

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Sipwise NGCP Benchmark UAC Caller">
<send start_rtd="1" start_rtd="2">
<![CDATA[
INVITE sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=1]@[field2 file="caller.csv" line=1]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]>
Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id]
CSeq: 1 INVITE
Contact: <sip:[field0 file="caller.csv" line=1]@[local_ip]:[local_port]>
Max-Forwards: 70
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
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" rtd="1" optional="true">
</recv>
<recv response="407" rtd="2" auth="true"/>
<send>
<![CDATA[
ACK sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]:[remote_port] SIP/2.0
[last_Via:]
From: <sip:[field0 file="caller.csv" line=1]@[field2 file="caller.csv" line=1]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id]
CSeq: 1 ACK
Contact: <sip:[field0 file="caller.csv" line=1]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send start_rtd="3">
<![CDATA[
INVITE sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=1]@[field2 file="caller.csv" line=1]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]>
Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id]
CSeq: 2 INVITE
Contact: <sip:[field0 file="caller.csv" line=1]@[local_ip]:[local_port]>
Max-Forwards: 70
[field1 file="caller.csv" line=1]
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
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="480" rtd="3">
</recv>
<send>
<![CDATA[
ACK sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]:[remote_port] SIP/2.0
[last_Via:]
From: <sip:[field0 file="caller.csv" line=1]@[field2 file="caller.csv" line=1]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field1 file="callee.csv" line=1]@[field3 file="callee.csv" line=1]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id]
CSeq: 2 ACK
Contact: <sip:[field0 file="caller.csv" line=1]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200, 500, 1000"/>
<!-- <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> -->
</scenario>

@ -0,0 +1,26 @@
messages:
- - 'SIP/2.0 100 Trying'
- 'From: <sip:[% scenarios.1.username %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]@invite-blockout-ncos.scenarios.test>'
- 'CSeq: \d+ INVITE'
- 'Server: Sipwise NGCP LB'
- 'Content-Length: 0'
- - 'SIP/2.0 407 Proxy Authentication Required'
- 'From: <sip:[% scenarios.1.username %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'CSeq: \d+ INVITE'
- 'Proxy-Authenticate: Digest realm="invite-blockout-ncos.scenarios.test", nonce="[^"]+"'
- 'Server: Sipwise NGCP Proxy'
- 'Content-Length: 0'
- - 'SIP/2.0 100 Trying'
- 'From: <sip:[% scenarios.1.username %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]@invite-blockout-ncos.scenarios.test>'
- 'CSeq: \d+ INVITE'
- 'Server: Sipwise NGCP LB'
- 'Content-Length: 0'
- - 'SIP/2.0 480 Offline'
- 'From: <sip:[% scenarios.1.username %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% invite_blockout_ncos_scenarios_test.testuser1004.phone_number %]@invite-blockout-ncos.scenarios.test>;tag=[\w-]+'
- 'CSeq: \d+ INVITE'
- 'Server: Sipwise NGCP Proxy'
- 'Content-Length: 0'
Loading…
Cancel
Save