TT#116100 scenarios/invite_ignore_allowip

* domain per scenario
* dynamic IP/port and numbers

Change-Id: I02cd063dac5542d8184809ff7752be5e3c3cc973
mr9.5.1
Victor Seva 5 years ago committed by Víctor Seva
parent 10ddce42fa
commit 62f846bf16

@ -22,8 +22,8 @@ flow:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser1002@'
- 'To: <sip:testuser1003@'
- 'Contact: sip:[% scenarios.0.username %]@'
- 'To: <sip:[% scenarios.0.responders.0.username %]@'
- 'CSeq: 1 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
@ -31,12 +31,12 @@ sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -60,10 +60,10 @@ flow:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
@ -96,10 +96,10 @@ flow:
$avp(lua_dlg_profile): [
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
@ -107,19 +107,19 @@ flow:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_ACC_CALLER:
- start|ROUTE_SET_ACC_CALLER_CALL_COUNTERS:
@ -183,19 +183,19 @@ flow:
- exit|DEFAULT_SEND:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
@ -203,34 +203,34 @@ flow:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser1002@'
- 'Contact: sip:[% scenarios.0.username %]@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser1002"'
- 'Proxy-Authorization: Digest username="[% scenarios.0.username %]"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]
- [
'^INVITE sip:testuser1003@',
'^INVITE sip:[% scenarios.0.responders.0.username %]@',
'CSeq: 2 INVITE',
'From: <sip:4311002@',
'To: <sip:testuser1003@',
'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@',
'Content-Type: application/sdp',
'P-Caller-UUID: \w+',
'P-Callee-UUID: \w+',
'P-Asserted-Identity: <sip:4311002@',
'P-Called-Party-ID: <sip:testuser1003@',
'P-Asserted-Identity: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@',
'P-Called-Party-ID: <sip:[% scenarios.0.responders.0.username %]@',
'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no',
'P-App-Name: sbc'
]

@ -13,15 +13,15 @@ flow:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- 'INVITE sip:testuser1003@127.1.0.1:\d+ SIP/2.0'
- 'From: <sip:4311002@spce.test>;tag=[\w-]+'
- 'To: <sip:testuser1003@spce.test>'
- 'INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0'
- 'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@invite-ignore-allowip.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% scenarios.0.responders.0.username %]@invite-ignore-allowip.scenarios.test>'
- 'CSeq: \d+ INVITE'
- 'P-LB-Uptime: \d+'
- 'P-Asserted-Identity: <sip:4311002@spce.test>'
- 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]'
- 'P-NGCP-Caller-Info: <sip:testuser1002@spce.test>;ip=127.126.0.1;port=\d+;primary=4311002'
- 'P-NGCP-Callee-Info: <sip:testuser1003@spce.test>;ip=127.0.0.1;port=5060;primary=4311003'
- 'P-Asserted-Identity: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@invite-ignore-allowip.scenarios.test>'
- 'P-Caller-UUID: [% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]'
- 'P-NGCP-Caller-Info: <sip:[% scenarios.0.username %]@invite-ignore-allowip.scenarios.test>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]'
- 'P-NGCP-Callee-Info: <sip:[% scenarios.0.responders.0.username %]@invite-ignore-allowip.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_ignore_allowip_scenarios_test.testuser1003.phone_number %]'
- 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060'
- 'Content-Type: application/sdp'
- 'Contact: <sip:127.0.0.1:508[08];transport=udp>'
@ -29,22 +29,22 @@ sip_in:
sip_out:
- [
'SIP/2.0 100 Trying',
'From: <sip:4311002@spce.test>;tag=[\w-]+',
'To: <sip:testuser1003@spce.test>',
'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@invite-ignore-allowip.scenarios.test>;tag=[\w-]+',
'To: <sip:[% scenarios.0.responders.0.username %]@invite-ignore-allowip.scenarios.test>',
'CSeq: \d+ INVITE',
'Server: Sipwise NGCP Proxy',
'Content-Length: 0',
]
- [
'INVITE sip:testuser1003@127.1.0.1:\d+ SIP/2.0',
'From: <sip:4311002@spce.test>;tag=[\w-]+',
'To: <sip:testuser1003@spce.test>',
'INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0',
'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@invite-ignore-allowip.scenarios.test>;tag=[\w-]+',
'To: <sip:[% scenarios.0.responders.0.username %]@invite-ignore-allowip.scenarios.test>',
'CSeq: \d+ INVITE',
'P-LB-Uptime: \d+',
'P-Asserted-Identity: <sip:4311002@spce.test>',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]',
'P-NGCP-Caller-Info: <sip:testuser1002@spce.test>;ip=127.126.0.1;port=\d+;primary=4311002',
'P-NGCP-Callee-Info: <sip:testuser1003@spce.test>;ip=127.0.0.1;port=5060;primary=4311003',
'P-Asserted-Identity: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@invite-ignore-allowip.scenarios.test>',
'P-Caller-UUID: [% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]',
'P-NGCP-Caller-Info: <sip:[% scenarios.0.username %]@invite-ignore-allowip.scenarios.test>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]',
'P-NGCP-Callee-Info: <sip:[% scenarios.0.responders.0.username %]@invite-ignore-allowip.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_ignore_allowip_scenarios_test.testuser1003.phone_number %]',
'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060',
'Content-Type: application/sdp',
'Contact: <sip:127.0.0.1:508[08];transport=udp>',

@ -17,19 +17,19 @@ flow:
- return|dialog:start:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_ignore_allowip_scenarios_test.testuser1003.uuid %]"
]
- return|dialog:start:
sip_in:
@ -39,6 +39,6 @@ sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -26,12 +26,12 @@ flow:
sip_in:
- '^ACK sip:127.0.0.1:5080;prxroute=1 SIP/2.0'
- 'CSeq: 2 ACK'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1003@'
- 'From: <sip:[% scenarios.0.username %]@'
- 'To: <sip:[% scenarios.0.responders.0.username %]@'
sip_out:
- [
'^ACK sip:127.0.0.1:5080;prxroute=1 SIP/2.0',
'CSeq: 2 ACK',
'From: <sip:4311002@',
'To: <sip:testuser1003@'
'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -29,27 +29,27 @@ flow:
- exit|ROUTE_EXIT:
sip_in:
- '^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'Contact: sip:[% scenarios.0.username %]@'
- 'CSeq: 3 BYE'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1003@'
- 'From: <sip:[% scenarios.0.username %]@'
- 'To: <sip:[% scenarios.0.responders.0.username %]@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]
- [
'^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'Contact: sip:[% scenarios.0.username %]@',
'CSeq: 3 BYE',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:testuser1003@'
'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -16,13 +16,13 @@ sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: 3 BYE'
- 'Content-Length: 0'
- 'From: <sip:4311002@'
- 'To: <sip:testuser1003@'
- 'From: <sip:[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]@'
- 'To: <sip:[% scenarios.0.responders.0.username %]@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -1,10 +1,10 @@
cdr:
- source_user: 'testuser1002'
source_domain: 'spce.test'
source_cli: '4311002'
destination_user: 'testuser1003'
destination_domain: 'spce.test'
destination_user_dialed: 'testuser1003'
- source_user: '[% scenarios.0.username %]'
source_domain: 'invite-ignore-allowip.scenarios.test'
source_cli: '[% invite_ignore_allowip_scenarios_test.testuser1002.phone_number %]'
destination_user: '[% scenarios.0.responders.0.username %]'
destination_domain: 'invite-ignore-allowip.scenarios.test'
destination_user_dialed: '[% scenarios.0.responders.0.username %]'
call_type: 'call'
call_status: 'ok'
call_code: '200'

@ -1,5 +1,5 @@
{
"testuser1002@spce.test": {
"[% scenarios.0.username %]@invite-ignore-allowip.scenarios.test": {
"allowed_ips": [
"1.2.3.4"
],

@ -1,6 +1,7 @@
---
test_uuid: invite_ignore_allowip
domains:
'spce.test':
'invite-ignore-allowip.scenarios.test':
reseller_id: 1
customers:
'customer.test':
@ -13,7 +14,7 @@ customers:
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
invite-ignore-allowip.scenarios.test:
testuser1003:
customer: 'customer.test'
password: testuser
@ -28,10 +29,10 @@ subscribers:
sn: 1002
scenarios:
- ip: 127.126.0.1
domain: spce.test
domain: invite-ignore-allowip.scenarios.test
username: testuser1002
responders:
- ip: 127.1.0.1
domain: spce.test
register: yes
domain: invite-ignore-allowip.scenarios.test
register: 'yes'
username: testuser1003

Loading…
Cancel
Save