Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
99151114
Unverified
Commit
99151114
authored
Sep 29, 2022
by
Karim Boutiba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix supi in location report
parent
7e481ee8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
51 deletions
+66
-51
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+66
-51
No files found.
src/amf-app/amf_n1.cpp
View file @
99151114
...
...
@@ -786,7 +786,7 @@ void amf_n1::identity_response_handle(
Logger
::
amf_n1
().
debug
(
"Signal the UE Registration State Event notification for SUPI %s"
,
supi
.
c_str
());
event_sub
.
ue_registration_state
(
supi
,
_5GMM_COMMON_PROCEDURE_INITIATED
,
1
);
//
event_sub.ue_registration_state(supi, _5GMM_COMMON_PROCEDURE_INITIATED, 1);
// TODO: Trigger UE Location Report
run_registration_procedure
(
nc
);
...
...
@@ -1355,56 +1355,6 @@ void amf_n1::registration_request_handle(
"No Optional NAS Container inside Registration Request message"
);
}
// Trigger UE Location Report
std
::
shared_ptr
<
ue_ngap_context
>
unc
=
{};
if
(
!
amf_n2_inst
->
is_ran_ue_id_2_ue_ngap_context
(
ran_ue_ngap_id
,
unc
))
{
Logger
::
amf_n1
().
warn
(
"No UE NGAP context with ran_ue_ngap_id ("
GNB_UE_NGAP_ID_FMT
")"
,
ran_ue_ngap_id
);
}
else
{
std
::
shared_ptr
<
gnb_context
>
gc
=
{};
if
(
!
amf_n2_inst
->
is_assoc_id_2_gnb_context
(
unc
->
gnb_assoc_id
,
gc
))
{
Logger
::
amf_n1
().
error
(
"No existed gNB context with assoc_id (%d)"
,
unc
->
gnb_assoc_id
);
}
else
{
oai
::
amf
::
model
::
UserLocation
user_location
=
{};
oai
::
amf
::
model
::
NrLocation
nr_location
=
{};
oai
::
amf
::
model
::
Tai
tai
=
{};
nlohmann
::
json
tai_json
=
{};
tai_json
[
"plmnId"
][
"mcc"
]
=
uc
->
cgi
.
mcc
;
tai_json
[
"plmnId"
][
"mnc"
]
=
uc
->
cgi
.
mnc
;
tai_json
[
"tac"
]
=
std
::
to_string
(
uc
->
tai
.
tac
);
nlohmann
::
json
global_ran_node_id_json
=
{};
global_ran_node_id_json
[
"plmnId"
][
"mcc"
]
=
uc
->
cgi
.
mcc
;
global_ran_node_id_json
[
"plmnId"
][
"mnc"
]
=
uc
->
cgi
.
mnc
;
global_ran_node_id_json
[
"gNbId"
][
"bitLength"
]
=
32
;
global_ran_node_id_json
[
"gNbId"
][
"gNBValue"
]
=
std
::
to_string
(
gc
->
globalRanNodeId
);
oai
::
amf
::
model
::
GlobalRanNodeId
global_ran_node_id
=
{};
try
{
from_json
(
tai_json
,
tai
);
from_json
(
global_ran_node_id_json
,
global_ran_node_id
);
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_n1
().
error
(
"Exception with Json: %s"
,
e
.
what
());
return
;
}
// uc->cgi.nrCellID;
nr_location
.
setTai
(
tai
);
nr_location
.
setGlobalGnbId
(
global_ran_node_id
);
user_location
.
setNrLocation
(
nr_location
);
// Trigger UE Location Report
string
supi
=
uc
->
supi
;
Logger
::
amf_n1
().
debug
(
"Signal the UE Location Report Event notification for SUPI %s"
,
supi
.
c_str
());
event_sub
.
ue_location_report
(
supi
,
user_location
,
1
);
}
}
// Store NAS information into nas_context
// Run the corresponding registration procedure
...
...
@@ -2627,6 +2577,71 @@ void amf_n1::security_mode_complete_handle(
set_5gmm_state
(
nc
,
_5GMM_REGISTERED
);
stacs
.
display
();
// Trigger UE location Status Notify
// Find UE context
std
::
shared_ptr
<
ue_ngap_context
>
unc
=
{};
if
(
!
amf_n2_inst
->
is_ran_ue_id_2_ue_ngap_context
(
ran_ue_ngap_id
,
unc
))
{
Logger
::
amf_n1
().
warn
(
"No UE NGAP context with ran_ue_ngap_id ("
GNB_UE_NGAP_ID_FMT
")"
,
ran_ue_ngap_id
);
}
else
{
std
::
shared_ptr
<
gnb_context
>
gc
=
{};
if
(
!
amf_n2_inst
->
is_assoc_id_2_gnb_context
(
unc
->
gnb_assoc_id
,
gc
))
{
Logger
::
amf_n1
().
error
(
"No existed gNB context with assoc_id (%d)"
,
unc
->
gnb_assoc_id
);
}
else
{
oai
::
amf
::
model
::
UserLocation
user_location
=
{};
oai
::
amf
::
model
::
NrLocation
nr_location
=
{};
oai
::
amf
::
model
::
Tai
tai
=
{};
nlohmann
::
json
tai_json
=
{};
tai_json
[
"plmnId"
][
"mcc"
]
=
uc
->
cgi
.
mcc
;
tai_json
[
"plmnId"
][
"mnc"
]
=
uc
->
cgi
.
mnc
;
tai_json
[
"tac"
]
=
std
::
to_string
(
uc
->
tai
.
tac
);
nlohmann
::
json
global_ran_node_id_json
=
{};
global_ran_node_id_json
[
"plmnId"
][
"mcc"
]
=
uc
->
cgi
.
mcc
;
global_ran_node_id_json
[
"plmnId"
][
"mnc"
]
=
uc
->
cgi
.
mnc
;
global_ran_node_id_json
[
"gNbId"
][
"bitLength"
]
=
32
;
global_ran_node_id_json
[
"gNbId"
][
"gNBValue"
]
=
std
::
to_string
(
gc
->
globalRanNodeId
);
oai
::
amf
::
model
::
GlobalRanNodeId
global_ran_node_id
=
{};
try
{
from_json
(
tai_json
,
tai
);
from_json
(
global_ran_node_id_json
,
global_ran_node_id
);
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_n1
().
error
(
"Exception with Json: %s"
,
e
.
what
());
return
;
}
// uc->cgi.nrCellID;
nr_location
.
setTai
(
tai
);
nr_location
.
setGlobalGnbId
(
global_ran_node_id
);
user_location
.
setNrLocation
(
nr_location
);
// Trigger UE Location Report
string
supi
=
uc
->
supi
;
Logger
::
amf_n1
().
debug
(
"Signal the UE Location Report Event notification for SUPI %s"
,
supi
.
c_str
());
event_sub
.
ue_location_report
(
supi
,
user_location
,
1
);
}
}
// Trigger UE Registration Status Notify
string
supi
=
"imsi-"
+
nc
->
imsi
;
Logger
::
amf_n1
().
debug
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment