From 8bac7458436d82fea1b9029e227fa8c64c6bc41c Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 7 Jul 2021 11:10:04 +0200 Subject: [PATCH] TT#116103 scenarios_pbx/invite_alias * use server_ip from scenario_ids.yml * Contact with <> format * tests: - add received Contact parameter as optional Change-Id: If5337d34d703c4f946c34a74dac1b5692ef02e5d --- scenarios_pbx/invite_alias/0003_test.yml.tt2 | 14 +++--- scenarios_pbx/invite_alias/0004_test.yml.tt2 | 2 +- scenarios_pbx/invite_alias/0005_test.yml.tt2 | 46 ++++++++++---------- scenarios_pbx/invite_alias/0006_test.yml.tt2 | 2 +- scenarios_pbx/invite_alias/0007_test.yml.tt2 | 24 +++++----- scenarios_pbx/invite_alias/0008_test.yml.tt2 | 2 +- scenarios_pbx/invite_alias/0009_test.yml.tt2 | 10 ++--- scenarios_pbx/invite_alias/0010_test.yml.tt2 | 10 ++--- scenarios_pbx/invite_alias/0011_test.yml.tt2 | 10 ++--- scenarios_pbx/invite_alias/0012_test.yml.tt2 | 12 ++--- scenarios_pbx/invite_alias/0013_test.yml.tt2 | 10 ++--- scenarios_pbx/invite_alias/0014_test.yml.tt2 | 8 ++-- scenarios_pbx/invite_alias/0015_test.yml.tt2 | 18 ++++---- scenarios_pbx/invite_alias/0016_test.yml.tt2 | 12 ++--- scenarios_pbx/invite_alias/0017_test.yml.tt2 | 8 ++-- scenarios_pbx/invite_alias/0018_test.yml.tt2 | 6 +-- 16 files changed, 97 insertions(+), 97 deletions(-) diff --git a/scenarios_pbx/invite_alias/0003_test.yml.tt2 b/scenarios_pbx/invite_alias/0003_test.yml.tt2 index 371283bb..ee035414 100644 --- a/scenarios_pbx/invite_alias/0003_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0003_test.yml.tt2 @@ -22,25 +22,25 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'INVITE sip:[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]@invite-alias.scenarios-pbx.test SIP/2.0' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ' - 'CSeq: \d+ INVITE' - - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]' + - 'Contact: ]+)?>' - 'Content-Type: application/sdp' - 'Content-Length:\s+\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' + - 'P-Sock-Info: udp:[% server_ip %]:5060' - 'P-LB-Uptime: \d+' sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ', 'CSeq: \d+ INVITE', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', 'Server: Sipwise NGCP Proxy', @@ -48,10 +48,10 @@ sip_out: ] - [ 'SIP/2.0 407 Proxy Authentication Required', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', 'Proxy-Authenticate: Digest realm="invite-alias.scenarios-pbx.test", nonce=".+"', diff --git a/scenarios_pbx/invite_alias/0004_test.yml.tt2 b/scenarios_pbx/invite_alias/0004_test.yml.tt2 index a41ef281..529920c4 100644 --- a/scenarios_pbx/invite_alias/0004_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0004_test.yml.tt2 @@ -2,7 +2,7 @@ flow: - start|sl:filtered-ack: sip_in: - 'ACK sip:[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]@invite-alias.scenarios-pbx.test SIP/2.0' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ;tag=[\w-]+' - 'CSeq: \d+ ACK' - 'Content-Length: 0' diff --git a/scenarios_pbx/invite_alias/0005_test.yml.tt2 b/scenarios_pbx/invite_alias/0005_test.yml.tt2 index f096f723..4a073f28 100644 --- a/scenarios_pbx/invite_alias/0005_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0005_test.yml.tt2 @@ -159,26 +159,26 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'INVITE sip:[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]@invite-alias.scenarios-pbx.test SIP/2.0' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ' - 'CSeq: \d+ INVITE' - - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]' - - 'Proxy-Authorization: Digest username="testuser1002",realm="invite-alias.scenarios-pbx.test",uri="sip:127.0.0.1:5060",nonce=".+",response=".+",algorithm=MD5' + - 'Contact: ]+)?>' + - 'Proxy-Authorization: Digest username="[% scenarios.0.username %]",realm="invite-alias.scenarios-pbx.test",uri="sip:[% server_ip %]:5060",nonce=".+",response=".+",algorithm=MD5' - 'Content-Type: application/sdp' - 'Content-Length:\s+\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' + - 'P-Sock-Info: udp:[% server_ip %]:5060' - 'P-LB-Uptime: \d+' sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ', 'CSeq: \d+ INVITE', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', 'Server: Sipwise NGCP Proxy', @@ -186,23 +186,23 @@ sip_out: ] - [ 'SIP/2.0 101 Connecting', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ', 'CSeq: \d+ INVITE', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', - 'P-NGCP-Authorization: testuser1002@invite-alias.scenarios-pbx.test', + 'P-NGCP-Authorization: [% scenarios.0.username %]@invite-alias.scenarios-pbx.test', 'P-NGCP-Authorized: 1', - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311000', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]', 'P-Caller-UUID: [% invite_alias_scenarios_pbx_test.testuser1002.uuid %]', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'PUBLISH sip:testuser1002@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -210,25 +210,25 @@ sip_out: 'Content-Type: application/dialog\-info\+xml', ] - [ - 'INVITE sip:testuser1003@[% scenarios.0.ip %]:\d+ SIP/2.0', - 'From: ;tag=[\w-]+', + 'INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0', + 'From: ;tag=[\w-]+', 'To: ', 'CSeq: \d+ INVITE', - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:\d+', + 'Contact: ]+)?>', 'Content-Type: application/sdp', 'Content-Length:\s+\d+', 'P-LB-Uptime: \d+', - 'P-Asserted-Identity: ', + 'P-Asserted-Identity: ', 'P-Caller-UUID: [% invite_alias_scenarios_pbx_test.testuser1002.uuid %]', 'P-Callee-UUID: [% invite_alias_scenarios_pbx_test.testuser1003.uuid %]', 'P-NGCP-Rtpengine-Bleg: 1', - 'P-Called-Party-ID: ', + '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=[% invite_alias_customerpbx_test.id %];b_park_domain=[% invite_alias_customerpbx_test.id %]', 'P-App-Name: sbc', - 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=\d+;primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]', - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]1003;alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]', - 'P-NGCP-Presence-Caller: sip:testuser1002@invite-alias.scenarios-pbx.test', - 'P-NGCP-Presence-Callee: sip:testuser1003@invite-alias.scenarios-pbx.test', - 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.0.ip %];port=[% scenarios.0.responders.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]1003;alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]', + 'P-NGCP-Presence-Caller: sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test', + 'P-NGCP-Presence-Callee: sip:[% scenarios.0.responders.0.username %]@invite-alias.scenarios-pbx.test', + 'P-D-Uri: sip:lb@127.0.0.1;lr;(received=sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];)?socket=sip:[% server_ip %]:5060', 'P-Proxy-Uri: sip:127.0.0.1:5062', ] diff --git a/scenarios_pbx/invite_alias/0006_test.yml.tt2 b/scenarios_pbx/invite_alias/0006_test.yml.tt2 index adf0f21d..0e99837b 100644 --- a/scenarios_pbx/invite_alias/0006_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0006_test.yml.tt2 @@ -14,7 +14,7 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'SIP/2.0 100 Trying' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ' - 'CSeq: \d+ INVITE' - 'Content-Length: 0' diff --git a/scenarios_pbx/invite_alias/0007_test.yml.tt2 b/scenarios_pbx/invite_alias/0007_test.yml.tt2 index 2ca574fb..6fb83ee1 100644 --- a/scenarios_pbx/invite_alias/0007_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0007_test.yml.tt2 @@ -15,20 +15,20 @@ flow: - return|ROUTE_RUNTIME: - exit|ROUTE_EXIT: sip_in: - - 'INVITE sip:testuser1003@127.126.0.1:\d+ SIP/2.0' + - 'INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0' - 'From: ;tag=[\w-]+' - - 'To: ' + - 'To: ' - 'CSeq: \d+ INVITE' - 'P-LB-Uptime: \d+' - 'P-Asserted-Identity: ' - 'P-Caller-UUID: [% invite_alias_scenarios_pbx_test.testuser1002.uuid %]' - 'P-Callee-UUID: [% invite_alias_scenarios_pbx_test.testuser1003.uuid %]' - 'P-NGCP-Rtpengine-Bleg: 1' - - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]' - - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=43110001003;alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]' - - 'P-NGCP-Presence-Caller: sip:testuser1002@invite-alias.scenarios-pbx.test' + - 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]' + - 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.0.ip %];port=[% scenarios.0.responders.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1003.pbx_phone_number %];alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]' + - 'P-NGCP-Presence-Caller: sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test' - 'P-NGCP-Presence-Callee: sip:testuser1003@invite-alias.scenarios-pbx.test' - - 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060' + - 'P-D-Uri: sip:lb@127.0.0.1;lr;(received=sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];)?socket=sip:[% server_ip %]:5060' - 'Content-Type: application/sdp' - 'Content-Length:\s+\d+' - 'Contact: ' @@ -36,24 +36,24 @@ sip_out: - [ 'SIP/2.0 100 Trying', 'From: ;tag=[\w-]+', - 'To: ', + 'To: ', 'CSeq: \d+ INVITE', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'INVITE sip:testuser1003@127.126.0.1:\d+ SIP/2.0', + 'INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %] SIP/2.0', 'From: ;tag=[\w-]+', - 'To: ', + 'To: ', 'CSeq: \d+ INVITE', 'P-LB-Uptime: \d+', 'P-Asserted-Identity: ', 'P-Caller-UUID: [% invite_alias_scenarios_pbx_test.testuser1002.uuid %]', 'P-Callee-UUID: [% invite_alias_scenarios_pbx_test.testuser1003.uuid %]', 'P-NGCP-Rtpengine-Bleg: 1', - 'P-NGCP-Caller-Info: ;ip=127.126.0.1;port=\d+;primary=4311000', - 'P-NGCP-Callee-Info: ;ip=127.0.0.1;port=5060;primary=43110001003;alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]', - 'P-D-Uri: sip:lb@127.0.0.1;lr;socket=sip:127.0.0.1:5060', + 'P-NGCP-Caller-Info: ;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1002.phone_number %]', + 'P-NGCP-Callee-Info: ;ip=[% scenarios.0.responders.0.ip %];port=[% scenarios.0.responders.0.port %];primary=[% invite_alias_scenarios_pbx_test.testuser1003.pbx_phone_number %];alias=[% invite_alias_scenarios_pbx_test.testuser1003.alias_numbers.0.phone_number %]', + 'P-D-Uri: sip:lb@127.0.0.1;lr;(received=sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];)?socket=sip:[% server_ip %]:5060', 'Content-Type: application/sdp', 'Content-Length:\s+\d+', 'Contact: ', diff --git a/scenarios_pbx/invite_alias/0008_test.yml.tt2 b/scenarios_pbx/invite_alias/0008_test.yml.tt2 index cc83e16e..f339a28d 100644 --- a/scenarios_pbx/invite_alias/0008_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0008_test.yml.tt2 @@ -10,7 +10,7 @@ flow: sip_in: - 'SIP/2.0 100 Trying' - 'From: ;tag=[\w-]+' - - 'To: ' + - 'To: ' - 'CSeq: \d+ INVITE' - 'Server: Sipwise NGCP LB' - 'Content-Length: 0' diff --git a/scenarios_pbx/invite_alias/0009_test.yml.tt2 b/scenarios_pbx/invite_alias/0009_test.yml.tt2 index 60fd48d9..eefbfedb 100644 --- a/scenarios_pbx/invite_alias/0009_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0009_test.yml.tt2 @@ -10,7 +10,7 @@ flow: sip_in: - 'SIP/2.0 180 Ringing' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ INVITE' - 'Contact: ' - 'Content-Length: 0' @@ -20,9 +20,9 @@ sip_in: - 'P-NGCP-Src-Af: 4' sip_out: - [ - 'PUBLISH sip:testuser1003@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.responders.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -32,7 +32,7 @@ sip_out: - [ 'SIP/2.0 180 Ringing', 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', 'Contact: ', 'Content-Length: 0', diff --git a/scenarios_pbx/invite_alias/0010_test.yml.tt2 b/scenarios_pbx/invite_alias/0010_test.yml.tt2 index 50271efa..5212446a 100644 --- a/scenarios_pbx/invite_alias/0010_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0010_test.yml.tt2 @@ -23,9 +23,9 @@ sip_in: - 'Content-Length: 0' sip_out: - [ - 'PUBLISH sip:testuser1002@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -35,11 +35,11 @@ sip_out: ] - [ 'SIP/2.0 180 Ringing', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', 'Contact: ', 'Content-Length: 0', 'P-COLP-Identity: "1003" ', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', ] diff --git a/scenarios_pbx/invite_alias/0011_test.yml.tt2 b/scenarios_pbx/invite_alias/0011_test.yml.tt2 index fca2b6b2..1986df2e 100644 --- a/scenarios_pbx/invite_alias/0011_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0011_test.yml.tt2 @@ -14,7 +14,7 @@ flow: sip_in: - 'SIP/2.0 200 OK' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ INVITE' - 'Contact: ' - 'Content-Type: application/sdp' @@ -25,9 +25,9 @@ sip_in: - 'P-NGCP-Src-Af: 4' sip_out: - [ - 'PUBLISH sip:testuser1003@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.responders.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -38,7 +38,7 @@ sip_out: - [ 'SIP/2.0 200 OK', 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', 'Contact: ', 'Content-Type: application/sdp', diff --git a/scenarios_pbx/invite_alias/0012_test.yml.tt2 b/scenarios_pbx/invite_alias/0012_test.yml.tt2 index 03ec2948..f83ce134 100644 --- a/scenarios_pbx/invite_alias/0012_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0012_test.yml.tt2 @@ -28,9 +28,9 @@ sip_in: - 'Content-Length:\s+\d+' sip_out: - [ - 'PUBLISH sip:testuser1002@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -40,12 +40,12 @@ sip_out: ] - [ 'SIP/2.0 200 OK', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ INVITE', 'Contact: ', 'Content-Type: application/sdp', 'Content-Length:\s+\d+', - 'P-COLP-Identity: "1003" ', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-COLP-Identity: "[% invite_alias_scenarios_pbx_test.testuser1003.pbx_extension %]" ', + 'P-Out-Socket: udp:[% server_ip %]:5060', ] diff --git a/scenarios_pbx/invite_alias/0013_test.yml.tt2 b/scenarios_pbx/invite_alias/0013_test.yml.tt2 index 0a6cf3b5..c808fa8a 100644 --- a/scenarios_pbx/invite_alias/0013_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0013_test.yml.tt2 @@ -27,16 +27,16 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'ACK sip:127.0.0.1:508[08];prxroute=1 SIP/2.0' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ;tag=[\w-]+' - 'CSeq: \d+ ACK' - - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]' + - 'Contact: ]+)?>' - 'Content-Length: 0' - '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' + - 'P-Sock-Info: udp:[% server_ip %]:5060' - 'P-LB-Uptime: \d+' sip_out: - [ @@ -44,12 +44,12 @@ sip_out: 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ ACK', - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]', + 'Contact: ]+)?>', 'Content-Length: 0', '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', + 'P-Sock-Info: udp:[% server_ip %]:5060', 'P-LB-Uptime: \d+', ] diff --git a/scenarios_pbx/invite_alias/0014_test.yml.tt2 b/scenarios_pbx/invite_alias/0014_test.yml.tt2 index e4dd8508..d2d34eb1 100644 --- a/scenarios_pbx/invite_alias/0014_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0014_test.yml.tt2 @@ -24,17 +24,17 @@ flow: - return|ROUTE_RUNTIME: - exit|ROUTE_EXIT: sip_in: - - 'ACK sip:127.126.0.1:\d+;transport=UDP SIP/2.0' + - 'ACK sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ ACK' - 'Content-Length: 0' - 'Contact: ' sip_out: - [ - 'ACK sip:127.126.0.1:\d+;transport=UDP SIP/2.0', + 'ACK sip:[% scenarios.0.responders.0.ip %]:[% scenarios.0.responders.0.port %];transport=UDP SIP/2.0', 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ ACK', 'Content-Length: 0', 'Contact: ', diff --git a/scenarios_pbx/invite_alias/0015_test.yml.tt2 b/scenarios_pbx/invite_alias/0015_test.yml.tt2 index 72b9865b..2f53f02d 100644 --- a/scenarios_pbx/invite_alias/0015_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0015_test.yml.tt2 @@ -32,33 +32,33 @@ flow: - exit|ROUTE_EXIT: sip_in: - 'BYE sip:127.0.0.1:508[08];prxroute=1 SIP/2.0' - - 'From: ;tag=[\w-]+' + - 'From: ;tag=[\w-]+' - 'To: ;tag=[\w-]+' - 'CSeq: \d+ BYE' - - 'Contact: sip:testuser1002@[% scenarios.0.ip %]:[% scenarios.0.port %]' + - 'Contact: ]+)?>' - 'Content-Length: 0' - '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' + - 'P-Sock-Info: udp:[% server_ip %]:5060' - 'P-LB-Uptime: \d+' sip_out: - [ 'SIP/2.0 100 Trying', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-Out-Socket: udp:[% server_ip %]:5060', 'P-NGCP-Auth-IP: [% scenarios.0.ip %]', 'P-NGCP-Auth-UA: ', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'PUBLISH sip:testuser1002@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -71,7 +71,7 @@ sip_out: 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', - 'Contact: sip:testuser1002@127.126.0.1:\d+', + 'Contact: ]+)?>', 'Content-Length: 0', 'P-LB-Uptime: \d+', 'P-Asserted-Identity: ', diff --git a/scenarios_pbx/invite_alias/0016_test.yml.tt2 b/scenarios_pbx/invite_alias/0016_test.yml.tt2 index 398337aa..de1539fa 100644 --- a/scenarios_pbx/invite_alias/0016_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0016_test.yml.tt2 @@ -31,7 +31,7 @@ flow: sip_in: - '^BYE' - 'From: ;tag=[\w-]+' - - 'To: ;tag=[\w-]+' + - 'To: ;tag=[\w-]+' - 'CSeq: \d+ BYE' - 'P-LB-Uptime: \d+' - 'P-Asserted-Identity: ' @@ -40,15 +40,15 @@ sip_out: - [ 'SIP/2.0 100 Trying', 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', 'Server: Sipwise NGCP Proxy', 'Content-Length: 0', ] - [ - 'PUBLISH sip:testuser1003@invite-alias.scenarios-pbx.test SIP/2.0', - 'To: ', - 'From: ;tag=[\w-]+', + 'PUBLISH sip:[% scenarios.0.responders.0.username %]@invite-alias.scenarios-pbx.test SIP/2.0', + 'To: ', + 'From: ;tag=[\w-]+', 'CSeq: \d+ PUBLISH', 'Content-Length:\s+\d+', 'User-Agent: Sipwise NGCP Proxy', @@ -59,7 +59,7 @@ sip_out: - [ '^BYE', 'From: ;tag=[\w-]+', - 'To: ;tag=[\w-]+', + 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', 'P-LB-Uptime: \d+', 'P-Asserted-Identity: ', diff --git a/scenarios_pbx/invite_alias/0017_test.yml.tt2 b/scenarios_pbx/invite_alias/0017_test.yml.tt2 index cb371bf6..2cebfeef 100644 --- a/scenarios_pbx/invite_alias/0017_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0017_test.yml.tt2 @@ -14,8 +14,8 @@ 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: \s+0' @@ -26,8 +26,8 @@ sip_in: 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: \s+0', diff --git a/scenarios_pbx/invite_alias/0018_test.yml.tt2 b/scenarios_pbx/invite_alias/0018_test.yml.tt2 index 04058e5f..77bfd054 100644 --- a/scenarios_pbx/invite_alias/0018_test.yml.tt2 +++ b/scenarios_pbx/invite_alias/0018_test.yml.tt2 @@ -23,10 +23,10 @@ sip_in: sip_out: - [ 'SIP/2.0 200 OK', - 'From: ;tag=[\w-]+', + 'From: ;tag=[\w-]+', 'To: ;tag=[\w-]+', 'CSeq: \d+ BYE', 'Content-Length: 0', - 'P-COLP-Identity: "1003" ', - 'P-Out-Socket: udp:127.0.0.1:5060', + 'P-COLP-Identity: "[% invite_alias_scenarios_pbx_test.testuser1003.pbx_extension %]" ', + 'P-Out-Socket: udp:[% server_ip %]:5060', ]