From 60221641bbb9beb6dec1def89c99111b633fc042 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 21 Apr 2021 12:13:27 +0200 Subject: [PATCH] TT#116100 scenarios/incoming_foreign_dom * domain per scenario * dynamic IP/port and numbers Change-Id: I3511030f9b6fdada4fe2290bab10899548ec872d --- .../incoming_foreign_dom/0003_test.yml.tt2 | 34 +++++++++---------- .../incoming_foreign_dom/0005_test.yml.tt2 | 28 +++++++-------- .../incoming_foreign_dom/0009_test.yml.tt2 | 20 +++++------ .../incoming_foreign_dom/0010_test.yml.tt2 | 8 ++--- .../incoming_foreign_dom/0011_test.yml.tt2 | 4 +-- .../incoming_foreign_dom/0012_test.yml.tt2 | 12 +++---- .../incoming_foreign_dom/0013_test.yml.tt2 | 6 ++-- .../incoming_foreign_dom/0014_test.yml.tt2 | 18 +++++----- .../incoming_foreign_dom/0015_test.yml.tt2 | 24 ++++++------- .../incoming_foreign_dom/0016_test.yml.tt2 | 4 +-- .../incoming_foreign_dom/cdr_test.yml.tt2 | 6 ++-- scenarios/incoming_foreign_dom/prefs.json | 5 --- scenarios/incoming_foreign_dom/prefs.json.tt2 | 5 +++ scenarios/incoming_foreign_dom/scenario.yml | 11 +++--- 14 files changed, 93 insertions(+), 92 deletions(-) delete mode 100644 scenarios/incoming_foreign_dom/prefs.json create mode 100644 scenarios/incoming_foreign_dom/prefs.json.tt2 diff --git a/scenarios/incoming_foreign_dom/0003_test.yml.tt2 b/scenarios/incoming_foreign_dom/0003_test.yml.tt2 index 644121b5..9aa2ed5d 100644 --- a/scenarios/incoming_foreign_dom/0003_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/0003_test.yml.tt2 @@ -59,10 +59,10 @@ flow: - return|ROUTE_SET_CALLEE_DIALOG: $avp(lua_dlg_profile): [ "totalaccount:[% customer_test.id %]", - "totaluser:[% spce_test.testuser1003.uuid %]", + "totaluser:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]", "total", "account:[% customer_test.id %]", - "user:[% spce_test.testuser1003.uuid %]" + "user:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]" ] - start|ROUTE_BLOCK_IN: - return|ROUTE_BLOCK_IN: @@ -107,10 +107,10 @@ flow: "totaluser:0", "local", "totalaccount:[% customer_test.id %]", - "totaluser:[% spce_test.testuser1003.uuid %]", + "totaluser:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]", "total", "account:[% customer_test.id %]", - "user:[% spce_test.testuser1003.uuid %]" + "user:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]" ] - start|ROUTE_ACC_CALLER: - start|ROUTE_SET_ACC_CALLER_CALL_COUNTERS: @@ -186,14 +186,14 @@ flow: "totaluser:0", "local", "totalaccount:[% customer_test.id %]", - "totaluser:[% spce_test.testuser1003.uuid %]", + "totaluser:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]", "total", "account:[% customer_test.id %]", - "user:[% spce_test.testuser1003.uuid %]" + "user:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]" ] sip_in: - - '^INVITE sip:4311003@' - - 'From: ' + - '^INVITE sip:[% incoming_foreign_dom_scenarios_test.testuser1003.phone_number %]@' + - 'From: ' - 'Contact: sip:external@' - 'CSeq: 1 INVITE' - 'Max-Forwards: 69' @@ -202,29 +202,29 @@ sip_out: - [ '^SIP/2.0 100 Trying', 'CSeq: 1 INVITE', - 'From: ', - 'To: ', + 'To: ', - 'To: ', + 'From: ', + 'To: ', 'P-Caller-UUID: 0', 'Content-Length: 0' ] - [ '^INVITE sip:testuser1003@', 'CSeq: 1 INVITE', - 'From: ', - 'To: ', + 'To: ', + 'P-Callee-UUID: [% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]', + 'P-Asserted-Identity: ', 'P-Called-Party-ID: ;tag=[\w-]+' - - 'To: ' + - 'INVITE sip:testuser1003@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ' - 'CSeq: \d+ INVITE' - 'P-LB-Uptime: \d+' - - 'P-Asserted-Identity: ' + - 'P-Asserted-Identity: ' - 'P-Caller-UUID: 0' - - 'P-NGCP-Caller-Info: ;ip=127.0.2.1;port=\d+' - - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=4311003' + - 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %]' + - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% incoming_foreign_dom_scenarios_test.testuser1003.phone_number %]' - '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.1:\d+ SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ', + 'INVITE sip:testuser1003@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ', 'CSeq: \d+ INVITE', 'P-LB-Uptime: \d+', - 'P-Asserted-Identity: ', + 'P-Asserted-Identity: ', 'P-Caller-UUID: 0', - 'P-NGCP-Caller-Info: ;ip=127.0.2.1;port=\d+', - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=4311003', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %]', + 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% incoming_foreign_dom_scenarios_test.testuser1003.phone_number %]', '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/incoming_foreign_dom/0009_test.yml.tt2 b/scenarios/incoming_foreign_dom/0009_test.yml.tt2 index a4a816ed..743ea10b 100644 --- a/scenarios/incoming_foreign_dom/0009_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/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.1.0.1' - - 'P-NGCP-Src-Port: \d+' + - 'P-NGCP-Src-Ip: [% scenarios.0.responders.0.ip %]' + - 'P-NGCP-Src-Port: [% scenarios.0.responders.0.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.1.0.1', - 'P-NGCP-Src-Port: \d+', + 'P-NGCP-Src-Ip: [% scenarios.0.responders.0.ip %]', + 'P-NGCP-Src-Port: [% scenarios.0.responders.0.port %]', 'P-NGCP-Src-Proto: udp', 'P-NGCP-Src-Af: 4', ] diff --git a/scenarios/incoming_foreign_dom/0010_test.yml.tt2 b/scenarios/incoming_foreign_dom/0010_test.yml.tt2 index d3e3023c..097d34db 100644 --- a/scenarios/incoming_foreign_dom/0010_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/0010_test.yml.tt2 @@ -26,21 +26,21 @@ flow: "totaluser:0", "local", "totalaccount:[% customer_test.id %]", - "totaluser:[% spce_test.testuser1003.uuid %]", + "totaluser:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]", "total", "account:[% customer_test.id %]", - "user:[% spce_test.testuser1003.uuid %]" + "user:[% incoming_foreign_dom_scenarios_test.testuser1003.uuid %]" ] - return|dialog:start: sip_in: - '^SIP/2.0 200 OK' - 'CSeq: 1 INVITE' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'ACK sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ ACK' - 'Contact: ' - 'Content-Length: 0' sip_out: - [ - 'ACK sip:127.1.0.1:\d+;transport=UDP SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'ACK sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ ACK', 'Contact: ', 'Content-Length: 0', diff --git a/scenarios/incoming_foreign_dom/0013_test.yml.tt2 b/scenarios/incoming_foreign_dom/0013_test.yml.tt2 index 5b13f305..028a35f2 100644 --- a/scenarios/incoming_foreign_dom/0013_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/0013_test.yml.tt2 @@ -34,7 +34,7 @@ sip_in: - 'Max-Forwards: 69' - 'Content-Length: 0' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'BYE sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0' + - 'From: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ BYE' - 'P-LB-Uptime: \d+' - - 'P-Asserted-Identity: ' + - 'P-Asserted-Identity: ' - 'Content-Length: 0' sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'BYE sip:127.1.0.1:\d+;transport=UDP SIP/2.0', - 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'BYE sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0', + 'From: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', 'P-LB-Uptime: \d+', 'Content-Length: 0', diff --git a/scenarios/incoming_foreign_dom/0015_test.yml.tt2 b/scenarios/incoming_foreign_dom/0015_test.yml.tt2 index 57967f26..b6f5bdf5 100644 --- a/scenarios/incoming_foreign_dom/0015_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/0015_test.yml.tt2 @@ -14,25 +14,25 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'SIP/2.0 200 OK' - - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ BYE' - - 'Contact: ' - - 'Content-Length: 0' - - 'P-NGCP-Src-Ip: 127.1.0.1' - - 'P-NGCP-Src-Port: \d+' + - 'Contact: ' + - 'Content-Length:\s+0' + - 'P-NGCP-Src-Ip: [% scenarios.0.responders.0.ip %]' + - 'P-NGCP-Src-Port: [% scenarios.0.responders.0.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+ BYE', - 'Contact: ', - 'Content-Length: 0', - 'P-NGCP-Src-Ip: 127.1.0.1', - 'P-NGCP-Src-Port: \d+', + 'Contact: ', + 'Content-Length:\s+0', + 'P-NGCP-Src-Ip: [% scenarios.0.responders.0.ip %]', + 'P-NGCP-Src-Port: [% scenarios.0.responders.0.port %]', 'P-NGCP-Src-Proto: udp', 'P-NGCP-Src-Af: 4', ] diff --git a/scenarios/incoming_foreign_dom/0016_test.yml.tt2 b/scenarios/incoming_foreign_dom/0016_test.yml.tt2 index f7dd673b..5d38b0e0 100644 --- a/scenarios/incoming_foreign_dom/0016_test.yml.tt2 +++ b/scenarios/incoming_foreign_dom/0016_test.yml.tt2 @@ -17,12 +17,12 @@ sip_in: - 'CSeq: 2 BYE' - 'Content-Length: 0' - 'From: