TT#116100 scenarios/invite_foreign_dom

* domain per scenario
* dynamic IP/port and numbers

Change-Id: I7f271b1ff1d21442266f6f6c977210aafa8c9edd
mr9.5.1
Victor Seva 5 years ago
parent 1317662f7d
commit 89273cc500

@ -21,9 +21,9 @@ flow:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE sip:004321001@'
- 'Contact: sip:testuser1002@'
- 'To: <sip:004321001@'
- '^INVITE sip:[% scenarios.0.responders.0.username %]@'
- '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:004321001@'
'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:004321001@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]

@ -17,12 +17,12 @@ flow:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_AUTH_HELPER:
$x_hdr(From): spce.test
$var(realm_user): testuser1002
$var(realm_domain): spce.test
$x_hdr(From): invite-foreign-dom.scenarios.test
$var(realm_user): [% scenarios.0.username %]
$var(realm_domain): invite-foreign-dom.scenarios.test
- return|ROUTE_AUTH_HELPER:
$avp(orig_acc_caller_user): ['testuser1002']
$avp(orig_acc_caller_domain): ['spce.test']
$avp(orig_acc_caller_user): ['[% scenarios.0.username %]']
$avp(orig_acc_caller_domain): ['invite-foreign-dom.scenarios.test']
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
@ -81,13 +81,13 @@ flow:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"total",
"outgoing"
]
@ -149,44 +149,44 @@ flow:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"userout:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"user:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totaluserout:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totaluser:[% invite_foreign_dom_scenarios_test.testuser1002.uuid %]",
"total",
"outgoing"
]
sip_in:
- '^INVITE sip:004321001@'
- 'Contact: sip:testuser1002@'
- '^INVITE sip:[% scenarios.0.responders.0.username %]@'
- '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:004321001@'
'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:004321001@'
'From: <sip:[% scenarios.0.username %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@'
]
- [
'^INVITE sip:004321001@',
'^INVITE sip:[% scenarios.0.responders.0.username %]@',
'CSeq: 2 INVITE',
'From: <sip:4311002@',
'To: <sip:004321001@',
'From: <sip:[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]@',
'To: <sip:[% scenarios.0.responders.0.username %]@',
'Content-Type: application/sdp',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]',
'P-Caller-UUID: [% invite_foreign_dom_scenarios_test.testuser1002.uuid %]',
'P-Callee-UUID: 0',
'P-Called-Party-ID: <sip:004321001@',
'P-Called-Party-ID: <sip:[% scenarios.0.responders.0.username %]@',
'P-App-Name: sbc'
]

@ -13,15 +13,14 @@ flow:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- 'INVITE sip:004321001@external.test SIP/2.0'
- 'From: <sip:4311002@spce.test>;tag=[\w-]+'
- 'To: <sip:004321001@external.test>'
- 'INVITE sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test SIP/2.0'
- 'From: <sip:[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]@invite-foreign-dom.scenarios.test>;tag=[\w-]+'
- 'To: <sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test>'
- 'CSeq: \d+ INVITE'
- 'P-LB-Uptime: \d+'
- '_:NOT:_P-Asserted-Identity:'
- '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:004321001@external.test>;ip=127.0.0.1;port=5060'
- 'P-Caller-UUID: [% invite_foreign_dom_scenarios_test.testuser1002.uuid %]'
- 'P-NGCP-Caller-Info: <sip:[% scenarios.0.username %]@invite-foreign-dom.scenarios.test>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]'
- 'P-NGCP-Callee-Info: <sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test>;ip=127.0.0.1;port=5060'
- 'P-D-Uri: sip:127.0.0.1:5060'
- 'Content-Type: application/sdp'
- 'Contact: <sip:127.0.0.1:508[08];transport=udp>'
@ -29,22 +28,21 @@ sip_in:
sip_out:
- [
'SIP/2.0 100 Trying',
'From: <sip:4311002@spce.test>;tag=[\w-]+',
'To: <sip:004321001@external.test>',
'From: <sip:[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]@invite-foreign-dom.scenarios.test>;tag=[\w-]+',
'To: <sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test>',
'CSeq: \d+ INVITE',
'Server: Sipwise NGCP Proxy',
'Content-Length: 0',
]
- [
'INVITE sip:004321001@external.test SIP/2.0',
'From: <sip:4311002@spce.test>;tag=[\w-]+',
'To: <sip:004321001@external.test>',
'INVITE sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test SIP/2.0',
'From: <sip:[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]@invite-foreign-dom.scenarios.test>;tag=[\w-]+',
'To: <sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test>',
'CSeq: \d+ INVITE',
'P-LB-Uptime: \d+',
'_:NOT:_P-Asserted-Identity:',
'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:004321001@external.test>;ip=127.0.0.1;port=5060',
'P-Caller-UUID: [% invite_foreign_dom_scenarios_test.testuser1002.uuid %]',
'P-NGCP-Caller-Info: <sip:[% scenarios.0.username %]@invite-foreign-dom.scenarios.test>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]',
'P-NGCP-Callee-Info: <sip:[% scenarios.0.responders.0.username %]@invite-foreign-dom.external.test>;ip=127.0.0.1;port=5060',
'P-D-Uri: sip:127.0.0.1:5060',
'Content-Type: application/sdp',
'Contact: <sip:127.0.0.1:508[08];transport=udp>',

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

@ -25,20 +25,20 @@ flow:
- exit|ROUTE_EXIT:
sip_in:
- '^ACK sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'Contact: sip:[% scenarios.0.username %]@'
- 'CSeq: 2 ACK'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:004321001@'
- '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',
'Contact: sip:testuser1002@',
'Contact: sip:[% scenarios.0.username %]@',
'CSeq: 2 ACK',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:004321001@'
'From: <sip:[% invite_foreign_dom_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:004321001@'
- '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:004321001@'
'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:004321001@'
'From: <sip:[% invite_foreign_dom_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:004321001@'
- 'From: <sip:[% invite_foreign_dom_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:004321001@'
'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: '004321001'
destination_domain: 'external.test'
destination_user_dialed: '004321001'
- source_user: '[% scenarios.0.username %]'
source_domain: 'invite-foreign-dom.scenarios.test'
source_cli: '[% invite_foreign_dom_scenarios_test.testuser1002.phone_number %]'
destination_user: '[% scenarios.0.responders.0.username %]'
destination_domain: 'invite-foreign-dom.external.test'
destination_user_dialed: '[% scenarios.0.responders.0.username %]'
call_type: 'call'
call_status: 'ok'
call_code: '200'

@ -1,5 +1,5 @@
{
"@spce.test": {
"@invite-foreign-dom.scenarios.test": {
"allow_out_foreign_domain": true
}
}

@ -1,6 +1,7 @@
---
test_uuid: invite_foreign_dom
domains:
'spce.test':
invite-foreign-dom.scenarios.test:
reseller_id: 1
customers:
'customer.test':
@ -13,7 +14,7 @@ customers:
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
invite-foreign-dom.scenarios.test:
testuser1002:
customer: 'customer.test'
password: testuser
@ -23,10 +24,10 @@ subscribers:
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
domain: invite-foreign-dom.scenarios.test
responders:
- ip: 127.0.2.1
username: 004321001
domain: external.test
foreign: yes
register: no
domain: invite-foreign-dom.external.test
foreign: 'yes'
register: 'no'

Loading…
Cancel
Save