TT#116100 scenarios/invite_anonymous

* domain per scenario
* dynamic IP/port and numbers
* dynamic values at prefs.json

Change-Id: I3ffcb25839b8b2b3d933646bd29c0e797cc6917b
mr9.5.1
Victor Seva 5 years ago
parent 140a5af21e
commit efcb70e7b4

@ -23,10 +23,10 @@ flow:
$x_hdr(From): sip:anonymous@
$x_hdr(From): anonymous.invalid
$var(realm_user): testuser1002
$var(realm_domain): spce.test
$var(realm_domain): invite-anonymous.scenarios.test
sip_in:
- '^INVITE'
- 'P-Asserted-Identity: "long name here" <sip:testuser1002@spce.test>'
- 'P-Asserted-Identity: "long name here" <sip:testuser1002@invite-anonymous.scenarios.test>'
- 'From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag='
- 'Contact: sip:testuser1002@'
- 'To: <sip:testuser1003@'

@ -20,10 +20,10 @@ flow:
$x_hdr(From): sip:anonymous@
$x_hdr(From): anonymous.invalid
$var(realm_user): testuser1002
$var(realm_domain): spce.test
$var(realm_domain): invite-anonymous.scenarios.test
- return|ROUTE_AUTH_HELPER:
$avp(orig_acc_caller_user): ['testuser1002']
$avp(orig_acc_caller_domain): ['spce.test']
$avp(orig_acc_caller_domain): ['invite-anonymous.scenarios.test']
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
@ -66,10 +66,10 @@ flow:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
@ -103,29 +103,29 @@ flow:
$avp(lua_dlg_profile): [
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
'accountout:[% customer_test.id %]',
'userout:[% spce_test.testuser1002.uuid %]',
'userout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'account:[% customer_test.id %]',
'user:[% spce_test.testuser1002.uuid %]',
'user:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccountout:[% customer_test.id %]',
'totaluserout:[% spce_test.testuser1002.uuid %]',
'totaluserout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccount:[% customer_test.id %]',
'totaluser:[% spce_test.testuser1002.uuid %]',
'totaluser:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_ACC_CALLER:
- start|ROUTE_SET_ACC_CALLER_CALL_COUNTERS:
@ -186,19 +186,19 @@ flow:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
'accountout:[% customer_test.id %]',
'userout:[% spce_test.testuser1002.uuid %]',
'userout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'account:[% customer_test.id %]',
'user:[% spce_test.testuser1002.uuid %]',
'user:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccountout:[% customer_test.id %]',
'totaluserout:[% spce_test.testuser1002.uuid %]',
'totaluserout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccount:[% customer_test.id %]',
'totaluser:[% spce_test.testuser1002.uuid %]',
'totaluser:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
sip_in:
- '^INVITE'
@ -228,8 +228,8 @@ sip_out:
'From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=',
'To: <sip:testuser1003@',
'Content-Type: application/sdp',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]',
'P-Callee-UUID: [% spce_test.testuser1003.uuid %]',
'P-Caller-UUID: [% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'P-Callee-UUID: [% invite_anonymous_scenarios_test.testuser1003.uuid %]',
'_:NOT:_P-Asserted-Identity: \w+',
'P-Called-Party-ID: <sip:testuser1003@',
'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no',

@ -13,15 +13,15 @@ flow:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- 'INVITE sip:testuser1003@127.1.0.1:\d+ SIP/2.0'
- 'INVITE sip:testuser1003@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0'
- 'From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=[\w-]+'
- 'To: <sip:testuser1003@spce.test>'
- 'To: <sip:testuser1003@invite-anonymous.scenarios.test>'
- 'CSeq: \d+ INVITE'
- 'P-LB-Uptime: \d+'
- 'Privacy: id'
- 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]'
- 'P-NGCP-Caller-Info: <sip:anonymous@anonymous.invalid>;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-Caller-UUID: [% invite_anonymous_scenarios_test.testuser1002.uuid %]'
- 'P-NGCP-Caller-Info: <sip:anonymous@anonymous.invalid>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_anonymous_scenarios_test.testuser1002.phone_number %]'
- 'P-NGCP-Callee-Info: <sip:testuser1003@invite-anonymous.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_anonymous_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>'
@ -30,21 +30,21 @@ sip_out:
- [
'SIP/2.0 100 Trying',
'From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=[\w-]+',
'To: <sip:testuser1003@spce.test>',
'To: <sip:testuser1003@invite-anonymous.scenarios.test>',
'CSeq: \d+ INVITE',
'Server: Sipwise NGCP Proxy',
'Content-Length: 0',
]
- [
'INVITE sip:testuser1003@127.1.0.1:\d+ SIP/2.0',
'INVITE sip:testuser1003@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0',
'From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=[\w-]+',
'To: <sip:testuser1003@spce.test>',
'To: <sip:testuser1003@invite-anonymous.scenarios.test>',
'CSeq: \d+ INVITE',
'P-LB-Uptime: \d+',
'Privacy: id',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]',
'P-NGCP-Caller-Info: <sip:anonymous@anonymous.invalid>;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-Caller-UUID: [% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'P-NGCP-Caller-Info: <sip:anonymous@anonymous.invalid>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_anonymous_scenarios_test.testuser1002.phone_number %]',
'P-NGCP-Callee-Info: <sip:testuser1003@invite-anonymous.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_anonymous_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>',

@ -7,19 +7,19 @@ flow:
- return|ROUTE_APPLY_HEADER_RULES:
$avp(lua_dlg_profile): [
'accountout:[% customer_test.id %]',
'userout:[% spce_test.testuser1002.uuid %]',
'userout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'account:[% customer_test.id %]',
'user:[% spce_test.testuser1002.uuid %]',
'user:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccountout:[% customer_test.id %]',
'totaluserout:[% spce_test.testuser1002.uuid %]',
'totaluserout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccount:[% customer_test.id %]',
'totaluser:[% spce_test.testuser1002.uuid %]',
'totaluser:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:

@ -17,19 +17,19 @@ flow:
- return|dialog:start:
$avp(lua_dlg_profile): [
'accountout:[% customer_test.id %]',
'userout:[% spce_test.testuser1002.uuid %]',
'userout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'account:[% customer_test.id %]',
'user:[% spce_test.testuser1002.uuid %]',
'user:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccountout:[% customer_test.id %]',
'totaluserout:[% spce_test.testuser1002.uuid %]',
'totaluserout:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
'totalaccount:[% customer_test.id %]',
'totaluser:[% spce_test.testuser1002.uuid %]',
'totaluser:[% invite_anonymous_scenarios_test.testuser1002.uuid %]',
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_anonymous_scenarios_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_anonymous_scenarios_test.testuser1003.uuid %]"
]
- return|dialog:start:
sip_in:

@ -1,10 +1,10 @@
cdr:
- source_user: 'anonymous'
source_domain: 'spce.test'
source_cli: '4311002'
source_domain: 'invite-anonymous.scenarios.test'
source_cli: '[% invite_anonymous_scenarios_test.testuser1002.phone_number %]'
source_clir: '1'
destination_user: 'testuser1003'
destination_domain: 'spce.test'
destination_domain: 'invite-anonymous.scenarios.test'
destination_user_dialed: 'testuser1003'
call_type: 'call'
call_status: 'ok'

@ -1,5 +0,0 @@
{
"testuser1002@spce.test": {
"cli": 4311002
}
}

@ -0,0 +1,5 @@
{
"testuser1002@invite-anonymous.scenarios.test": {
"cli": 4311002
}
}

@ -1,6 +1,7 @@
---
test_uuid: invite_anonymous
domains:
'spce.test':
invite-anonymous.scenarios.test:
reseller_id: 1
customers:
'customer.test':
@ -13,7 +14,7 @@ customers:
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
invite-anonymous.scenarios.test:
testuser1003:
customer: 'customer.test'
password: testuser
@ -33,9 +34,9 @@ subscribers:
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
domain: invite-anonymous.scenarios.test
responders:
- ip: 127.1.0.1
username: testuser1003
domain: spce.test
register: yes
domain: invite-anonymous.scenarios.test
register: 'yes'

Loading…
Cancel
Save