diff --git a/scenarios/lock_ported/0003_test.yml.tt2 b/scenarios/lock_ported/0003_test.yml.tt2 index ba2f38e2..aab6ff9c 100644 --- a/scenarios/lock_ported/0003_test.yml.tt2 +++ b/scenarios/lock_ported/0003_test.yml.tt2 @@ -21,9 +21,9 @@ flow: - return|ROUTE_RUNTIME: - exit|ROUTE_EXIT: sip_in: - - '^INVITE sip:testuser1001@' - - 'Contact: sip:testuser1002@' - - 'To: ', - 'To: ;tag=[\w-]+' - - 'To: ' + - 'INVITE sip:[% scenarios.0.responders.1.username %]@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %] SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ' - 'CSeq: \d+ INVITE' - - 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]' - - 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=4311001' - - 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=4311001' - - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=4311003' - - 'P-Asserted-Identity: ' + - 'P-Caller-UUID: [% lock_ported_scenarios_test.testuser1001.uuid %]' + - 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=[% lock_ported_scenarios_test.testuser1001.phone_number %]' + - 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=[% lock_ported_scenarios_test.testuser1001.phone_number %]' + - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% lock_ported_scenarios_test.testuser1003.phone_number %]' + - 'P-Asserted-Identity: ' - 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060' - 'Content-Type: application/sdp' - 'Contact: ' @@ -29,22 +29,22 @@ sip_in: sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', - 'To: ', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'INVITE sip:testuser1003@127.1.0.3:\d+ SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ', + 'INVITE sip:[% scenarios.0.responders.1.username %]@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %] SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', - 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]', - 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=4311001', - 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=4311001', - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=4311003', - 'P-Asserted-Identity: ', + 'P-Caller-UUID: [% lock_ported_scenarios_test.testuser1001.uuid %]', + 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=[% lock_ported_scenarios_test.testuser1001.phone_number %]', + 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=[% lock_ported_scenarios_test.testuser1001.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% lock_ported_scenarios_test.testuser1003.phone_number %]', + 'P-Asserted-Identity: ', 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060', 'Content-Type: application/sdp', 'Contact: ', diff --git a/scenarios/lock_ported/0017_test.yml.tt2 b/scenarios/lock_ported/0017_test.yml.tt2 index 454122d2..1e536929 100644 --- a/scenarios/lock_ported/0017_test.yml.tt2 +++ b/scenarios/lock_ported/0017_test.yml.tt2 @@ -21,20 +21,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: ;tag=' - - 'To: ;tag=' + - 'ACK sip:[% scenarios.1.responders.0.username %]@' + - 'From: ;tag=' + - 'To: ;tag=' - 'CSeq: 2 ACK' - 'Max-Forwards: 69' - 'Content-Length: 0' diff --git a/scenarios/lock_ported/callforward.yml b/scenarios/lock_ported/callforward.yml.tt2 similarity index 56% rename from scenarios/lock_ported/callforward.yml rename to scenarios/lock_ported/callforward.yml.tt2 index 8142cba9..ced62be9 100644 --- a/scenarios/lock_ported/callforward.yml +++ b/scenarios/lock_ported/callforward.yml.tt2 @@ -1,11 +1,11 @@ --- -testuser1001@spce.test: +[% scenarios.0.responders.0.username %]@lock-ported.scenarios.test: destinations: destinations: - - destination: sip:4311003@spce.test + - destination: sip:[% lock_ported_scenarios_test.testuser1003.phone_number %]@lock-ported.scenarios.test priority: 0 timeout: 5 - - destination: sip:testuser1003@spce.test + - destination: sip:[% scenarios.0.responders.1.username %]@lock-ported.scenarios.test priority: 1 timeout: 5 name: dest1001 diff --git a/scenarios/lock_ported/cdr_test.yml.tt2 b/scenarios/lock_ported/cdr_test.yml.tt2 index e6390827..cc7d9d61 100644 --- a/scenarios/lock_ported/cdr_test.yml.tt2 +++ b/scenarios/lock_ported/cdr_test.yml.tt2 @@ -1,29 +1,29 @@ cdr: - - source_user: 'testuser1001' - source_domain: 'spce.test' - source_cli: '4311001' - destination_user: 'testuser1004' - destination_domain: 'spce.test' - destination_user_dialed: 'testuser1004' + - source_user: '[% scenarios.1.username %]' + source_domain: 'lock-ported.scenarios.test' + source_cli: '[% lock_ported_scenarios_test.testuser1001.phone_number %]' + destination_user: '[% scenarios.1.responders.1.username %]' + destination_domain: 'lock-ported.scenarios.test' + destination_user_dialed: '[% scenarios.1.responders.1.username %]' call_type: 'call' call_status: 'other' call_code: '403' duration: '0' - - source_user: 'testuser1002' - source_domain: 'spce.test' - source_cli: '4311002' - destination_user: 'testuser1001' - destination_domain: 'spce.test' - destination_user_dialed: 'testuser1001' + - source_user: '[% scenarios.0.username %]' + source_domain: 'lock-ported.scenarios.test' + source_cli: '[% lock_ported_scenarios_test.testuser1002.phone_number %]' + destination_user: '[% scenarios.0.responders.0.username %]' + destination_domain: 'lock-ported.scenarios.test' + destination_user_dialed: '[% scenarios.0.responders.0.username %]' call_type: 'call' call_status: 'ok' call_code: '200' - - source_user: 'testuser1001' - source_domain: 'spce.test' - source_cli: '4311001' - destination_user: 'testuser1003' - destination_domain: 'spce.test' - destination_user_dialed: '4311003' + - source_user: '[% scenarios.0.responders.0.username %]' + source_domain: 'lock-ported.scenarios.test' + source_cli: '[% lock_ported_scenarios_test.testuser1001.phone_number %]' + destination_user: '[% scenarios.0.responders.1.username %]' + destination_domain: 'lock-ported.scenarios.test' + destination_user_dialed: '[% register_allowip_scenarios_test.testuser1003.phone_number %]' call_type: 'cfu' call_status: 'ok' call_code: '200' diff --git a/scenarios/lock_ported/peer.yml b/scenarios/lock_ported/peer.yml new file mode 100644 index 00000000..58f3e344 --- /dev/null +++ b/scenarios/lock_ported/peer.yml @@ -0,0 +1,27 @@ +--- +peerlock_ported: + contact: + company: peerlock_ported + email: peerlock_ported@host0.not + contract: + billing_profile_id: 1 + status: active + type: sippeering + groups: + - name: peerlock_ported_group + priority: 1 + description: + rules: + - group_id: peerlock_ported_group + callee_prefix: "" + callee_pattern: '' + caller_pattern: '^sip:.+@lock-ported.scenarios.test' + description: "" + hosts: + - group_id: peerlock_ported_group + name: peerlock_ported_host0 + ip: 127.0.2.1 + port: 51602 + host: + transport: 1 + weight: 1 diff --git a/scenarios/lock_ported/prefs.json b/scenarios/lock_ported/prefs.json deleted file mode 100644 index 1c003a6a..00000000 --- a/scenarios/lock_ported/prefs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "testuser1001@spce.test": { - "lock": 5 - } -} diff --git a/scenarios/lock_ported/prefs.json.tt2 b/scenarios/lock_ported/prefs.json.tt2 new file mode 100644 index 00000000..ab47274b --- /dev/null +++ b/scenarios/lock_ported/prefs.json.tt2 @@ -0,0 +1,5 @@ +{ + "testuser1001@lock-ported.scenarios.test": { + "lock": 5 + } +} diff --git a/scenarios/lock_ported/scenario.yml b/scenarios/lock_ported/scenario.yml index 7553558a..3c5ab27c 100644 --- a/scenarios/lock_ported/scenario.yml +++ b/scenarios/lock_ported/scenario.yml @@ -1,6 +1,7 @@ +--- test_uuid: lock_ported domains: - 'spce.test': + lock-ported.scenarios.test: reseller_id: 1 customers: 'customer.test': @@ -13,7 +14,7 @@ customers: billing_profile_id: 1 reseller_id: 1 subscribers: - spce.test: + lock-ported.scenarios.test: testuser1003: customer: 'customer.test' password: testuser @@ -41,34 +42,34 @@ subscribers: scenarios: - ip: 127.126.0.1 username: testuser1002 - domain: spce.test + domain: lock-ported.scenarios.test responders: - ip: 127.1.0.1 username: testuser1001 - domain: spce.test - register: no - active: no + domain: lock-ported.scenarios.test + register: 'no' + active: 'no' - ip: 127.1.0.3 username: testuser1003 - domain: spce.test - register: yes + domain: lock-ported.scenarios.test + register: 'yes' - ip: 127.126.0.1 username: testuser1001 - domain: spce.test + domain: lock-ported.scenarios.test responders: - ip: 127.1.0.4 username: testuser1004 - domain: spce.test - register: no - active: no + domain: lock-ported.scenarios.test + register: 'no' + active: 'no' - ip: 127.126.0.4 username: testuser1004 - domain: spce.test + domain: lock-ported.scenarios.test responders: - ip: 127.0.2.1 number: 004321003 username: 004321003 - domain: spce.test - peer_host: peer_00_host0 - register: no - active: no + domain: lock-ported.scenarios.test + peer_host: peerlock_ported_host0 + register: 'no' + active: 'no'