Skip to main content

OmniSMF

OmniSMF implements the Session Management Function (SMF) of the 5G Core. The SMF owns the full lifecycle of PDU sessions: UE IP address allocation, policy association, user-plane programming and teardown. It anchors the N4 (PFCP) interface toward the UPF, the N7 interface toward the PCF, the N10 interface toward the UDM, the N11 interface toward the AMF, and the N40 (Nchf) converged-charging interface toward the CHF, and it also serves an internal N26 interworking path toward the standalone PGW-C for 4G/5G mobility.

Each PDU session is managed by a dedicated session worker process under a dynamic supervisor (process-per-session model). All session state (QoS flows, PFCP context, UE IP, user-plane connection state) is owned by that worker, so one session failing does not affect others. Outbound SBI calls are made to static URIs configured at start-up; the SMF registers with the NRF and sends heartbeats, but does not perform NRF-based discovery for its outbound calls.

Documentation

  • Operations Guide - 3GPP role, SBI and N4 interfaces, and the key PDU session establishment, modification, release, service-request and N26 interworking procedures with sequence diagrams.
  • Configuration Reference - Full runtime configuration reference, parameter tables, UE IP pool and PCO/P-CSCF configuration, management/OAM API, and logging.
  • Metrics - Prometheus metrics for PDU sessions, PFCP/UPF, NRF registration, and BEAM VM health, with example PromQL.
  • Troubleshooting - Common issues and their resolutions.

Architecture Overview

Features Overview

  • PDU session lifecycle: establishment, modification, release, and UE idle / Service Request UP reactivation, each session owned by a dedicated worker process.
  • DNN-aware UE IP pools with exact/regex/default matching, multiple IPv4/IPv6 ranges per DNN, random allocation, dedup, and leak-safe release on any worker exit.
  • Subscriber static IP honoured from the UDM/UDR and reserved against the pools.
  • PDU session type reconciliation: dual-stack requests served from a single-family pool are signalled as that family with the correct 5GSM cause (#50/#51).
  • P-CSCF / PCO for VoNR: DNS SRV discovery with SIP OPTIONS health checking plus static fallback; PCO parity with the 4G PGW-C.
  • Dedicated GBR QoS flows (5QI-1): static (provisioned) and dynamic (call-driven via PCF policy-notify) paths, plus post-establishment QoS-flow modification.
  • N4 / PFCP: association setup with heartbeats and full session establishment, modification, and deletion.
  • N40 / Nchf converged charging: acts as a charging consumer toward the CHF, opening a Charging Data Request when a PDU session is established, updating it during the session from N4 URR usage reports, and closing it on release. The CHF is resolved via NRF discovery with a static fallback URI. Disabled by default and enabled via configuration.
  • N26 EPS interworking: adopt/switch/lookup with UE IP preservation across 4G/5G.
  • Handover state handling: hoState transitions (PREPARING / PREPARED / COMPLETED / CANCELLED) with user-plane re-activation on completion.
  • Structured JSON logging with per-session metadata and a Prometheus metrics exporter.

Quick Start

OmniSMF reads its operator configuration from config/runtime.exs, which maps environment variables onto the :omnismf application environment.

import Config

config :omnismf,
sbi_addr: System.get_env("SBI_ADDR", "127.0.0.4"),
sbi_port: String.to_integer(System.get_env("SBI_PORT", "7777")),
udm_uri: System.get_env("UDM_URI", "http://127.0.0.12:7777"),
pcf_uri: System.get_env("PCF_URI", "http://127.0.0.13:7777"),
amf_uri: System.get_env("AMF_URI", "http://127.0.0.5:7777"),
upf_addr: System.get_env("UPF_ADDR", "10.179.1.24"),
upf_pfcp_port: String.to_integer(System.get_env("UPF_PFCP_PORT", "8805")),
pfcp_addr: System.get_env("PFCP_ADDR", "0.0.0.0"),
mcc: System.get_env("MCC", "999"),
mnc: System.get_env("MNC", "70"),
ue_ip_pool: [subnet_map: %{default: ["10.45.0.0/16"]}]

config :logger, :default_formatter,
format: {OmniLogger.JsonFormatter, :format},
metadata: :all

sbi_addr and pfcp_addr default to loopback / all-interfaces respectively. In any multi-host or containerised deployment, sbi_addr must be an address the AMF/PCF can reach, pfcp_addr must be routable from the UPF, and upf_addr must point at the UPF's PFCP endpoint, otherwise no PDU session can be established.

The full parameter reference, including every environment variable and default, lives in the Configuration Reference.