From 3920c3e58db6d374e9167a0292c0b0e64d683f27 Mon Sep 17 00:00:00 2001 From: vkatsuba Date: Thu, 3 Jun 2021 15:01:06 +0300 Subject: [PATCH] Add deleted_by_upf for default termination cause mapping --- src/ergw_aaa_diameter.erl | 7 +++++-- src/ergw_aaa_radius.erl | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ergw_aaa_diameter.erl b/src/ergw_aaa_diameter.erl index 4e9e3fb0..a638d27a 100644 --- a/src/ergw_aaa_diameter.erl +++ b/src/ergw_aaa_diameter.erl @@ -22,7 +22,9 @@ -include_lib("diameter/include/diameter_gen_base_rfc6733.hrl"). -include("include/diameter_3gpp_ts29_061_sgi.hrl"). -%% RFC: https://tools.ietf.org/html/rfc3588#section-8.15 +%% RFC: +%% * https://tools.ietf.org/html/rfc3588#section-8.15 +%% * https://www.iana.org/assignments/aaa-parameters/aaa-parameters.xhtml#aaa-parameters-16 -define(DEFAULT_TERMINATION_CAUSE_MAPPING, [ {normal, 1}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' {administrative, 4}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_ADMINISTRATIVE' @@ -38,7 +40,8 @@ {conn_error, 1}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' {rate_limit, 1}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' {ocs_hold_end, 1}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' - {peer_reject, 1} % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' + {peer_reject, 1}, % ?'DIAMETER_BASE_TERMINATION-CAUSE_LOGOUT' + {deleted_by_upf, 19} % 'NAS_ERROR' ]). -define(VENDOR_ID_3GPP, 10415). diff --git a/src/ergw_aaa_radius.erl b/src/ergw_aaa_radius.erl index 58027d54..25c703d4 100644 --- a/src/ergw_aaa_radius.erl +++ b/src/ergw_aaa_radius.erl @@ -50,7 +50,8 @@ {conn_error, 10}, {rate_limit, 10}, {ocs_hold_end, 10}, - {peer_reject, 10} + {peer_reject, 10}, + {deleted_by_upf, 9} ]). -define(DefaultOptions, [{server, undefined},