From 8be7577812d6e21bb429c15e2b171e96a1919deb Mon Sep 17 00:00:00 2001 From: Alessio Garzi Date: Tue, 23 Jul 2024 17:47:50 +0200 Subject: [PATCH] MT#56358 Test new HM reject possibility Scenario invite_hm extended, it now dials a second call with P-Asserted-Identity header so that the corresponding HM will reject the call with a 456 error message. Change-Id: Ie71666ad4478b47aebc3ceac851aff439ef4ac84 --- scenarios/invite_hm/cdr_test.yml.tt2 | 10 ++- scenarios/invite_hm/header.yml | 28 ++++++ scenarios/invite_hm/prefs.json.tt2 | 4 +- scenarios/invite_hm/scenario.yml | 20 +++++ scenarios/invite_hm/sipp_scenario01.xml | 108 ++++++++++++++++++++++++ 5 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 scenarios/invite_hm/sipp_scenario01.xml diff --git a/scenarios/invite_hm/cdr_test.yml.tt2 b/scenarios/invite_hm/cdr_test.yml.tt2 index 40ca1cdb..e07240e0 100644 --- a/scenarios/invite_hm/cdr_test.yml.tt2 +++ b/scenarios/invite_hm/cdr_test.yml.tt2 @@ -7,4 +7,12 @@ cdr: destination_user_dialed: '[% scenarios.0.responders.0.username %]' call_type: 'call' call_status: 'ok' - call_code: '200' \ No newline at end of file + call_code: '200' + - source_user: '[% scenarios.1.username %]' + source_domain: 'invite-hm.scenarios.test' + destination_user: '[% scenarios.1.responders.0.username %]' + destination_domain: 'invite-hm.scenarios.test' + destination_user_dialed: '[% scenarios.1.responders.0.username %]' + call_type: 'call' + call_status: 'other' + call_code: '456' \ No newline at end of file diff --git a/scenarios/invite_hm/header.yml b/scenarios/invite_hm/header.yml index 40bf4e70..c21970af 100644 --- a/scenarios/invite_hm/header.yml +++ b/scenarios/invite_hm/header.yml @@ -215,3 +215,31 @@ hm_invite_hm_01: value: no this_is_second_reply value_part: full rwr_set_id: +hm_invite_hm_02: + header_rules: + - data: + direction: a_inbound + description: Reject if PAI equals to 112 + name: hm_invite_hm_02_00 + stopper: 1 + enabled: 1 + priority: 1 + conditions: + - enabled: 1 + match_name: P-Asserted-Identity + match_part: username + match_type: header + expression: is + expression_negation: 0 + value_type: input + values: + - value: '112' + rwr_set_id: + actions: + - enabled: 1 + action_type: set + header: $avp(s:hm_reject) + header_part: full + value: 456 + value_part: full + rwr_set_id: \ No newline at end of file diff --git a/scenarios/invite_hm/prefs.json.tt2 b/scenarios/invite_hm/prefs.json.tt2 index 24d7ebef..b8fbb0e5 100644 --- a/scenarios/invite_hm/prefs.json.tt2 +++ b/scenarios/invite_hm/prefs.json.tt2 @@ -5,7 +5,7 @@ "testuser1002@invite-hm.scenarios.test": { "header_rule_set": "hm_invite_hm_00" }, - "testuser1003@invite-hm.scenarios.test": { - "header_rule_set": "hm_invite_hm_01" + "testuser1004@invite-hm.scenarios.test": { + "header_rule_set": "hm_invite_hm_02" } } \ No newline at end of file diff --git a/scenarios/invite_hm/scenario.yml b/scenarios/invite_hm/scenario.yml index 356c9101..fe0be265 100644 --- a/scenarios/invite_hm/scenario.yml +++ b/scenarios/invite_hm/scenario.yml @@ -21,6 +21,18 @@ subscribers: cc: 43 ac: 1 sn: 1003 + testuser1004: + customer: 'customer.test' + password: testuser + cc: 43 + ac: 1 + sn: 1003 + testuser1005: + customer: 'customer.test' + password: testuser + cc: 43 + ac: 1 + sn: 1003 testuser1002: customer: 'customer.test' password: testuser @@ -40,3 +52,11 @@ scenarios: username: testuser1003 domain: invite-hm.scenarios.test register: 'yes' + - ip: 127.126.0.2 + username: testuser1004 + domain: invite-hm.scenarios.test + responders: + - ip: 127.1.0.1 + username: testuser1005 + domain: invite-hm.scenarios.test + register: 'no' diff --git a/scenarios/invite_hm/sipp_scenario01.xml b/scenarios/invite_hm/sipp_scenario01.xml new file mode 100644 index 00000000..f9eadeec --- /dev/null +++ b/scenarios/invite_hm/sipp_scenario01.xml @@ -0,0 +1,108 @@ + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id] + CSeq: 1 INVITE + Contact: + Max-Forwards: 70 + Content-Type: application/sdp + Content-Length: [len] + + v=0 + o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] + s=- + c=IN IP[media_ip_type] [media_ip] + t=0 0 + m=audio [media_port] RTP/AVP 8 + a=rtpmap:8 PCMA/8000 + a=ptime:50 + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id] + CSeq: 1 ACK + Contact: + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id] + CSeq: 2 INVITE + Contact: + P-Asserted-Identity: + Max-Forwards: 70 + [field1 file="caller.csv" line=1] + Content-Type: application/sdp + Content-Length: [len] + + v=0 + o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] + s=- + c=IN IP[media_ip_type] [media_ip] + t=0 0 + m=audio [media_port] RTP/AVP 8 + a=rtpmap:8 PCMA/8000 + a=ptime:50 + + ]]> + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: NGCP%[field4 file="callee.csv" line=1]%///[call_id] + CSeq: 2 ACK + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + + + + +