From 1317662f7d7c7dc25ffc9f5ff9bce9f894c9b80b Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 20 Apr 2021 12:36:17 +0200 Subject: [PATCH] TT#116100 scenarios/invite_force_outbound_calls_to_peer * domain per scenario * dynamic IP/port and numbers Change-Id: I62c1f7d9c35d49334996298deb2fdd2b7fa8d7e9 --- .../0003_test.yml.tt2 | 54 +++++++++---------- .../0005_test.yml.tt2 | 36 ++++++------- .../0009_test.yml.tt2 | 20 +++---- .../0010_test.yml.tt2 | 8 +-- .../peer.yml | 16 +++--- .../prefs.json | 5 -- .../prefs.json.tt2 | 5 ++ .../scenario.yml | 17 +++--- 8 files changed, 81 insertions(+), 80 deletions(-) delete mode 100644 scenarios/invite_force_outbound_calls_to_peer/prefs.json create mode 100644 scenarios/invite_force_outbound_calls_to_peer/prefs.json.tt2 diff --git a/scenarios/invite_force_outbound_calls_to_peer/0003_test.yml.tt2 b/scenarios/invite_force_outbound_calls_to_peer/0003_test.yml.tt2 index 6b7ffcad..bc0c8baa 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/0003_test.yml.tt2 +++ b/scenarios/invite_force_outbound_calls_to_peer/0003_test.yml.tt2 @@ -155,16 +155,16 @@ flow: - return|ROUTE_RUNTIME: - exit|ROUTE_EXIT: sip_in: - - 'INVITE sip:testuser1003@spce.test SIP/2.0' - - 'From: ;tag=[\w-]+' - - 'To: ' + - 'INVITE sip:testuser1003@invite-force-outbound-calls-to-peer.scenarios.test SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ' - 'CSeq: \d+ INVITE' - - 'Contact: sip:testuser1002@127.126.0.1:\d+' - - 'Proxy-Authorization: Digest username="testuser1002",realm="spce.test",uri="sip:127.0.0.1:5060",nonce=".+",response=".+",algorithm=MD5' + - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]' + - 'Proxy-Authorization: Digest username="testuser1002",realm="invite-force-outbound-calls-to-peer.scenarios.test",uri="sip:127.0.0.1:5060",nonce=".+",response=".+",algorithm=MD5' - 'Content-Type: application/sdp' - 'Content-Length:\s+\d+' - - 'P-NGCP-Src-Ip: 127.126.0.1' - - 'P-NGCP-Src-Port: \d+' + - 'P-NGCP-Src-Ip: [% scenarios.0.ip %]' + - 'P-NGCP-Src-Port: [% scenarios.0.port %]' - 'P-NGCP-Src-Proto: udp' - 'P-NGCP-Src-Af: 4' - 'P-Sock-Info: udp:127.0.0.1:5060' @@ -172,47 +172,47 @@ sip_in: sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', - 'To: ', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', 'P-Out-Socket: udp:127.0.0.1:5060', - 'P-NGCP-Auth-IP: 127.126.0.1', + 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ 'SIP/2.0 101 Connecting', - 'From: ;tag=[\w-]+', - 'To: ', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', 'P-Out-Socket: udp:127.0.0.1:5060', - 'P-NGCP-Auth-IP: 127.126.0.1', + 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', - 'P-NGCP-Authorization: testuser1002@spce.test', + 'P-NGCP-Authorization: testuser1002@invite-force-outbound-calls-to-peer.scenarios.test', 'P-NGCP-Authorized: 1', - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311002', - 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.phone_number %]', + 'P-Caller-UUID: [% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.uuid %]', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'INVITE sip:testuser1003@127.0.2.1:\d+;transport=udp SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ', + 'INVITE sip:testuser1003@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %];transport=udp SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', - 'Contact: sip:testuser1002@127.126.0.1:\d+', + 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]', 'Content-Type: application/sdp', 'Content-Length:\s+\d+', 'P-LB-Uptime: \d+', - 'P-Asserted-Identity: ', - 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]', - 'P-Callee-UUID: [% spce_test.testuser1003.uuid %]', - 'P-Called-Party-ID: ', + 'P-Asserted-Identity: ', + 'P-Caller-UUID: [% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.uuid %]', + 'P-Callee-UUID: [% invite_force_outbound_calls_to_peer_scenarios_test.testuser1003.uuid %]', + 'P-Called-Party-ID: ', 'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no;hold_alter_b2b_bleg=no;hold_alter_b2b_aleg=no;(fast_ack=no;)?a_park_domain=[% customer_test.id %];b_park_domain=[% customer_test.id %]', 'P-App-Name: sbc', - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311002', - 'P-NGCP-Callee-Info: ;ip=127.0.2.1;port=\d+;primary=4311003', - 'P-D-Uri: sip:127.0.0.1:5060;received=sip:127.0.2.1:\d+%3blr%3btransport%3dudp', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.1.ip %];port=[% scenarios.0.responders.1.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1003.phone_number %]', + 'P-D-Uri: sip:127.0.0.1:5060;received=sip:[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %]%3blr%3btransport%3dudp', 'P-Proxy-Uri: sip:127.0.0.1:5062', ] diff --git a/scenarios/invite_force_outbound_calls_to_peer/0005_test.yml.tt2 b/scenarios/invite_force_outbound_calls_to_peer/0005_test.yml.tt2 index 602821e1..2190a85d 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/0005_test.yml.tt2 +++ b/scenarios/invite_force_outbound_calls_to_peer/0005_test.yml.tt2 @@ -13,39 +13,39 @@ flow: - return|ROUTE_RUNTIME: - exit|ROUTE_EXIT: sip_in: - - 'INVITE sip:testuser1003@127.0.2.1:\d+;transport=udp SIP/2.0' - - 'From: ;tag=[\w-]+' - - 'To: ' + - 'INVITE sip:testuser1003@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %];transport=udp SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ' - 'CSeq: \d+ INVITE' - 'P-LB-Uptime: \d+' - - 'P-Asserted-Identity: ' - - 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]' - - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311002' - - 'P-NGCP-Callee-Info: ;ip=127.0.2.1;port=\d+;primary=4311003' - - 'P-D-Uri: sip:127.0.0.1:5060;received=sip:127.0.2.1:\d+%3blr%3btransport%3dudp' + - 'P-Asserted-Identity: ' + - 'P-Caller-UUID: [% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.uuid %]' + - 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.phone_number %]' + - 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.1.ip %];port=[% scenarios.0.responders.1.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1003.phone_number %]' + - 'P-D-Uri: sip:127.0.0.1:5060;received=sip:[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %]%3blr%3btransport%3dudp' - 'Content-Type: application/sdp' - 'Contact: ' - 'Content-Length:\s+\d+' 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.0.2.1:\d+;transport=udp SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ', + 'INVITE sip:testuser1003@[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %];transport=udp SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', 'P-LB-Uptime: \d+', - 'P-Asserted-Identity: ', - 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]', - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311002', - 'P-NGCP-Callee-Info: ;ip=127.0.2.1;port=\d+;primary=4311003', - 'P-D-Uri: sip:127.0.0.1:5060;received=sip:127.0.2.1:\d+%3blr%3btransport%3dudp', + 'P-Asserted-Identity: ', + 'P-Caller-UUID: [% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.uuid %]', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1002.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.1.ip %];port=[% scenarios.0.responders.1.port %];primary=[% invite_force_outbound_calls_to_peer_scenarios_test.testuser1003.phone_number %]', + 'P-D-Uri: sip:127.0.0.1:5060;received=sip:[% scenarios.0.responders.1.ip %]:[% scenarios.0.responders.1.port %]%3blr%3btransport%3dudp', 'Content-Type: application/sdp', 'Contact: ', 'Content-Length:\s+\d+', diff --git a/scenarios/invite_force_outbound_calls_to_peer/0009_test.yml.tt2 b/scenarios/invite_force_outbound_calls_to_peer/0009_test.yml.tt2 index 06672871..0558cf9f 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/0009_test.yml.tt2 +++ b/scenarios/invite_force_outbound_calls_to_peer/0009_test.yml.tt2 @@ -11,27 +11,27 @@ flow: - return|dialog:start: sip_in: - 'SIP/2.0 200 OK' - - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ INVITE' - - 'Contact: ' + - 'Contact: ' - 'Content-Type: application/sdp' - 'Content-Length:\s+\d+' - - 'P-NGCP-Src-Ip: 127.0.2.1' - - 'P-NGCP-Src-Port: \d+' + - 'P-NGCP-Src-Ip: [% scenarios.0.responders.1.ip %]' + - 'P-NGCP-Src-Port: [% scenarios.0.responders.1.port %]' - 'P-NGCP-Src-Proto: udp' - 'P-NGCP-Src-Af: 4' sip_out: - [ 'SIP/2.0 200 OK', - 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', - 'Contact: ', + 'Contact: ', 'Content-Type: application/sdp', 'Content-Length:\s+\d+', - 'P-NGCP-Src-Ip: 127.0.2.1', - 'P-NGCP-Src-Port: \d+', + 'P-NGCP-Src-Ip: [% scenarios.0.responders.1.ip %]', + 'P-NGCP-Src-Port: [% scenarios.0.responders.1.port %]', 'P-NGCP-Src-Proto: udp', 'P-NGCP-Src-Af: 4', ] diff --git a/scenarios/invite_force_outbound_calls_to_peer/0010_test.yml.tt2 b/scenarios/invite_force_outbound_calls_to_peer/0010_test.yml.tt2 index 5829e215..b3c74856 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/0010_test.yml.tt2 +++ b/scenarios/invite_force_outbound_calls_to_peer/0010_test.yml.tt2 @@ -18,8 +18,8 @@ flow: - return|dialog:start: sip_in: - 'SIP/2.0 200 OK' - - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ INVITE' - 'Contact: ' - 'Content-Type: application/sdp' @@ -27,8 +27,8 @@ sip_in: sip_out: - [ 'SIP/2.0 200 OK', - 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', 'Contact: ', 'Content-Type: application/sdp', diff --git a/scenarios/invite_force_outbound_calls_to_peer/peer.yml b/scenarios/invite_force_outbound_calls_to_peer/peer.yml index 4a462cc2..87807a64 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/peer.yml +++ b/scenarios/invite_force_outbound_calls_to_peer/peer.yml @@ -1,25 +1,25 @@ --- -peer_00: +peer_invite_force_outbound_calls_to_peer: contact: - company: peer_00 - email: peer_00@host0.not + company: peer_invite_force_outbound_calls_to_peer + email: peer_invite_force_outbound_calls_to_peer@host0.not contract: billing_profile_id: 1 status: active type: sippeering groups: - - name: peer_00_group + - name: peer_invite_force_outbound_calls_to_peer_group priority: 1 description: rules: - - group_id: peer_00_group + - group_id: peer_invite_force_outbound_calls_to_peer_group callee_prefix: "" callee_pattern: '' - caller_pattern: '^sip:.+@spce.test' + caller_pattern: '^sip:.+@invite-force-outbound-calls-to-peer.scenarios.test' description: "" hosts: - - group_id: peer_00_group - name: peer_00_host0 + - group_id: peer_invite_force_outbound_calls_to_peer_group + name: peer_invite_force_outbound_calls_to_peer_host0 ip: 127.0.2.1 port: 51602 host: diff --git a/scenarios/invite_force_outbound_calls_to_peer/prefs.json b/scenarios/invite_force_outbound_calls_to_peer/prefs.json deleted file mode 100644 index f7be7cc9..00000000 --- a/scenarios/invite_force_outbound_calls_to_peer/prefs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "testuser1002@spce.test": { - "force_outbound_calls_to_peer":"force" - } -} diff --git a/scenarios/invite_force_outbound_calls_to_peer/prefs.json.tt2 b/scenarios/invite_force_outbound_calls_to_peer/prefs.json.tt2 new file mode 100644 index 00000000..69b24ce7 --- /dev/null +++ b/scenarios/invite_force_outbound_calls_to_peer/prefs.json.tt2 @@ -0,0 +1,5 @@ +{ + "testuser1002@invite-force-outbound-calls-to-peer.scenarios.test": { + "force_outbound_calls_to_peer":"force" + } +} diff --git a/scenarios/invite_force_outbound_calls_to_peer/scenario.yml b/scenarios/invite_force_outbound_calls_to_peer/scenario.yml index c63bc487..7236102e 100644 --- a/scenarios/invite_force_outbound_calls_to_peer/scenario.yml +++ b/scenarios/invite_force_outbound_calls_to_peer/scenario.yml @@ -1,6 +1,7 @@ +--- test_uuid: invite_force_outbound_calls_to_peer domains: - 'spce.test': + invite-force-outbound-calls-to-peer.scenarios.test: reseller_id: 1 customers: 'customer.test': @@ -13,7 +14,7 @@ customers: billing_profile_id: 1 reseller_id: 1 subscribers: - spce.test: + invite-force-outbound-calls-to-peer.scenarios.test: testuser1002: customer: 'customer.test' password: testuser @@ -29,15 +30,15 @@ subscribers: scenarios: - ip: 127.126.0.1 username: testuser1002 - domain: spce.test + domain: invite-force-outbound-calls-to-peer.scenarios.test responders: - ip: 127.1.0.1 username: testuser1003 - domain: spce.test - register: no + domain: invite-force-outbound-calls-to-peer.scenarios.test + register: 'no' - ip: 127.0.2.1 number: 004321001 username: 004321001 - domain: spce.test - peer_host: peer_00_host0 - register: no + domain: invite-force-outbound-calls-to-peer.scenarios.test + peer_host: peer_invite_force_outbound_calls_to_peer_host0 + register: 'no'