From e116cedbcdf95fbfbf062f4dc8980d808fb5bf83 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 21 Apr 2021 12:23:29 +0200 Subject: [PATCH] TT#116100 scenarios/invite_hm_callforward * domain per scenario * dynamic IP/port and numbers Change-Id: I8fc437a15eb1018a56669507bb9f221104062d83 --- .../invite_hm_callforward/0005_test.yml.tt2 | 34 +++++------ .../invite_hm_callforward/0007_test.yml.tt2 | 46 +++++++------- .../invite_hm_callforward/0009_test.yml.tt2 | 36 +++++------ .../invite_hm_callforward/0021_test.yml.tt2 | 2 +- .../invite_hm_callforward/0024_test.yml.tt2 | 2 +- .../{callforward.yml => callforward.yml.tt2} | 4 +- .../invite_hm_callforward/cdr_test.yml.tt2 | 14 ++--- scenarios/invite_hm_callforward/header.yml | 61 ++++++++++--------- scenarios/invite_hm_callforward/prefs.json | 11 ---- .../invite_hm_callforward/prefs.json.tt2 | 11 ++++ scenarios/invite_hm_callforward/scenario.yml | 17 +++--- 11 files changed, 120 insertions(+), 118 deletions(-) rename scenarios/invite_hm_callforward/{callforward.yml => callforward.yml.tt2} (63%) delete mode 100644 scenarios/invite_hm_callforward/prefs.json create mode 100644 scenarios/invite_hm_callforward/prefs.json.tt2 diff --git a/scenarios/invite_hm_callforward/0005_test.yml.tt2 b/scenarios/invite_hm_callforward/0005_test.yml.tt2 index 9752d5ac..d4a0cc1a 100644 --- a/scenarios/invite_hm_callforward/0005_test.yml.tt2 +++ b/scenarios/invite_hm_callforward/0005_test.yml.tt2 @@ -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: ', 'To: ;tag=[\w-]+' - - 'To: ' + - 'INVITE sip:testuser1003@[% 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: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]' + - 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]' + - 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]' + - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% invite_hm_callforward_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' - 'Content-Length:\s+\d+' @@ -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:testuser1003@[% 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: [% invite_hm_callforward_scenarios_test.testuser1001.uuid %]', + 'P-NGCP-Caller-Info: ;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]', + 'P-NGCP-Forward-Info: ;ip=127.0.0.1;port=508[08];primary=[% invite_hm_callforward_scenarios_test.testuser1001.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% invite_hm_callforward_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', 'Content-Length:\s+\d+', diff --git a/scenarios/invite_hm_callforward/0021_test.yml.tt2 b/scenarios/invite_hm_callforward/0021_test.yml.tt2 index 0d9c3f20..14538253 100644 --- a/scenarios/invite_hm_callforward/0021_test.yml.tt2 +++ b/scenarios/invite_hm_callforward/0021_test.yml.tt2 @@ -46,6 +46,6 @@ sip_out: 'CSeq: \d+ BYE', 'Max-Forwards: 69', 'Content-Length: 0', - 'From: ' - rwr_set_id: + - value: '' + 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: '' - rwr_set_id: + - value: '' + 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: '' - rwr_set_id: + - value: '' + 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: \ No newline at end of file + rwr_set_id: \ No newline at end of file diff --git a/scenarios/invite_hm_callforward/prefs.json b/scenarios/invite_hm_callforward/prefs.json deleted file mode 100644 index 1ea77a3e..00000000 --- a/scenarios/invite_hm_callforward/prefs.json +++ /dev/null @@ -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" - } -} diff --git a/scenarios/invite_hm_callforward/prefs.json.tt2 b/scenarios/invite_hm_callforward/prefs.json.tt2 new file mode 100644 index 00000000..54dfa551 --- /dev/null +++ b/scenarios/invite_hm_callforward/prefs.json.tt2 @@ -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" + } +} diff --git a/scenarios/invite_hm_callforward/scenario.yml b/scenarios/invite_hm_callforward/scenario.yml index 09ffe37b..269fef6d 100644 --- a/scenarios/invite_hm_callforward/scenario.yml +++ b/scenarios/invite_hm_callforward/scenario.yml @@ -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'