How omec-project/amf works
SD-Core AMF is a 5G-core control-plane function that terminates RAN N2 and UE NAS signaling, manages UE registration, security, mobility and reachability, and transports session-management messages. The principal flow begins at a RAN signaling event, passes through NGAP and NAS/GMM handling, consults shared UE context and external 5G-core services, then sends protocol responses back toward the RAN or UE. SBI APIs expose communication, mobile-terminated, location, event, and OAM capabilities. Sampled source supports key calls; README documents broader features whose detailed implementation was not sampled.
Main entry points: ngap/handler.go NGAP Handler · gmm/handler.go GMM Procedures · ue_context.go UE Context Producer · context.go AMF Context
Components 24
Signaling Protocols
- NGAP Handler
ngap/handler.go - NGAP Messages
ngap/message/build.go - NAS Handler
nas/handler.go - GMM Procedures
gmm/handler.go - NAS Security
nas/nas_security/security.go
UE State and Services
- AMF Context
context/context.go - UE Context
context/amf_ue.go - SM Context Client
consumer/sm_context.go - Authentication Client
consumer/ue_authentication.go - UE Management Client
consumer/ue_context_management.go
SBI and Management APIs
- Communication API
communication/routers.go - Mobile-Terminated API
mt/routers.go - Location API
location/routers.go - Event Exposure API
eventexposure/routers.go - OAM API
oam/routers.go - HTTP Callbacks
httpcallback/router.go - UE Context Producer
producer/ue_context.go
Runtime Operations
- Context Initialization
util/init_context.go - Network Config Polling
polling/nf_configuration.go - Metrics Export
metrics/telemetry.go - OpenTelemetry
tracing/tracing.go
Other components
- RAN
- SMF
- UDM / AUSF
Connections 25
- RAN → NGAP Handler: sends N2
- NGAP Handler → NAS Handler: dispatches NAS
- NGAP Handler → NGAP Messages: builds messages
ngap/handler.go - NGAP Handler → AMF Context: uses context
ngap/handler.go - NGAP Handler → SM Context Client: updates sessions
ngap/handler.go - NAS Handler → AMF Context: uses context
nas/handler.go - NAS Handler → NAS Security: decodes NAS
nas/handler.go - GMM Procedures → AMF Context: uses context
gmm/handler.go - GMM Procedures → SM Context Client: updates sessions
gmm/handler.go - GMM Procedures → Authentication Client: requests authentication
gmm/handler.go - GMM Procedures → NAS Security: protects NAS
gmm/handler.go - SM Context Client → SMF: sends SBI requests
consumer/sm_context.go - Authentication Client → UDM / AUSF: requests authentication
- UE Management Client → UDM / AUSF: uses SBI
- OAM API → UE Context Producer: purges UE state
- Location API → UE Context Producer: serves location
- UE Context Producer → AMF Context: uses UE context
producer/ue_context.go - Context Initialization → AMF Context: initializes context
util/init_context.go - Network Config Polling → Context Initialization: refreshes configuration
- Metrics Export → NGAP Handler: reports status
ngap/handler.go - Communication API → UE Management Client: uses SBI
- Mobile-Terminated API → UE Context Producer: handles MT services
- Event Exposure API → UE Context Producer: exposes events
- HTTP Callbacks → GMM Procedures: notifies procedures
- OpenTelemetry → SM Context Client: traces requests
consumer/sm_context.go