TT#116100 scenarios/invite_hm_callforward

* domain per scenario
* dynamic IP/port and numbers

Change-Id: I8fc437a15eb1018a56669507bb9f221104062d83
mr9.5.1
Victor Seva 5 years ago committed by Víctor Seva
parent d850b667cc
commit e116cedbcd

@ -17,12 +17,12 @@ flow:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_AUTH_HELPER:
$x_hdr(From): spce.test
$x_hdr(From): invite-hm-callforward.scenarios.test
$var(realm_user): testuser1002
$var(realm_domain): spce.test
$var(realm_domain): invite-hm-callforward.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-hm-callforward.scenarios.test']
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
@ -65,10 +65,10 @@ flow:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
@ -113,18 +113,18 @@ flow:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_hm_callforward_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_hm_callforward_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_hm_callforward_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]"
]
- start|ROUTE_SET_ACC_CALLER_CALL_COUNTERS:
- return|ROUTE_SET_ACC_CALLER_CALL_COUNTERS:
@ -175,17 +175,17 @@ sip_out:
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]'
'P-Caller-UUID: [% invite_hm_callforward_scenarios_test.testuser1002.uuid %]'
]
- [
'^INVITE sip:4311003@',
'^INVITE sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@',
'Content-Type: application/sdp',
'P-Caller-UUID: [% spce_test.testuser1001.uuid %]',
'P-First-Caller-UPN: 4311002',
'P-First-Caller-NPN: 4311002',
'P-Caller-UUID: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]',
'P-First-Caller-UPN: [% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]',
'P-First-Caller-NPN: [% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]',
'P-Acc-Caller-User: testuser1001',
'P-Acc-State: cfu',
'P-From-Peer: 0',
@ -193,7 +193,7 @@ sip_out:
'P-App-Param: ;profile=ngcp_cf',
'P-App-Name: sbc',
'P-NGCP-Forward-Info: <sip:testuser1001@',
'P-NGCP-Callee-Info: <sip:4311003@',
'P-NGCP-Callee-Info: <sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@',
'Outbound: outbound header'
]

@ -58,9 +58,9 @@ flow:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
@ -95,9 +95,9 @@ flow:
$avp(lua_dlg_profile): [
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
@ -105,18 +105,18 @@ flow:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1001.uuid %]",
"userout:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]",
"user:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1001.uuid %]",
"totaluserout:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]"
]
- start|ROUTE_ACC_CALLER:
- start|ROUTE_SET_ACC_CALLER_CALL_COUNTERS:
@ -182,27 +182,27 @@ flow:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1001.uuid %]",
"userout:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]",
"user:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1001.uuid %]",
"totaluserout:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1001.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"totaluser:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
"user:[% invite_hm_callforward_scenarios_test.testuser1003.uuid %]"
]
sip_in:
- '^INVITE sip:4311003@'
- '^INVITE sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@'
- 'Contact: <sip:127.0.0.1:5080'
- 'CSeq: \d+ INVITE'
- 'Content-Type: application/sdp'
- 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]'
- 'P-First-Caller-UPN: 4311002'
- 'P-First-Caller-NPN: 4311002'
- 'P-Caller-UUID: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]'
- 'P-First-Caller-UPN: [% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]'
- 'P-First-Caller-NPN: [% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]'
- 'P-Acc-Caller-User: testuser1001'
- 'P-Acc-State: cfu'
- 'P-From-Peer: 0'
@ -217,15 +217,15 @@ sip_out:
- [
'^INVITE sip:testuser1003@',
'CSeq: \d+ INVITE',
'From: <sip:4311002@',
'From: <sip:[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]@',
'Contact: <sip:127.0.0.1:5080(;transport=udp)?>',
'To: <sip:testuser1001@',
'Content-Type: application/sdp',
'P-Callee-UUID: [% spce_test.testuser1003.uuid %]',
'P-Callee-UUID: [% invite_hm_callforward_scenarios_test.testuser1003.uuid %]',
'P-Asserted-Identity: <sip:11111111@',
'P-Called-Party-ID: <sip:testuser1003@',
'P-App-Name: sbc',
'P-NGCP-Caller-Info: <sip:testuser1001@',
'P-NGCP-Callee-Info: <sip:4311003@',
'P-NGCP-Callee-Info: <sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@',
'Inbound: inbound header'
]

@ -13,15 +13,15 @@ flow:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- 'INVITE sip:testuser1003@127.1.0.3:\d+ SIP/2.0'
- 'From: <sip:4311002@spce.test>;tag=[\w-]+'
- 'To: <sip:testuser1003@spce.test>'
- 'INVITE sip:testuser1003@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %] SIP/2.0'
- 'From: <sip:[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]@invite-hm-callforward.scenarios.test>;tag=[\w-]+'
- 'To: <sip:testuser1003@invite-hm-callforward.scenarios.test>'
- 'CSeq: \d+ INVITE'
- 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]'
- 'P-NGCP-Caller-Info: <sip:testuser1001@spce.test>;ip=127.0.0.1;port=508[08];primary=4311001'
- 'P-NGCP-Forward-Info: <sip:testuser1001@spce.test>;ip=127.0.0.1;port=508[08];primary=4311001'
- 'P-NGCP-Callee-Info: <sip:4311003@spce.test>;ip=127.0.0.1;port=5060;primary=4311003'
- 'P-Asserted-Identity: <sip:11111111@spce.test>'
- 'P-Caller-UUID: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]'
- 'P-NGCP-Caller-Info: <sip:testuser1001@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]'
- 'P-NGCP-Forward-Info: <sip:testuser1001@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]'
- 'P-NGCP-Callee-Info: <sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]'
- 'P-Asserted-Identity: <sip:11111111@invite-hm-callforward.scenarios.test>'
- 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060'
- 'Content-Type: application/sdp'
- 'Content-Length:\s+\d+'
@ -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_hm_callforward_scenarios_test.testuser1002.phone_number %]@invite-hm-callforward.scenarios.test>;tag=[\w-]+',
'To: <sip:testuser1003@invite-hm-callforward.scenarios.test>',
'CSeq: \d+ INVITE',
'Server: Sipwise NGCP Proxy',
'Content-Length: 0',
]
- [
'INVITE sip:testuser1003@127.1.0.3:\d+ SIP/2.0',
'From: <sip:4311002@spce.test>;tag=[\w-]+',
'To: <sip:testuser1003@spce.test>',
'INVITE sip:testuser1003@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %] SIP/2.0',
'From: <sip:[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]@invite-hm-callforward.scenarios.test>;tag=[\w-]+',
'To: <sip:testuser1003@invite-hm-callforward.scenarios.test>',
'CSeq: \d+ INVITE',
'P-Caller-UUID: [% spce_test.testuser1001.uuid %]',
'P-NGCP-Caller-Info: <sip:testuser1001@spce.test>;ip=127.0.0.1;port=508[08];primary=4311001',
'P-NGCP-Forward-Info: <sip:testuser1001@spce.test>;ip=127.0.0.1;port=508[08];primary=4311001',
'P-NGCP-Callee-Info: <sip:4311003@spce.test>;ip=127.0.0.1;port=5060;primary=4311003',
'P-Asserted-Identity: <sip:11111111@spce.test>',
'P-Caller-UUID: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]',
'P-NGCP-Caller-Info: <sip:testuser1001@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]',
'P-NGCP-Forward-Info: <sip:testuser1001@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]',
'P-NGCP-Callee-Info: <sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@invite-hm-callforward.scenarios.test>;ip=127.0.0.1;port=5060;primary=[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]',
'P-Asserted-Identity: <sip:11111111@invite-hm-callforward.scenarios.test>',
'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060',
'Content-Type: application/sdp',
'Content-Length:\s+\d+',

@ -46,6 +46,6 @@ sip_out:
'CSeq: \d+ BYE',
'Max-Forwards: 69',
'Content-Length: 0',
'From: <sip:4311002@',
'From: <sip:[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]@',
'To: <sip:testuser1001@'
]

@ -16,7 +16,7 @@ sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: \d+ BYE'
- 'Content-Length: 0'
- 'From: <sip:4311002@'
- 'From: <sip:[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]@'
- 'To: <sip:testuser1001@'
sip_out:
- [

@ -1,8 +1,8 @@
---
testuser1001@spce.test:
testuser1001@invite-hm-callforward.scenarios.test:
destinations:
destinations:
- destination: sip:4311003@spce.test
- destination: sip:[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]@invite-hm-callforward.scenarios.test
priority: 0
timeout: 10
name: dest1001

@ -1,19 +1,19 @@
cdr:
- source_user: 'testuser1002'
source_domain: 'spce.test'
source_cli: '4311002'
source_domain: 'invite-hm-callforward.scenarios.test'
source_cli: '[% invite_hm_callforward_scenarios_test.testuser1002.phone_number %]'
destination_user: 'testuser1001'
destination_domain: 'spce.test'
destination_domain: 'invite-hm-callforward.scenarios.test'
destination_user_dialed: 'testuser1001'
call_type: 'call'
call_status: 'ok'
call_code: '200'
- source_user: 'testuser1001'
source_domain: 'spce.test'
source_cli: '4311001'
source_domain: 'invite-hm-callforward.scenarios.test'
source_cli: '[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]'
destination_user: 'testuser1003'
destination_domain: 'spce.test'
destination_user_dialed: '4311003'
destination_domain: 'invite-hm-callforward.scenarios.test'
destination_user_dialed: '[% invite_hm_callforward_scenarios_test.testuser1003.phone_number %]'
call_type: 'cfu'
call_status: 'ok'
call_code: '200'

@ -1,9 +1,10 @@
hm_00:
---
hm_invite_hm_cf_00:
header_rules:
- data:
direction: inbound
description: Empty Manipulation
name: hm_00_00
name: hm_invite_hm_cf_00_00
stopper: 0
enabled: 0
priority: 48
@ -12,7 +13,7 @@ hm_00:
- data:
direction: inbound
description: Add TestTest Header
name: hm_00_01
name: hm_invite_hm_cf_00_01
stopper: 0
enabled: 1
priority: 50
@ -26,7 +27,7 @@ hm_00:
value_type: input
values:
- value: testuser1001
rwr_set_id:
rwr_set_id:
- enabled: 1
match_name: To
match_part: full
@ -36,7 +37,7 @@ hm_00:
value_type: input
values:
- value: '.*'
rwr_set_id:
rwr_set_id:
actions:
- enabled: 1
action_type: preference
@ -44,11 +45,11 @@ hm_00:
header_part: full
value: language
value_part: full
rwr_set_id:
rwr_set_id:
- data:
direction: peer
description: Edit TestTest Peer Header
name: hm_00_03
name: hm_invite_hm_cf_00_03
stopper: 0
enabled: 1
priority: 52
@ -62,21 +63,21 @@ hm_00:
value_type: input
values:
- value: '^new[\w]+$'
rwr_set_id:
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: TestTest
header_part: full
value:
value:
value_part: full
rwr_set_id:
hm_01:
rwr_set_id:
hm_invite_hm_cf_01:
header_rules:
- data:
direction: outbound
description: Add header as AVP
name: hm_01_00
name: hm_invite_hm_cf_01_00
stopper: 1
enabled: 1
priority: 60
@ -89,8 +90,8 @@ hm_01:
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
- value: '<sip:testuser1001@invite-hm-callforward.scenarios.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: set
@ -98,11 +99,11 @@ hm_01:
header_part: username
value: 11111111
value_part: full
rwr_set_id:
rwr_set_id:
- data:
direction: outbound
description: Should not be executed
name: hm_01_01
name: hm_invite_hm_cf_01_01
stopper: 0
enabled: 1
priority: 61
@ -116,28 +117,28 @@ hm_01:
value_type: input
values:
- value: '.*'
rwr_set_id:
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: From
header_part: full
value:
value:
value_part: full
rwr_set_id:
rwr_set_id:
- enabled: 1
action_type: remove
header: To
header_part: full
value:
value:
value_part: full
rwr_set_id:
hm_02:
rwr_set_id:
hm_invite_hm_cf_02:
header_rules:
- data:
direction: cf_outbound
description: CF Outbound
name: hm_02_00
name: hm_invite_hm_cf_02_00
stopper: 0
enabled: 1
priority: 70
@ -150,8 +151,8 @@ hm_02:
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
- value: '<sip:testuser1001@invite-hm-callforward.scenarios.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: add
@ -159,11 +160,11 @@ hm_02:
header_part: full
value: outbound header
value_part: full
rwr_set_id:
rwr_set_id:
- data:
direction: cf_inbound
description: CF Inbound
name: hm_02_01
name: hm_invite_hm_cf_02_01
stopper: 0
enabled: 1
priority: 71
@ -176,8 +177,8 @@ hm_02:
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
- value: '<sip:testuser1001@invite-hm-callforward.scenarios.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: add
@ -185,4 +186,4 @@ hm_02:
header_part: full
value: inbound header
value_part: full
rwr_set_id:
rwr_set_id:

@ -1,11 +0,0 @@
{
"testuser1002@spce.test": {
"header_rule_set": "hm_00"
},
"testuser1003@spce.test": {
"header_rule_set": "hm_01"
},
"testuser1001@spce.test": {
"header_rule_set": "hm_02"
}
}

@ -0,0 +1,11 @@
{
"testuser1002@invite-hm-callforward.scenarios.test": {
"header_rule_set": "hm_invite_hm_cf_00"
},
"testuser1003@invite-hm-callforward.scenarios.test": {
"header_rule_set": "hm_invite_hm_cf_01"
},
"testuser1001@invite-hm-callforward.scenarios.test": {
"header_rule_set": "hm_invite_hm_cf_02"
}
}

@ -1,6 +1,7 @@
---
test_uuid: invite_hm_callforward
domains:
'spce.test':
invite-hm-callforward.scenarios.test:
reseller_id: 1
customers:
'customer.test':
@ -13,7 +14,7 @@ customers:
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
invite-hm-callforward.scenarios.test:
testuser1001:
customer: 'customer.test'
password: testuser
@ -35,14 +36,14 @@ subscribers:
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
domain: invite-hm-callforward.scenarios.test
responders:
- ip: 127.1.0.1
username: testuser1001
domain: spce.test
register: no
active: no
domain: invite-hm-callforward.scenarios.test
register: 'no'
active: 'no'
- ip: 127.1.0.3
username: testuser1003
domain: spce.test
register: yes
domain: invite-hm-callforward.scenarios.test
register: 'yes'

Loading…
Cancel
Save