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
| Aspect | Reference |
|---|
| AMF functional definition | TS 23.501 Section 6.2.1 |
| Registration procedure | TS 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 Control | TS 24.501 Section 5.4.2 |
| Deregistration procedure | TS 23.502 Section 4.2.2.3, TS 24.501 Section 5.5.2 |
| Service Request procedure | TS 23.502 Section 4.2.3, TS 24.501 Section 5.6.1 |
| Namf_Communication service | TS 29.518 |
| Namf_EventExposure service | TS 29.518 |
| NGAP / N2 interface | TS 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 coding | TS 24.501 Section 8 |
| Key derivation | TS 33.501 Annex A |
| 5GMM timers | TS 24.501 Section 10.2 |
3. SBI Endpoints
All endpoints are HTTP/1.1 with Content-Type: application/json.
Namf_Communication (TS 29.518)
| Method | Path | Description | Success |
|---|
| POST | /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages | N1N2 message transfer from SMF | 200 OK |
| POST | /namf-comm/v1/ue-contexts/{ueContextId}/transfer | UE context transfer (inter-AMF) | 200 OK |
| POST | /namf-comm/v1/ue-contexts/{ueContextId}/assign-ebi | EPS Bearer ID assignment | 200 OK |
| POST | /namf-comm/v1/non-ue-n2-messages/transfer | Non-UE N2 message transfer (e.g. PWS) | 200 OK |
Namf_EventExposure (TS 29.518)
| Method | Path | Description | Success |
|---|
| POST | /namf-evts/v1/subscriptions | Subscribe to AMF events | 201 Created |
| DELETE | /namf-evts/v1/subscriptions/{subscriptionId} | Unsubscribe | 204 No Content |
N2 / NGAP (non-SBI)
| Transport | Address | Description |
|---|
| 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
| Parameter | Type | Default | Description |
|---|
sbi_scheme | string | "http" | URI scheme for the SBI HTTP server |
sbi_addr | string | "127.0.0.5" | IP address the SBI HTTP server binds to |
sbi_port | integer | 7777 | TCP port the SBI HTTP server listens on |
nrf_uri | string | "http://127.0.0.10:7777" | Base URI of the NRF for NF registration and discovery |
ausf_uri | string | "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_uri | string | "http://127.0.0.12:7777" | Base URI of the UDM for subscriber data and UE context management |
smf_uri | string | "http://127.0.0.4:7777" | Base URI of the SMF for PDU session creation and release |
nssf_uri | string | "http://127.0.0.14:7777" | Base URI of the NSSF for network slice selection |
mcc | string | "999" | Mobile Country Code for the serving PLMN |
mnc | string | "70" | Mobile Network Code for the serving PLMN |
heartbeat_interval | integer (ms) | 10000 | Interval at which the AMF sends NRF heartbeat PATCH requests |
amf_id | map | %{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_name | string | "OmniAMF" | AMF name registered in the NRF NFProfile |
ngap_addr | string | "0.0.0.0" | IP address the SCTP/NGAP listener binds to. Use a specific interface address to restrict gNB access |
ngap_port | integer | 38412 | SCTP 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).
| Timer | Duration | Trigger | Action on Expiry |
|---|
| T3512 | 54 min (sent to UE) | Sent in Registration Accept | UE initiates periodic registration update |
| T3550 | 6 s | Registration Accept sent | Retransmit Registration Accept (max 4 retries) |
| T3560 | 6 s | Auth Request / SMC sent | Retransmit Auth Request or SMC (max 4 retries) |
| T3570 | 6 s | Identity Request sent | Retransmit Identity Request (max 4 retries) |
| T3513 | 6 s | Paging initiated | Retransmit paging (max 4 retries), then notify paging failure |
| T3522 | 6 s | Network Deregistration Request sent | Retransmit Deregistration Request (max 4 retries) |
| T3555 | 6 s | Config Update Command sent | Retransmit Config Update Command (max 4 retries) |
| Mobile Reachable | 58 min (T3512 + 4 min) | UE enters CM-IDLE | Start Implicit Deregistration timer |
| Implicit Deregistration | 58 min | Mobile Reachable expires | Implicitly deregister UE, release sessions |
6. Prometheus Metrics
NAS / Registration Metrics
| Metric | Type | Tags | Description |
|---|
omni_amf.registration.requests.count | counter | type | Registration requests by type |
omni_amf.registrations.total | counter | result | Total UE registrations by result |
omni_amf.auth.requests.count | counter | suci | Authentication requests by SUCI |
omni_amf.authentications.total | counter | result | Total authentication procedures by result |
omni_amf.service_requests.total | counter | result | Total service requests |
omni_amf.pdu_session.requests.count | counter | supi, pdu_session_id | PDU session requests by subscriber |
omni_amf.pdu_session_requests.total | counter | result | Total PDU session establishment requests |
NGAP / SCTP Metrics
| Metric | Type | Tags | Description |
|---|
omni_amf.ngap_messages.total | counter | procedure | Total NGAP messages by procedure |
omni_amf.sctp_associations.count | gauge | -- | Number of active SCTP associations |
UE State Metrics
| Metric | Type | Tags | Description |
|---|
omni_amf.connected_ues.count | gauge | -- | Number of connected UEs |
omni_amf.cm_connected_ues.count | gauge | -- | Number of UEs in CM-CONNECTED state |
SBI / NRF Metrics
| Metric | Type | Tags | Description |
|---|
omni_amf.nrf.registration.status | gauge | nf_type | NRF registration status (1=registered, 0=not) |
BEAM VM Metrics
| Metric | Type | Description |
|---|
beam.memory.total | gauge | Total BEAM memory in bytes |
beam.memory.processes | gauge | Memory used by Erlang processes |
beam.memory.processes_used | gauge | Memory actually used by processes |
beam.memory.system | gauge | System memory (ETS, atoms, code) |
beam.memory.atom | gauge | Total atom memory |
beam.memory.atom_used | gauge | Used atom memory |
beam.memory.binary | gauge | Binary memory |
beam.memory.code | gauge | Code memory |
beam.memory.ets | gauge | ETS table memory |
beam.processes.count | gauge | Number of Erlang processes |
beam.ports.count | gauge | Number of Erlang ports |
beam.atom.count | gauge | Number of atoms |
beam.vm.uptime | gauge | VM uptime in seconds |
7. Known Limitations
| ID | Area | Description |
|---|
| AMF-C3 | Authentication | HRES* 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-C4 | NAS security | NAS 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-C6 | Paging | Paging NGAP messages are built (build_paging) but not sent over the SCTP association. Paging is logged only |
| AMF-C7 | Handover | Handover state is tracked in the UE context but NGAP Handover Required / Handover Request messages are not sent |
| AMF-H2 | Registration Reject | Registration Reject NAS messages are not sent to the UE on authentication failure or other rejection causes |
| AMF-H4 | PCF AM policy | No PCF AM Policy Association Create (Npcf_AMPolicyControl) call is made during registration |
| AMF-H5 | Allowed NSSAI | Allowed NSSAI returned to the UE in Registration Accept is the default NSSAI from UDM without intersecting against the AMF's served NSSAI |
| AMF-H7 | Auth resync | Authentication 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-H8 | NAS algorithms | NAS security algorithms are hardcoded to NEA0 (null ciphering) and NIA2 regardless of UE capabilities |
| AMF-H9 | Registration Status Update | POST /namf-comm/v1/ue-contexts/{id}/registration-status-update is not routed in the SBI router |
| AMF-H10 | PDU session params | PDU session establishment uses hardcoded values: pduSessionId=1, sst=1, dnn="internet" rather than values negotiated in the NAS PDU Session Establishment Request |
| AMF-H11 | PDU Session Resource Setup | PDUSessionResourceSetupRequest NGAP message is not sent to the gNB after SMF creates the SM context |
| AMF-H12 | NG Setup validation | NG Setup Request is accepted without validating TAC, PLMN list, or slice support against AMF configuration |
| AMF-H13 | Target gNB resolution | During handover, target gNB resolution returns the first registered gNB rather than selecting based on TAI |
| AMF-H16 | NH derivation | Next Hop (NH) and NCC are never computed. nh in the UE context remains nil |
| AMF-M1 | N1N2 response code | N1N2 Message Transfer returns 200 OK instead of 202 Accepted when paging is initiated (CM-IDLE case) |
| AMF-M14 | NRF discovery | NF 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.