Commit 3d4eec0c authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix smContextStatusUri for PDU Session Establishment Request

parent ba1eaa2d
...@@ -599,7 +599,7 @@ void amf_n1::service_request_handle( ...@@ -599,7 +599,7 @@ void amf_n1::service_request_handle(
//TODO: is_supi_to_pdu_ctx should be removed //TODO: is_supi_to_pdu_ctx should be removed
if (!amf_n11_inst->is_supi_to_pdu_ctx(supi) || !psc.get()->isn2sm_avaliable) { if (!amf_n11_inst->is_supi_to_pdu_ctx(supi) || !psc.get()->isn2sm_avaliable) {
Logger::amf_n1().error( Logger::amf_n1().error(
"Cannot get pdu session information with supi(%s)", supi.c_str()); "Cannot get pdu session information with supi (%s)", supi.c_str());
if (amf_n11_inst->is_supi_to_pdu_ctx(supi)) { if (amf_n11_inst->is_supi_to_pdu_ctx(supi)) {
psc.get()->isn2sm_avaliable = true; psc.get()->isn2sm_avaliable = true;
} }
...@@ -839,12 +839,13 @@ void amf_n1::registration_request_handle( ...@@ -839,12 +839,13 @@ void amf_n1::registration_request_handle(
nc.get()->amf_ue_ngap_id = amf_ue_ngap_id; nc.get()->amf_ue_ngap_id = amf_ue_ngap_id;
nc.get()->serving_network = snn; nc.get()->serving_network = snn;
// Update UE conext // Update UE context
if (uc.get() != nullptr) { if (uc.get() != nullptr) {
std::string supi = "imsi-" + nc.get()->imsi; std::string supi = "imsi-" + nc.get()->imsi;
uc.get()->supi = supi; uc.get()->supi = supi;
// associate SUPI with UC // associate SUPI with UC
amf_app_inst->set_supi_2_ue_context(supi, uc); amf_app_inst->set_supi_2_ue_context(supi, uc);
Logger::amf_n1().debug("Update UC context, SUPI %s", supi.c_str());
} }
// Check 5GS_Registration_type IE (Mandatory IE) // Check 5GS_Registration_type IE (Mandatory IE)
......
...@@ -238,7 +238,8 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) { ...@@ -238,7 +238,8 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
if (!uc.get()->find_pdu_session_context(smf.pdu_sess_id, psc)) { if (!uc.get()->find_pdu_session_context(smf.pdu_sess_id, psc)) {
psc = std::shared_ptr<pdu_session_context>(new pdu_session_context()); psc = std::shared_ptr<pdu_session_context>(new pdu_session_context());
uc.get()->add_pdu_session_context(smf.pdu_sess_id, psc); uc.get()->add_pdu_session_context(smf.pdu_sess_id, psc);
set_supi_to_pdu_ctx(supi, psc); //TODO: should be removed set_supi_to_pdu_ctx(supi, psc); // TODO: should be removed
Logger::amf_n11().debug("Create a PDU Session Context");
} }
pduid2supi[smf.pdu_sess_id] = supi; pduid2supi[smf.pdu_sess_id] = supi;
...@@ -402,7 +403,10 @@ void amf_n11::handle_pdu_session_initial_request( ...@@ -402,7 +403,10 @@ void amf_n11::handle_pdu_session_initial_request(
psc.get()->plmn.mnc; psc.get()->plmn.mnc;
pdu_session_establishment_request["anType"] = "3GPP_ACCESS"; // TODO pdu_session_establishment_request["anType"] = "3GPP_ACCESS"; // TODO
pdu_session_establishment_request["smContextStatusUri"] = pdu_session_establishment_request["smContextStatusUri"] =
"smContextStatusUri"; "http://" +
std::string(inet_ntoa(*((struct in_addr*) &amf_cfg.n11.addr4))) +
"/nsmf-pdusession/callback/" + supi + "/" +
std::to_string(psc.get()->pdu_session_id);
pdu_session_establishment_request["n1MessageContainer"]["n1MessageClass"] = pdu_session_establishment_request["n1MessageContainer"]["n1MessageClass"] =
"SM"; "SM";
......
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