Skip to main content

OmniAMF Operations

1. Component Overview

OmniAMF is the Access and Mobility Management Function (AMF) for the Omnitouch 5G core. It is the anchor point for all UE signalling over both the N1 interface (NAS, via NGAP/SCTP from gNBs) and the N2 interface (NGAP). OmniAMF manages UE registration, authentication orchestration, session continuity, and inter-NF communication via the SBI.

2. 3GPP Role and Spec References

AspectReference
AMF functional definitionTS 23.501 Section 6.2.1
Registration procedureTS 23.502 Section 4.2.2.2, TS 24.501 Section 5.5.1
Authentication (5G-AKA)TS 33.501 Section 6.1.3, TS 29.509
Security Mode ControlTS 24.501 Section 5.4.2
Deregistration procedureTS 23.502 Section 4.2.2.3, TS 24.501 Section 5.5.2
Service Request procedureTS 23.502 Section 4.2.3, TS 24.501 Section 5.6.1
Namf_Communication serviceTS 29.518
Namf_EventExposure serviceTS 29.518
NGAP / N2 interfaceTS 38.413
NGAP transport (SCTP)TS 38.412
UDM interfaces (N8, N10)TS 29.503
AUSF interface (N12)TS 29.509
SMF interface (N11)TS 29.502
NAS message codingTS 24.501 Section 8
Key derivationTS 33.501 Annex A
5GMM timersTS 24.501 Section 10.2

3. SBI Endpoints

All endpoints are HTTP/1.1 with Content-Type: application/json.

Namf_Communication (TS 29.518)

MethodPathDescriptionSuccess
POST/namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messagesN1N2 message transfer from SMF200 OK
POST/namf-comm/v1/ue-contexts/{ueContextId}/transferUE context transfer (inter-AMF)200 OK
POST/namf-comm/v1/ue-contexts/{ueContextId}/assign-ebiEPS Bearer ID assignment200 OK
POST/namf-comm/v1/non-ue-n2-messages/transferNon-UE N2 message transfer (e.g. PWS)200 OK

Namf_EventExposure (TS 29.518)

MethodPathDescriptionSuccess
POST/namf-evts/v1/subscriptionsSubscribe to AMF events201 Created
DELETE/namf-evts/v1/subscriptions/{subscriptionId}Unsubscribe204 No Content

N2 / NGAP (non-SBI)

TransportAddressDescription
SCTP{ngap_addr}:{ngap_port} (default 0.0.0.0:38412)NGAP messages from gNBs, PPID 60 per TS 38.412

4. Configuration Reference

OmniAMF is configured via Elixir application environment under the :omniamf key.

Example Configuration

config :omniamf,
sbi_scheme: "http",
sbi_addr: "127.0.0.5",
sbi_port: 7777,
nrf_uri: "http://127.0.0.10:7777",
ausf_uri: "http://127.0.0.19:7777",
udm_uri: "http://127.0.0.12:7777",
smf_uri: "http://127.0.0.4:7777",
nssf_uri: "http://127.0.0.14:7777",
mcc: "999",
mnc: "70",
heartbeat_interval: 10_000,
amf_id: %{region_id: 2, set_id: 1, pointer: 0},
amf_name: "OmniAMF",
ngap_addr: "0.0.0.0",
ngap_port: 38412

Parameter Table

ParameterTypeDefaultDescription
sbi_schemestring"http"URI scheme for the SBI HTTP server
sbi_addrstring"127.0.0.5"IP address the SBI HTTP server binds to
sbi_portinteger7777TCP port the SBI HTTP server listens on
nrf_uristring"http://127.0.0.10:7777"Base URI of the NRF for NF registration and discovery
ausf_uristring"http://127.0.0.19:7777"Base URI of the standalone AUSF (OmniAUSF) for authentication (Nausf_UEAuthentication). Previously pointed to co-located AUSF in OmniUDM; now points to the separate OmniAUSF NF
udm_uristring"http://127.0.0.12:7777"Base URI of the UDM for subscriber data and UE context management
smf_uristring"http://127.0.0.4:7777"Base URI of the SMF for PDU session creation and release
nssf_uristring"http://127.0.0.14:7777"Base URI of the NSSF for network slice selection
mccstring"999"Mobile Country Code for the serving PLMN
mncstring"70"Mobile Network Code for the serving PLMN
heartbeat_intervalinteger (ms)10000Interval at which the AMF sends NRF heartbeat PATCH requests
amf_idmap%{region_id: 2, set_id: 1, pointer: 0}AMF identifier components. region_id (8 bits), set_id (10 bits), and pointer (6 bits) form the 24-bit AMF Identifier used in GUAMI and GUTI allocation
amf_namestring"OmniAMF"AMF name registered in the NRF NFProfile
ngap_addrstring"0.0.0.0"IP address the SCTP/NGAP listener binds to. Use a specific interface address to restrict gNB access
ngap_portinteger38412SCTP port for NGAP. Per TS 38.412, the well-known port is 38412

5. Key Procedures

5.1 Initial UE Registration

5.2 UE-Initiated Deregistration

5.3 N1N2 Message Transfer (SMF to UE via AMF)

5.4 5GMM Timer Reference

These timers run per UE context within the GMM state machine (TS 24.501 Section 10.2).

TimerDurationTriggerAction on Expiry
T351254 min (sent to UE)Sent in Registration AcceptUE initiates periodic registration update
T35506 sRegistration Accept sentRetransmit Registration Accept (max 4 retries)
T35606 sAuth Request / SMC sentRetransmit Auth Request or SMC (max 4 retries)
T35706 sIdentity Request sentRetransmit Identity Request (max 4 retries)
T35136 sPaging initiatedRetransmit paging (max 4 retries), then notify paging failure
T35226 sNetwork Deregistration Request sentRetransmit Deregistration Request (max 4 retries)
T35556 sConfig Update Command sentRetransmit Config Update Command (max 4 retries)
Mobile Reachable58 min (T3512 + 4 min)UE enters CM-IDLEStart Implicit Deregistration timer
Implicit Deregistration58 minMobile Reachable expiresImplicitly deregister UE, release sessions

6. Prometheus Metrics

NAS / Registration Metrics

MetricTypeTagsDescription
omni_amf.registration.requests.countcountertypeRegistration requests by type
omni_amf.registrations.totalcounterresultTotal UE registrations by result
omni_amf.auth.requests.countcountersuciAuthentication requests by SUCI
omni_amf.authentications.totalcounterresultTotal authentication procedures by result
omni_amf.service_requests.totalcounterresultTotal service requests
omni_amf.pdu_session.requests.countcountersupi, pdu_session_idPDU session requests by subscriber
omni_amf.pdu_session_requests.totalcounterresultTotal PDU session establishment requests

NGAP / SCTP Metrics

MetricTypeTagsDescription
omni_amf.ngap_messages.totalcounterprocedureTotal NGAP messages by procedure
omni_amf.sctp_associations.countgauge--Number of active SCTP associations

UE State Metrics

MetricTypeTagsDescription
omni_amf.connected_ues.countgauge--Number of connected UEs
omni_amf.cm_connected_ues.countgauge--Number of UEs in CM-CONNECTED state

SBI / NRF Metrics

MetricTypeTagsDescription
omni_amf.nrf.registration.statusgaugenf_typeNRF registration status (1=registered, 0=not)

BEAM VM Metrics

MetricTypeDescription
beam.memory.totalgaugeTotal BEAM memory in bytes
beam.memory.processesgaugeMemory used by Erlang processes
beam.memory.processes_usedgaugeMemory actually used by processes
beam.memory.systemgaugeSystem memory (ETS, atoms, code)
beam.memory.atomgaugeTotal atom memory
beam.memory.atom_usedgaugeUsed atom memory
beam.memory.binarygaugeBinary memory
beam.memory.codegaugeCode memory
beam.memory.etsgaugeETS table memory
beam.processes.countgaugeNumber of Erlang processes
beam.ports.countgaugeNumber of Erlang ports
beam.atom.countgaugeNumber of atoms
beam.vm.uptimegaugeVM uptime in seconds

7. Known Limitations

IDAreaDescription
AMF-C3AuthenticationHRES* local verification (SHA-256 of RAND‖RES*) is not performed before forwarding resStar to AUSF. The AMF relies entirely on AUSF's authResult field
AMF-C4NAS securityNAS integrity protection and ciphering are not applied to outgoing NAS PDUs. The Security Mode Command selects NEA0 (null ciphering) and NIA2, but NAS PDUs are not MAC-protected or ciphered in the NGAP transport
AMF-C6PagingPaging NGAP messages are built (build_paging) but not sent over the SCTP association. Paging is logged only
AMF-C7HandoverHandover state is tracked in the UE context but NGAP Handover Required / Handover Request messages are not sent
AMF-H2Registration RejectRegistration Reject NAS messages are not sent to the UE on authentication failure or other rejection causes
AMF-H4PCF AM policyNo PCF AM Policy Association Create (Npcf_AMPolicyControl) call is made during registration
AMF-H5Allowed NSSAIAllowed NSSAI returned to the UE in Registration Accept is the default NSSAI from UDM without intersecting against the AMF's served NSSAI
AMF-H7Auth resyncAuthentication failure containing AUTS (SQN resynchronization per TS 33.501 Section 6.1.3.4) is not handled. The AMF does not pass resynchronizationInfo to AUSF on retry
AMF-H8NAS algorithmsNAS security algorithms are hardcoded to NEA0 (null ciphering) and NIA2 regardless of UE capabilities
AMF-H9Registration Status UpdatePOST /namf-comm/v1/ue-contexts/{id}/registration-status-update is not routed in the SBI router
AMF-H10PDU session paramsPDU session establishment uses hardcoded values: pduSessionId=1, sst=1, dnn="internet" rather than values negotiated in the NAS PDU Session Establishment Request
AMF-H11PDU Session Resource SetupPDUSessionResourceSetupRequest NGAP message is not sent to the gNB after SMF creates the SM context
AMF-H12NG Setup validationNG Setup Request is accepted without validating TAC, PLMN list, or slice support against AMF configuration
AMF-H13Target gNB resolutionDuring handover, target gNB resolution returns the first registered gNB rather than selecting based on TAI
AMF-H16NH derivationNext Hop (NH) and NCC are never computed. nh in the UE context remains nil
AMF-M1N1N2 response codeN1N2 Message Transfer returns 200 OK instead of 202 Accepted when paging is initiated (CM-IDLE case)
AMF-M14NRF discoveryNF URIs for AUSF, UDM, SMF, and NSSF are static configuration values. No NRF discovery (Nnrf_NFDiscovery) is performed

8. Troubleshooting

gNB cannot connect (SCTP connection refused)

Verify ngap_addr and ngap_port configuration. Confirm that the host firewall permits SCTP on port 38412. The AMF logs [SCTP] NGAP listener active on {addr}:{port} on successful startup. If the log shows Failed to open SCTP socket, another process may be holding the port or SCTP kernel support is missing.

UE registration fails at authentication step

Check reachability of the configured ausf_uri. The AMF logs [NAS] AUSF auth failed with status {n} on HTTP error responses. If AUSF returns 404, the subscriber IMSI may not exist in the HSS/UDR backend.

UE authentication succeeds but registration does not complete

After Security Mode Complete, the AMF calls UDM for AM data, NSSAI, and SMF selection data in sequence. A timeout on any of these calls will stall the registration. Check udm_uri reachability and UDM logs. The AMF logs [NAS] Failed to fetch AM data for {supi} or similar on failure.

N1N2 message from SMF is not delivered to UE

If the UE is CM-IDLE, check that paging is reaching gNBs (note AMF-C6: paging NGAP is currently not sent over SCTP). If the UE is CM-CONNECTED, verify the gnb_assoc_id, amf_ue_ngap_id, and ran_ue_ngap_id are populated in the UE context. These are set during NGAP Initial UE Message processing.

UE context not found for incoming SBI request

SBI endpoints identify UEs by SUPI (e.g. imsi-999700000000001). If the UE has not completed registration, the context keyed by SUPI will not exist. During authentication the context is keyed by SUCI; it is promoted to SUPI on authentication confirmation. Ensure the ueContextId path parameter exactly matches the SUPI stored in the context.

Periodic registration update not received

The T3512 timer value sent in Registration Accept is 54 minutes. If periodic updates are expected sooner, this timer value is currently hardcoded in build_registration_accept and cannot be configured at runtime.