Commit af78ae47 authored by ferrerod's avatar ferrerod

Add event triggering on rejected registration

parent 2c5a2cb4
...@@ -1640,6 +1640,21 @@ void amf_n1::send_registration_reject_msg( ...@@ -1640,6 +1640,21 @@ void amf_n1::send_registration_reject_msg(
bstring b = blk2bstr(buffer, encoded_size); bstring b = blk2bstr(buffer, encoded_size);
itti_send_dl_nas_buffer_to_task_n2(b, ran_ue_ngap_id, amf_ue_ngap_id); itti_send_dl_nas_buffer_to_task_n2(b, ran_ue_ngap_id, amf_ue_ngap_id);
// Trigger CommunicationFailure Report notify
oai::amf::model::CommunicationFailure comm_failure = {};
std::shared_ptr<ue_context> uc = {};
if (!find_ue_context(ran_ue_ngap_id, amf_ue_ngap_id, uc)) {
Logger::amf_n1().warn("Cannot find the UE context, unable to notify CommunicationFailure Report");
return;
}
string supi = uc.get()->supi;
Logger::amf_n1().debug(
"Signal the UE CommunicationFailure Report Event notification for SUPI %s",
supi.c_str());
comm_failure.setNasReleaseCode(std::to_string(cause_value));
event_sub.ue_communication_failure(supi, comm_failure, 1);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -617,6 +617,9 @@ void amf_n11::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) { ...@@ -617,6 +617,9 @@ void amf_n11::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
if (r.reachabilityIsSet()) { if (r.reachabilityIsSet()) {
report["reachability"] = r.getReachability().get_value(); report["reachability"] = r.getReachability().get_value();
} }
if (r.commFailureIsSet()) {
report["commFailure"] = r.getCommFailure();
}
// timestamp // timestamp
std::time_t time_epoch_ntp = std::time(nullptr); std::time_t time_epoch_ntp = std::time(nullptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment