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
516f67d2
Commit
516f67d2
authored
Sep 15, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue to tranfer PDU Session Reject to UE
parent
1aa6fa64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
5 deletions
+58
-5
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
.../amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
+58
-5
No files found.
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
View file @
516f67d2
...
...
@@ -54,14 +54,67 @@ void N1N2MessageCollectionDocumentApiImpl::n1_n2_message_transfer(
Logger
::
amf_server
().
debug
(
"Receive N1N2MessageTransfer Request, handling..."
);
Logger
::
amf_server
().
debug
(
"Receive N1N2MessageTransfer Request, handling..."
);
nlohmann
::
json
response_json
=
{};
response_json
[
"cause"
]
=
n1_n2_message_transfer_cause_e2str
[
N1_N2_TRANSFER_INITIATED
];
Pistache
::
Http
::
Code
code
=
Pistache
::
Http
::
Code
::
Ok
;
std
::
string
supi
=
ueContextId
;
Logger
::
amf_server
().
debug
(
"Key for PDU Session context: SUPI (%s)"
,
supi
.
c_str
());
std
::
shared_ptr
<
pdu_session_context
>
psc
;
if
(
!
amf_app_inst
->
find_pdu_session_context
(
supi
,
(
uint8_t
)
n1N2MessageTransferReqData
.
getPduSessionId
(),
psc
))
{
Logger
::
amf_server
().
error
(
"Cannot get pdu_session_context with SUPI (%s)"
,
supi
.
c_str
());
}
bstring
n1sm
=
nullptr
;
conv
::
msg_str_2_msg_hex
(
n1sm_str
,
n1sm
);
conv
::
msg_str_2_msg_hex
(
n1sm_str
.
substr
(
0
,
n1sm_str
.
length
()),
n1sm
);
// TODO: verify n1sm_length
comUt
::
print_buffer
(
"amf_server"
,
"Received N1 SM"
,
(
uint8_t
*
)
bdata
(
n1sm
),
blength
(
n1sm
));
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"N1N2MessageCollectionDocumentApiImpl::n1_n2_message_transfer API has "
"not been implemented yet!"
);
psc
->
n1sm
=
bstrcpy
(
n1sm
);
psc
->
is_n1sm_avaliable
=
true
;
psc
->
is_n2sm_avaliable
=
false
;
auto
itti_msg
=
std
::
make_shared
<
itti_n1n2_message_transfer_request
>
(
AMF_SERVER
,
TASK_AMF_APP
);
itti_msg
->
supi
=
ueContextId
;
itti_msg
->
n1sm
=
bstrcpy
(
n1sm
);
itti_msg
->
is_n1sm_set
=
true
;
itti_msg
->
n2sm
=
nullptr
;
itti_msg
->
is_n2sm_set
=
false
;
itti_msg
->
pdu_session_id
=
(
uint8_t
)
n1N2MessageTransferReqData
.
getPduSessionId
();
// For Paging
if
(
n1N2MessageTransferReqData
.
ppiIsSet
())
{
itti_msg
->
is_ppi_set
=
true
;
itti_msg
->
ppi
=
n1N2MessageTransferReqData
.
getPpi
();
response_json
[
"cause"
]
=
n1_n2_message_transfer_cause_e2str
[
ATTEMPTING_TO_REACH_UE
];
code
=
Pistache
::
Http
::
Code
::
Accepted
;
}
else
{
itti_msg
->
is_ppi_set
=
false
;
}
// Send response to the NF Service Consumer (e.g., SMF)
response
.
send
(
code
,
response_json
.
dump
().
c_str
());
// Process N1N2 Message Transfer Request
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_server
().
error
(
"Could not send ITTI message %s to task TASK_AMF_N2"
,
itti_msg
->
get_msg_name
());
}
bdestroy_wrapper
(
&
n1sm
);
}
...
...
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