Skip to main content

Configuration Reference

← Back to Main Documentation

This document provides a comprehensive reference for all OmniSS7 configuration parameters.

Table of Contents

  1. Overview
  2. Where Configuration Lives
  3. Operational Mode Flags
  4. HLR Mode Parameters
  5. SMSc Mode Parameters
  6. STP Mode Parameters
  7. CAMEL Gateway Mode Parameters
  8. Global Title NAT Parameters
  9. M3UA Connection Parameters
  10. SCCP Subsystem Status
  11. Gateway Screening
  12. USSD Gateway Parameters
  13. Runtime / Supervision Flags
  14. Infrastructure Parameters
  15. Database Parameters
  16. Hardcoded Values

Overview

OmniSS7 supports four operational modes, selected entirely through configuration:

  • STP Mode - Signal Transfer Point for routing
  • HLR Mode - Home Location Register for subscriber management
  • SMSc Mode - SMS Center for message delivery
  • CAMEL GW Mode - CAMEL Gateway for intelligent call control

A single node may combine roles (for example HLR + SMSc) by enabling the relevant Operational Mode Flags.


Where Configuration Lives

OmniSS7 reads its configuration from two layers. Understanding which file owns a value determines where you change it on a deployed system.

FileRoleEdit on deployment?
config/config.exsDefault / compile-time configuration shipped with the release. Defines the control-panel pages, the :api_ex REST controllers, the logging formatter, and all baseline defaults.No — part of the build.
config/runtime.exs (in the repo)A 4-line test stub only. In the source tree it sets up nothing beyond the test environment.No.
config/runtime.exs (deployed)The per-deployment runtime configuration, deployed separately onto each server (typically rendered from an Ansible/Jinja template). This is where mode flags, GTs, point codes, M3UA peers, and API backends are set for a given site.Yes — this is the operator-facing file.

In short: examples in this document use config :omniss7, .... On a live node these go into the deployed config/runtime.exs. The config/runtime.exs committed to the repository is intentionally a stub used only by the automated test suite — do not mistake it for the production configuration.

All keys below are read via Application.get_env(:omniss7, ...) (or the relevant application) at runtime, so the defaults shown are the values used when a key is omitted.


Operational Mode Flags

Control which features are enabled.

ParameterTypeDefaultDescriptionModes
map_client_enabledBooleanfalseEnable MAP client and M3UA connectivityAll
hlr_mode_enabledBooleanfalseEnable HLR-specific featuresHLR
smsc_mode_enabledBooleanfalseEnable SMSc-specific featuresSMSc
cap_client_enabledBooleanfalseEnable CAP client for CAMEL operationsCAMEL GW
camelgw_mode_enabledBooleanfalseEnable CAMEL Gateway featuresCAMEL GW
ussd_gateway_enabledBooleanfalseEnable USSD Gateway (HTTP/JSON bridge)USSD GW

Example:

config :omniss7,
map_client_enabled: true,
hlr_mode_enabled: true,
smsc_mode_enabled: false

HLR Mode Parameters

Configuration for HLR (Home Location Register) mode.

HLR API Configuration

ParameterTypeDefaultRequiredDescription
hlr_api_base_urlString-YesBackend HLR API endpoint URL
hlr_api_status_pathString"/api/status"NoPath appended to hlr_api_base_url for the HLR-links health/status probe (used by the HLR Links page and the /hlr-links REST controller)
hlr_service_center_gt_addressString-YesHLR Global Title address returned in UpdateLocation responses
smsc_service_center_gt_addressString-YesSMSC GT address returned in SRI-for-SM responses

SSL verification: There is no hlr_api_verify_ssl key — it is not read anywhere in the code. TLS certificate verification for backend API calls is governed by the generic :api map's verify_ssl field (see API Backend SSL Verification).

Example:

config :omniss7,
hlr_api_base_url: "https://10.180.2.140:8443",
hlr_api_status_path: "/api/status",
hlr_service_center_gt_address: "55512341111",
smsc_service_center_gt_address: "55512341112"

AlertServiceCenter Configuration

When a subscriber performs UpdateLocation, the HLR sends alertServiceCenter messages to configured SMSc GTs to indicate the subscriber is now reachable.

ParameterTypeDefaultRequiredDescription
hlr_smsc_alert_gtsList of Strings[]NoList of SMSc Global Titles to send alertServiceCenter notifications
hlr_alert_location_expiry_secondsInteger172800NoLocation validity duration in seconds (default: 48 hours). Set to 0 to disable expiry.

Example:

config :omniss7,
hlr_smsc_alert_gts: [
"15559876543",
"15559876544"
],
hlr_alert_location_expiry_seconds: 172800 # 48 hours

MSISDN ↔ IMSI Mapping

Configuration for synthetic IMSI generation from MSISDNs. For detailed technical explanation of the mapping algorithm, see MSISDN ↔ IMSI Mapping in HLR Guide.

ParameterTypeDefaultRequiredDescription
hlr_imsi_plmn_prefixString"50557"NoPLMN prefix (MCC+MNC) for synthetic IMSI generation
hlr_msisdn_country_codeString"61"NoCountry code prefix for IMSI→MSISDN reverse mapping
hlr_msisdn_nsn_offsetInteger0NoOffset into MSISDN where NSN starts (typically length of country code)
hlr_msisdn_nsn_lengthInteger9NoLength of National Subscriber Number to extract from MSISDN

Example (2-digit country code):

config :omniss7,
hlr_imsi_plmn_prefix: "50557", # MCC 505 + MNC 57
hlr_msisdn_country_code: "99", # Example 2-digit country code
hlr_msisdn_nsn_offset: 2, # Skip 2-digit country code
hlr_msisdn_nsn_length: 9 # Extract 9-digit NSN

Example (3-digit country code):

config :omniss7,
hlr_imsi_plmn_prefix: "50557", # MCC 505 + MNC 57
hlr_msisdn_country_code: "999", # Example 3-digit country code
hlr_msisdn_nsn_offset: 3, # Skip 3-digit country code
hlr_msisdn_nsn_length: 8 # Extract 8-digit NSN

Important: Set nsn_offset to the length of your country code to properly extract the NSN. For example:

  • Country code "9" (1 digit) → nsn_offset: 1
  • Country code "99" (2 digits) → nsn_offset: 2
  • Country code "999" (3 digits) → nsn_offset: 3

InsertSubscriberData (ISD) Configuration

Configuration for subscriber provisioning data sent to VLRs during UpdateLocation. For detailed explanation of the ISD sequence and message flow, see InsertSubscriberData Configuration in HLR Guide.

ParameterTypeDefaultRequiredDescription
isd_network_access_modeAtom:packetAndCircuitNoNetwork access type: :packetAndCircuit, :packetOnly, or :circuitOnly
isd_send_ss_dataBooleantrueNoSend ISD #2 with Supplementary Services data
isd_send_call_barringBooleantrueNoSend ISD #3 with Call Barring data

Example:

config :omniss7,
isd_network_access_mode: :packetAndCircuit,
isd_send_ss_data: true,
isd_send_call_barring: true

CAMEL Configuration

Configuration for CAMEL-based intelligent call routing. For detailed explanation of CAMEL integration and service keys, see CAMEL Integration in HLR Guide.

ParameterTypeDefaultRequiredDescription
camel_service_keyInteger11_110NoCAMEL service key for SRI responses
camel_trigger_detection_pointAtom:termAttemptAuthorizedNoCAMEL trigger point: :termAttemptAuthorized, :tBusy, :tNoAnswer, :tAnswer
camel_gsmscf_gt_addressString(uses called GT)NoDefault gsmSCF Global Title for CAMEL responses (can be overridden by GT NAT)

Example:

config :omniss7,
camel_service_key: 11_110,
camel_trigger_detection_point: :termAttemptAuthorized

Home VLR Prefixes

Configuration for distinguishing home vs roaming subscribers. For detailed explanation of home/roaming detection and PRN operations, see Roaming Subscriber Handling in HLR Guide.

ParameterTypeDefaultRequiredDescription
home_vlr_prefixesList["5551231"]NoVLR GT prefixes considered "home" network

Example:

config :omniss7,
home_vlr_prefixes: ["5551231", "5551234"]

SMSc Mode Parameters

Configuration for SMS Center mode.

SMSc API Configuration

ParameterTypeDefaultRequiredDescription
smsc_api_base_urlString"https://10.5.198.200:8443"YesBackend SMSc API endpoint URL
smsc_api_status_pathString"/api/status"NoPath appended to smsc_api_base_url for the SMSc-links health/status probe (used by the SMSc Links page and the /smsc-links REST controller)
smsc_nameString"{hostname}_SMSc"NoSMSc identifier for backend registration
smsc_service_center_gt_addressString-YesService Center Global Title address

SSL verification: There is no smsc_api_verify_ssl key — it is not read anywhere in the code. TLS certificate verification for backend API calls is governed by the generic :api map's verify_ssl field (see API Backend SSL Verification).

Example:

config :omniss7,
smsc_api_base_url: "https://10.179.3.219:8443",
smsc_api_status_path: "/api/status",
smsc_name: "ipsmgw",
smsc_service_center_gt_address: "55512341112"

Note: Frontend registration occurs every 5 minutes (hardcoded) via SMS.FrontendRegistry module.

Auto-Flush Configuration

ParameterTypeDefaultRequiredDescription
auto_flush_enabledBooleantrueNoEnable automatic SMS queue processing
auto_flush_intervalInteger10_000NoQueue processing interval in milliseconds
auto_flush_dest_smscString-YesDestination SMSC name for auto-flush
auto_flush_tpsInteger10NoMessage processing rate (transactions/second)

Example:

config :omniss7,
auto_flush_enabled: true,
auto_flush_interval: 10_000,
auto_flush_dest_smsc: "ipsmgw",
auto_flush_tps: 10

STP Mode Parameters

Configuration for M3UA Signal Transfer Point mode. For detailed routing configuration and examples, see the STP Configuration Guide.

Standalone STP Server

ParameterTypeDefaultRequiredDescription
sctp_handler.enabledBooleanfalseNoEnable standalone SCTP SocketHandler server
sctp_handler.local_ipTuple or List{127, 0, 0, 1}NoIP address(es) to listen for connections. Single IP: {10, 0, 0, 1} or Multiple IPs for SCTP multihoming: [{10, 0, 0, 1}, {10, 0, 0, 2}]
sctp_handler.local_portInteger2905NoPort to listen on
sctp_handler.point_codeInteger-Yes (if enabled)This STP's own SS7 point code

Example (Single IP):

config :omniss7,
sctp_handler: %{
enabled: true,
local_ip: {10, 179, 4, 10},
local_port: 2905,
point_code: 100
}

Example (SCTP Multihoming):

config :omniss7,
sctp_handler: %{
enabled: true,
# Multiple IPs for redundancy
local_ip: [{10, 179, 4, 10}, {10, 179, 4, 11}],
local_port: 2905,
point_code: 100
}

Note: For detailed information on SCTP multihoming configuration and benefits, see SCTP Multihoming in Common Guide.

Global Title Routing

ParameterTypeDefaultRequiredDescription
enable_gt_routingBooleanfalseNoEnable GT routing in addition to PC routing

Example:

config :omniss7,
enable_gt_routing: true

M3UA/M2PA Peer Configuration

Peers are configured via the m3ua_peers list (supports both M3UA and M2PA protocols). For complete configuration examples, see the STP Configuration Guide and M2PA Protocol Support.

Common Peer Parameters:

ParameterTypeDefaultRequiredDescription
peer_idInteger-YesUnique peer identifier
nameString-YesDescriptive peer name
protocolAtom:m3uaNoProtocol type: :m3ua or :m2pa
roleAtom:clientNoConnection role: :client, :server, :asp, or :sgp
local_ipTuple or List-YesLocal IP address(es) for binding
local_portInteger-YesLocal SCTP port (M3UA: 2905, M2PA: 3565)
remote_ipTuple or List-YesRemote IP address(es)
remote_portInteger-YesRemote SCTP port
routing_contextInteger-NoM3UA routing context identifier (M3UA only)
point_codeInteger-YesLocal point code
network_indicatorAtom:internationalNoNetwork indicator: :international or :national
initiate_connectionBooleantrueNoWhether to initiate SCTP connection

M2PA-Specific Parameters:

ParameterTypeDefaultRequiredDescription
adjacent_point_codeInteger-Yes (M2PA)Adjacent peer's point code

Socket Management:

M2PA automatically uses SCTP.SocketHandler for shared socket management. All M2PA peers use the shared socket, which allows multiple peers to efficiently share the same SCTP port. For detailed configuration, see M2PA Socket Requirements.

Example (M3UA Peer):

config :omniss7,
m3ua_peers: [
%{
peer_id: 1,
name: "HLR_East",
protocol: :m3ua,
role: :sgp,
local_ip: {10, 179, 4, 10},
local_port: 2905,
remote_ip: {10, 179, 4, 20},
remote_port: 2905,
point_code: 100,
network_indicator: :international
}
]

Example (M2PA Peer):

config :omniss7,
sctp_handler: %{
enabled: true,
local_ip: {10, 179, 4, 10},
local_port: 3565,
point_code: 100
},
m3ua_peers: [
%{
peer_id: 2,
name: "M2PA_Link_STP_West",
protocol: :m2pa,
role: :client,
local_ip: {10, 179, 4, 10},
local_port: 3565,
remote_ip: {10, 179, 4, 30},
remote_port: 3565,
point_code: 100,
adjacent_point_code: 200
}
]

M3UA Point Code Routes

Point Code routing configuration. Routes define which peer to use for reaching specific destination point codes.

ParameterTypeDefaultRequiredDescription
m3ua_routesList of Maps[]NoList of point code routes. If not specified, routes are auto-generated from peer point codes.

Route Format: Each route in m3ua_routes must be a map with:

  • dest_pc: Destination point code (Integer)
  • peer_id: Peer ID to route through (Integer)
  • priority: Route priority - lower value = higher priority (Integer)
  • network_indicator: Network indicator (Atom): :international or :national

Example:

config :omniss7,
m3ua_routes: [
# Route to PC 100 via peer 1 (highest priority)
%{dest_pc: 100, peer_id: 1, priority: 1, network_indicator: :international},
# Route to PC 200 via peer 2
%{dest_pc: 200, peer_id: 2, priority: 1, network_indicator: :international},
# Load balancing: same dest_pc with different priorities
%{dest_pc: 300, peer_id: 3, priority: 1, network_indicator: :international},
%{dest_pc: 300, peer_id: 4, priority: 2, network_indicator: :international}
]

M3UA Global Title Routes

Global Title prefix-based routing with advanced SCCP parameter transformation. Longest prefix match is used first, then priority.

ParameterTypeDefaultRequiredDescription
m3ua_gt_routesList of Maps[]NoList of Global Title routing rules with optional transformations

Route Format: Each route in m3ua_gt_routes must be a map with:

Basic Parameters:

  • gt_prefix: Global Title prefix to match (String) - empty string matches all
  • peer_id: Peer ID to route through (Integer) - use 0 to DROP traffic
  • priority: Route priority - lower value = higher priority (Integer)
  • description: Human-readable description (String)

Optional Matching Parameters:

  • source_ssn: Match source SubSystem Number (Integer)
  • source_tt: Match source Translation Type (Integer)
  • source_npi: Match source Numbering Plan Indicator (Integer)
  • source_nai: Match source Nature of Address Indicator (Integer)

Optional Transformation Parameters:

  • dest_ssn: Transform SSN in forwarded message (Integer)
  • dest_tt: Transform Translation Type in forwarded message (Integer)
  • dest_npi: Transform Numbering Plan Indicator in forwarded message (Integer)
  • dest_nai: Transform Nature of Address Indicator in forwarded message (Integer)

Common Values:

  • Translation Type (TT): 0=Unknown, 1=International, 2=National, 3=Network Specific
  • Numbering Plan (NPI): 0=Unknown, 1=ISDN(E.164), 6=Mobile(E.212)
  • Nature of Address (NAI): 0=Unknown, 1=Subscriber, 3=National, 4=International
  • SubSystem Number (SSN): 6=HLR, 7=VLR, 8=MSC, 9=EIR, etc.

Example:

config :omniss7,
m3ua_gt_routes: [
# Basic prefix routing
%{gt_prefix: "1234", peer_id: 1, priority: 1, description: "US numbers"},
%{gt_prefix: "44", peer_id: 2, priority: 1, description: "UK numbers"},

# Translation Type transformation
%{
gt_prefix: "61",
peer_id: 3,
priority: 1,
description: "Australian numbers: TT 0→1 transformation",
source_tt: 0, # Match TT=0 (Unknown)
dest_tt: 1 # Transform to TT=1 (International)
},

# NPI transformation
%{
gt_prefix: "49",
peer_id: 1,
priority: 1,
description: "German numbers: Mobile→ISDN NPI conversion",
source_npi: 6, # Match NPI=6 (Mobile/E.212)
dest_npi: 1 # Transform to NPI=1 (ISDN/E.164)
},

# Combined transformation with SSN routing
%{
gt_prefix: "86",
source_ssn: 8, # Match SSN=8 (MSC)
peer_id: 3,
dest_ssn: 6, # Rewrite to SSN=6 (HLR)
priority: 1,
description: "Chinese traffic: Full normalization",
source_tt: 0,
dest_tt: 2,
source_npi: 6,
dest_npi: 1,
source_nai: 4,
dest_nai: 3
},

# Default/Fallback route
%{
gt_prefix: "",
peer_id: 1,
priority: 99,
description: "Default fallback route"
}
]

CAMEL Gateway Mode Parameters

Configuration for CAMEL Gateway (CAP protocol) mode.

CAMEL Mode Flags

Enable CAMEL/CAP features (set cap_client_enabled: true and camelgw_mode_enabled: true in Operational Mode Flags).

CAP Protocol Configuration

ParameterTypeDefaultRequiredDescription
cap_versionAtom:v2NoCAP protocol version: :v1, :v2, :v3, or :v4
camel_gsmscf_gt_addressString(uses called GT)NoDefault gsmSCF Global Title for CAMEL responses

CAP Version Mapping:

  • :v1 → Application Context OID: 0.4.0.0.1.0.50.0
  • :v2 → Application Context OID: 0.4.0.0.1.0.50.1 (default - most widely supported)
  • :v3 → Application Context OID: 0.4.0.0.1.21.3.4
  • :v4 → Application Context OID: 0.4.0.0.1.23.3.4

Note: Incoming requests are auto-detected from their application context OID and responses match the request version.

Example:

config :omniss7,
cap_client_enabled: true,
camelgw_mode_enabled: true,
cap_version: :v2,
camel_gsmscf_gt_address: "68988411553"

CGrateS Integration

Real-time charging integration with CGrateS for prepaid/postpaid billing.

ParameterTypeDefaultRequiredDescription
cgrates_enabledBooleanfalseNoEnable CGrateS integration
cgrates_urlString-Yes (if enabled)CGrateS JSON-RPC endpoint URL
cgrates_tenantString"cgrates.org"NoCGrateS tenant identifier
cgrates_request_typeString"*prepaid"NoCharging type: "*prepaid", "*postpaid", or "*pseudoprepaid"
cgrates_timeoutInteger5000NoCGrateS request timeout in milliseconds

Example:

config :omniss7,
cgrates_enabled: true,
cgrates_url: "http://localhost:2080/jsonrpc",
cgrates_tenant: "cgrates.org",
cgrates_request_type: "*prepaid",
cgrates_timeout: 5000

CAP M3UA Connection

CAMEL Gateway uses a separate M3UA connection for CAP operations.

ParameterTypeDefaultRequiredDescription
cap_client_m3uaMap-YesCAP M3UA connection configuration (same structure as map_client_m3ua, including optional opc and dpc parameters)

Example:

config :omniss7,
cap_client_m3ua: %{
mode: "ASP",
callback: {CapClient, :handle_payload, []},
process_name: :camelgw_client_asp,
local_ip: {10, 5, 198, 200},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 4,
opc: 5013, # Originating Point Code
dpc: 5011 # Destination Point Code
}

Global Title NAT Parameters

Global Title Network Address Translation allows different response GTs based on calling party prefix, called party prefix, or both. Rules are matched by weight (lower = higher priority), then prefix specificity (longer combined prefix = more specific). For detailed explanation and examples, see the Global Title NAT Guide.

ParameterTypeDefaultRequiredDescription
gt_nat_enabledBooleanfalseNoEnable/disable GT NAT feature
gt_nat_rulesList of Maps[]Yes (if enabled)List of GT NAT rules with prefix matching

Rule Format: Each rule in gt_nat_rules must be a map with:

  • calling_prefix: String prefix to match against calling GT (optional)
  • called_prefix: String prefix to match against called GT (optional)
  • weight: Integer priority (lower = higher priority) - default: 100
  • response_gt: Global Title to use in responses (required)

Matching Priority:

  1. Rules are matched by weight (lower value = higher priority)
  2. If weights are equal, longer combined prefix length wins
  3. Both calling_prefix and called_prefix can be used together for precise matching

Example:

config :omniss7,
gt_nat_enabled: true,
gt_nat_rules: [
# High priority: Match both calling from "8772" AND called to "555"
%{calling_prefix: "8772", called_prefix: "555", weight: 1, response_gt: "111111"},

# Medium priority: Match only calling from "8772"
%{calling_prefix: "8772", weight: 10, response_gt: "68988411553"},

# Medium priority: Match only called to "555"
%{called_prefix: "555", weight: 10, response_gt: "68988411554"},

# Match only calling from "8773"
%{calling_prefix: "8773", weight: 10, response_gt: "68988411554"},

# Wildcard fallback rule (matches everything, highest weight)
%{weight: 100, response_gt: "68988411555"}
]

See Also: GT NAT Guide for detailed usage and examples.


M3UA Connection Parameters

M3UA connection configuration for MAP client mode. For detailed usage and examples, see the MAP Client Guide.

ParameterTypeDefaultRequiredDescription
map_client_m3ua.modeString-YesConnection mode: "ASP" or "SGP"
map_client_m3ua.callbackTuple-YesCallback module/function: {MapClient, :handle_payload, []}
map_client_m3ua.process_nameAtom-YesProcess name for registration
map_client_m3ua.local_ipTuple or List-YesLocal IP address(es) to bind. Single: {10, 0, 0, 1} or Multiple for SCTP multihoming: [{10, 0, 0, 1}, {10, 0, 0, 2}]
map_client_m3ua.local_portInteger2905YesLocal SCTP port
map_client_m3ua.remote_ipTuple or List-YesRemote STP/SGW IP address(es). Single: {10, 0, 0, 10} or Multiple: [{10, 0, 0, 10}, {10, 0, 0, 11}]
map_client_m3ua.remote_portInteger2905YesRemote SCTP port
map_client_m3ua.routing_contextInteger-YesM3UA routing context ID
map_client_m3ua.opcInteger5013NoOriginating Point Code for outgoing MAP requests. If not set, defaults to legacy value 5013.
map_client_m3ua.dpcInteger5011NoDestination Point Code for outgoing MAP requests. If not set, defaults to legacy value 5011.
map_client_m3ua.receive_watchdogBooleantrueNoEnable the ASP receive watchdog. When true, the connection is torn down if no SCTP data is received within receive_watchdog_idle seconds. Set to false to disable entirely. See Receive Watchdog below.
map_client_m3ua.receive_watchdog_idleInteger15NoIdle threshold in seconds. If no SCTP payload is received within this window, the watchdog tears down the connection and triggers a reconnect. Only applicable when receive_watchdog: true.

Example (Single IP):

config :omniss7,
map_client_m3ua: %{
mode: "ASP",
callback: {MapClient, :handle_payload, []},
process_name: :hlr_client_asp,
local_ip: {10, 179, 4, 11},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 1,
opc: 5013, # Originating Point Code (2-114-5)
dpc: 5011 # Destination Point Code (2-114-3)
}

Point Code Format: Point codes in X-Y-Z format convert to integers as: (X * 2048) + (Y * 8) + Z. For example, 2-114-5 = (2 * 2048) + (114 * 8) + 5 = 5013.

Example (SCTP Multihoming):

config :omniss7,
map_client_m3ua: %{
mode: "ASP",
callback: {MapClient, :handle_payload, []},
process_name: :hlr_client_asp,
# Multiple local IPs for redundancy
local_ip: [{10, 179, 4, 11}, {10, 179, 4, 12}],
local_port: 2905,
# Multiple remote IPs for STP redundancy
remote_ip: [{10, 179, 4, 10}, {10, 179, 4, 20}],
remote_port: 2905,
routing_context: 1
}

Note: For detailed information on SCTP multihoming configuration and benefits, see SCTP Multihoming in Common Guide.

Receive Watchdog

The receive watchdog monitors SCTP connections for zombie sockets — associations that remain in an ESTABLISHED state at the OS level but where the remote end has silently stopped sending data. Without the watchdog, a dead connection may not be detected until the next send attempt fails.

Any received SCTP payload resets the idle timer, including M3UA BEAT responses, NOTIFY messages, and application data. Per RFC 4666 §3.8, M3UA BEAT is optional — SCTP already performs mandatory heartbeating at the transport layer. In environments where the remote SG does not send periodic application-layer traffic (and does not send M3UA BEATs), disabling the watchdog avoids unnecessary reconnect cycles.

ParameterTypeDefaultDescription
receive_watchdogBooleantrueEnable or disable the receive watchdog. When false, idle connections are never torn down by the watchdog; SCTP transport-layer heartbeating still operates normally.
receive_watchdog_idleInteger15Seconds of inactivity before the watchdog tears down the connection and triggers a reconnect. Has no effect when receive_watchdog: false.

Example — Disabling the watchdog for an ASP client:

config :omniss7,
map_client_m3ua: %{
mode: "ASP",
local_ip: {10, 179, 4, 11},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 1,
receive_watchdog: false # Disable — remote SG does not send periodic traffic
}

Example — Customising the idle threshold:

config :omniss7,
map_client_m3ua: %{
mode: "ASP",
local_ip: {10, 179, 4, 11},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 1,
receive_watchdog: true,
receive_watchdog_idle: 30 # Tear down after 30 s of silence (default: 15 s)
}

SCCP Subsystem Status

OmniSS7 answers SCCP-management Subsystem-Status-Tests (SST) from the real status of the queried local subsystem (ITU-T Q.714 §5.3.4). The local_subsystems key declares which SubSystem Numbers (SSNs) this node actually hosts. An SST for a listed SSN is answered Subsystem-Allowed (SSA); any other SSN is answered Subsystem-Prohibited (SSP).

ParameterTypeDefaultRequiredDescription
local_subsystemsList of Integers or :all:allNoIn-service local SCCP SSNs used to answer SST. :all (the default) treats every subsystem as available — appropriate for a pure relay that hosts no subsystems. Operators that terminate specific SSNs should list them so SST reflects reality.

Common SSNs: 6 = HLR, 7 = VLR, 8 = MSC, 9 = EIR, 146 = gsmSCF/CAMEL.

Example:

config :omniss7,
local_subsystems: [6, 7, 8, 146]

Implemented in lib/ss7_logic/subsystem_status.ex.


Gateway Screening

Gateway screening (the SCCP firewall) permits or denies transit traffic before it is routed. Rules match on source peer, OPC, DPC, Service Indicator, SCCP Called/Calling-Party GTA prefix and SSN; the first matching enabled rule (lowest priority) decides allow/deny. When no rule matches, the default action below applies. Denied messages are dropped and counted as m3ua_stp_routing_failures_total{reason="screened"}. See the STP Guide for the full model.

ParameterTypeDefaultRequiredDescription
screening_default_action:allow or :deny:allowNoAction applied to a transit message when no screening rule matches. :allow (default) is a default-permit posture; :deny is default-deny (allowlist). Setting :deny makes screening active even with no rules configured.

Example:

config :omniss7,
# Default-deny: only traffic matching an explicit allow rule is forwarded.
screening_default_action: :deny

Rules themselves are held in the ss7_screen_rule Mnesia table and managed programmatically; only the default action is set via config.

Implemented in lib/ss7_logic/screening.ex.


USSD Gateway Parameters

The USSD Gateway bridges network-initiated and mobile-initiated USSD to an HTTP/JSON backend. Enable it with ussd_gateway_enabled: true (see Operational Mode Flags), then configure the ussd_gateway map. For the full callback protocol and session lifecycle, see the USSD Gateway Guide.

ParameterTypeDefaultRequiredDescription
ussd_gateway.routesList of Maps[]Yes (if enabled)Shortcode → callback-URL routing rules. Each entry is %{pattern: "<prefix>", url: "<callback URL>"}. Longest matching prefix wins; use "*"-style short patterns as catch-all fallbacks.
ussd_gateway.session_timeout_msInteger180_000NoMaximum total session lifetime in milliseconds (3 minutes). Session is terminated if exceeded.
ussd_gateway.turn_timeout_msInteger30_000NoMaximum time (ms) to wait for a subscriber reply within a multi-turn dialogue.
ussd_gateway.http_timeout_msInteger5_000NoHTTP request/connect timeout (ms) for callbacks to your application.
ussd_gateway.max_text_lengthInteger182NoMaximum characters in a USSD text string (GSM 7-bit). Longer texts are truncated and a warning is logged.

Routing: When a USSD code arrives, the gateway sorts configured routes by descending pattern length and selects the first whose pattern is a prefix of the dialled code — giving deterministic longest-prefix matching.

Example:

config :omniss7,
ussd_gateway_enabled: true,
ussd_gateway: %{
routes: [
%{pattern: "*100", url: "http://balance-app:9000/ussd"},
%{pattern: "*200", url: "http://topup-app:9000/ussd"},
%{pattern: "*", url: "http://default-app:9000/ussd"}
],
session_timeout_ms: 180_000,
turn_timeout_ms: 30_000,
http_timeout_ms: 5_000,
max_text_length: 182
}

Runtime / Supervision Flags

These flags control how much of the supervision tree starts. They are useful for running OmniSS7 headless (as a library dependency) or for stripping the web tier in constrained deployments.

ParameterTypeDefaultRequiredDescription
start_web_interfacesBooleantrueNoStart the control-panel UI, the :api_ex REST server, and the SS7 events logger. When false, only the packet-logger (SS7.Events) starts. Can be overridden at boot by the ENABLE_WEB_INTERFACES environment variable (true/1 or false/0).
start_http_serverBooleantrueNoStart the Plug.Cowboy HTTP server on port 8080 (REST /api/*, /metrics, /swagger). See REST API Server.
headlessBooleanfalseNoLibrary-only minimal supervision. When true, OmniSS7 starts only the codec/transaction supervisors (MAP, CAP, USSD registries and dynamic supervisors) — no web UI, no license client, no SCTP handler, no M3UA server. Intended for embedding OmniSS7 codecs as a dependency.
vlr_cache_ttl_secondsInteger3600NoTime-to-live (seconds) for cached VLR lookups in the SMSc delivery path (lib/sms/smsc_api_client.ex).

Example (headless library mode):

config :omniss7,
headless: true

Example (no web tier, REST API only):

config :omniss7,
start_web_interfaces: false,
start_http_server: true

Infrastructure Parameters

Configuration for system infrastructure components including licensing, web interface, API server, and logging.

License Configuration

ParameterTypeDefaultRequiredDescription
license_client.license_server_api_urlsList of Strings-YesLicense server API endpoint URLs
license_client.licenseeString-YesLicensee organization name

Example:

config :license_client,
license_server_api_urls: ["https://localhost:10443/api"],
licensee: "Omnitouch Network Services Pty. Ltd."

Control Panel Web Interface

ParameterTypeDefaultRequiredDescription
control_panel.parent_application_readable_nameString"OmniSS7 Stack"NoApplication name displayed in web UI
control_panel.use_additional_pagesList of Tuples[]NoAdditional web UI pages to display
control_panel.page_orderList of Strings[]NoOrder of pages in navigation menu
ControlPanelWeb.Endpoint.url.hostString"0.0.0.0"NoWeb interface hostname
ControlPanelWeb.Endpoint.https.portInteger8087NoHTTPS port for web interface
ControlPanelWeb.Endpoint.https.keyfileString"priv/cert/omnitouch.pem"NoTLS private key file path
ControlPanelWeb.Endpoint.https.certfileString"priv/cert/omnitouch.crt"NoTLS certificate file path

Example:

config :control_panel, ControlPanelWeb.Endpoint,
url: [host: "0.0.0.0", path: "/"],
https: [
port: 8087,
keyfile: "priv/cert/omnitouch.pem",
certfile: "priv/cert/omnitouch.crt"
],
parent_application_readable_name: "OmniSS7 Stack STP"

config :control_panel,
use_additional_pages: [
{SS7.Web.EventsLive, "/events", "SS7 Events"},
{SS7.Web.M3UAStatusLive, "/m3ua", "Peers"}
],
page_order: ["/events", "/m3ua", "/application", "/configuration"]

REST API Server

ParameterTypeDefaultRequiredDescription
start_http_serverBooleantrueNoEnable/disable HTTP server (port 8080)
api_ex.api.portInteger8445NoAPI server port
api_ex.api.listen_ipString"0.0.0.0"NoAPI server listen IP
api_ex.api.product_nameString"OmniSS7"NoProduct name for API
api_ex.api.titleString"API - OmniSS7"NoAPI title for Swagger UI
api_ex.api.hostnameString"localhost"NoAPI hostname
api_ex.api.enable_tlsBooleantrueNoEnable TLS for API server
api_ex.api.tls_cert_pathString"priv/cert/omnitouch.crt"NoTLS certificate path for API
api_ex.api.tls_key_pathString"priv/cert/omnitouch.pem"NoTLS private key path for API

Example:

config :omniss7,
start_http_server: true

config :api_ex,
api: %{
port: 8445,
listen_ip: "0.0.0.0",
product_name: "OmniSS7",
title: "API - OmniSS7",
hostname: "localhost",
enable_tls: true,
tls_cert_path: "priv/cert/omnitouch.crt",
tls_key_path: "priv/cert/omnitouch.pem"
}

Ports and transports at a glance:

PortTransportServerPurpose
8080HTTP (Plug.Cowboy)APIhandlerMAP/CAP REST /api/*, /metrics, /swagger, /swagger.json. Toggled by start_http_server.
8087HTTPS (Bandit/Phoenix)ControlPanelWeb.EndpointWeb control panel UI. Part of the web tier (start_web_interfaces).
8445HTTPS / TLS:api_ex REST controllersStatus, routing CRUD, links, subscribers, CAMEL/SCTP/M3UA views. Part of the web tier.

API Endpoints:

  • MAP/CAP REST API + Swagger: http://[server-ip]:8080/... (see API Guide)
  • :api_ex REST controllers: https://[server-ip]:8445/api/*
  • Web control panel: https://[server-ip]:8087/
  • Prometheus metrics: http://[server-ip]:8080/metrics

API Backend SSL Verification

Outbound calls to backend HLR/SMSc APIs do not use per-target *_verify_ssl keys. Certificate verification is controlled by the generic :api map consumed by SS7.Config.api_config/0 (lib/ss7_config.ex):

ParameterTypeDefaultDescription
api.base_urlStringfalls back to smsc_api_base_urlBase URL for the generic API client.
api.timeoutInteger5000Request timeout in milliseconds.
api.verify_sslBooleanfalseWhether to verify backend TLS certificates. This is the single SSL-verify switch — there is no hlr_api_verify_ssl or smsc_api_verify_ssl.

Example:

config :omniss7,
api: %{
base_url: "https://10.179.3.219:8443",
timeout: 5000,
verify_ssl: false
}

Logging Configuration

ParameterTypeDefaultRequiredDescription
logger.levelAtom:debugNoLog level: :debug, :info, :warning, :error
logger.backendsList[:console]NoLogger backends (includes SS7.Web.LoggerBackend for web UI)
logger.default_formatter.formatString-NoLog message format string
logger.default_formatter.metadataList[]NoMetadata fields to include in logs
logger.default_formatter.truncateAtom/Integer:infinityNoLog message truncation length

Example:

config :logger,
level: :debug,
backends: [:console, SS7.Web.LoggerBackend]

config :logger, :default_formatter,
format: "[$date] [$time] [$level] $message\n",
metadata: [:error_code, :file],
truncate: :infinity

Database Parameters

Configuration for Mnesia database persistence.

ParameterTypeDefaultRequiredDescription
mnesia_storage_typeAtom:disc_copiesNoMnesia storage type: :disc_copies or :ram_copies

Example:

config :omniss7,
mnesia_storage_type: :disc_copies # Production
# mnesia_storage_type: :ram_copies # Testing only

Storage Types:

  • :disc_copies - Persistent disk storage (survives restarts) - Recommended for production
  • :ram_copies - In-memory only (lost on restart) - For testing only

Mnesia Tables:

  • m3ua_peer - M3UA peer connections
  • m3ua_route - Point Code routes
  • m3ua_gt_route - Global Title routes

Location: Mnesia.{node_name}/ directory


Hardcoded Values

The following values are hardcoded in the source code and cannot be changed via configuration.

Timeouts

ValueImpactWorkaround
MAP request timeout: 10 secondsAll MAP operations timeout after 10sModify source code
ISD timeout: 10 secondsEach ISD message times out after 10sModify source code

HTTP Server

ValueImpactWorkaround
HTTP IP: 0.0.0.0Metrics/Swagger server listens on all interfacesModify source code
HTTP Port: 8080Metrics/Swagger endpoint runs on port 8080Modify source code

Registration Intervals

ValueImpactWorkaround
Frontend registration: 5 minutesSMSc registers with backend every 5 minModify source code

Web UI Auto-Refresh

PageInterval
Routing Management5 seconds
Active Subscribers2 seconds

Configuration Examples

Minimal HLR Configuration

config :omniss7,
map_client_enabled: true,
hlr_mode_enabled: true,
smsc_mode_enabled: false,

hlr_api_base_url: "https://10.180.2.140:8443",
hlr_service_center_gt_address: "55512341111",
smsc_service_center_gt_address: "55512341112",

map_client_m3ua: %{
mode: "ASP",
callback: {MapClient, :handle_payload, []},
process_name: :hlr_client_asp,
local_ip: {10, 179, 4, 11},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 1
}

Minimal SMSc Configuration

config :omniss7,
map_client_enabled: true,
hlr_mode_enabled: false,
smsc_mode_enabled: true,

smsc_api_base_url: "https://10.179.3.219:8443",
smsc_name: "ipsmgw",
smsc_service_center_gt_address: "55512341112",

auto_flush_enabled: true,
auto_flush_interval: 10_000,
auto_flush_dest_smsc: "ipsmgw",
auto_flush_tps: 10,

map_client_m3ua: %{
mode: "ASP",
callback: {MapClient, :handle_payload, []},
process_name: :stp_client_asp,
local_ip: {10, 179, 4, 12},
local_port: 2905,
remote_ip: {10, 179, 4, 10},
remote_port: 2905,
routing_context: 1
}

STP with Standalone Server

config :omniss7,
map_client_enabled: true,
hlr_mode_enabled: false,
smsc_mode_enabled: false,

enable_gt_routing: true,
mnesia_storage_type: :disc_copies,

sctp_handler: %{
enabled: true,
local_ip: {10, 179, 4, 10},
local_port: 2905,
point_code: 100
},

map_client_m3ua: %{
mode: "ASP",
callback: {MapClient, :handle_payload, []},
process_name: :stp_client_asp,
local_ip: {10, 179, 4, 10},
local_port: 2906,
remote_ip: {10, 179, 4, 11},
remote_port: 2905,
routing_context: 1
}

Summary

Total Configuration Parameters: 85+

By Category:

  • Operational Mode: 6 parameters
  • HLR Mode: 17 parameters
  • SMSc Mode: 8 parameters
  • STP Mode: 5+ parameters (plus m3ua_peers, m3ua_routes, m3ua_gt_routes lists)
  • CAMEL GW Mode: 14 parameters
  • Global Title NAT: 2 parameters
  • M3UA Connection: 8 parameters
  • SCCP Subsystem Status: 1 parameter
  • USSD Gateway: 5 parameters
  • Runtime / Supervision: 4 parameters
  • Infrastructure (License, Web, API, Logging): 23 parameters
  • Database: 1 parameter

Required Parameters by Mode:

HLR Mode:

  • hlr_api_base_url
  • hlr_service_center_gt_address
  • smsc_service_center_gt_address
  • All map_client_m3ua.* parameters (8)

SMSc Mode:

  • smsc_api_base_url
  • smsc_service_center_gt_address
  • auto_flush_dest_smsc (if auto-flush enabled)
  • All map_client_m3ua.* parameters (8)

STP Mode:

  • sctp_handler.point_code (if SCTP handler enabled)
  • sctp_handler.local_ip
  • sctp_handler.local_port

CAMEL GW Mode:

  • cgrates_url (if CGrateS enabled)
  • All cap_client_m3ua.* parameters (8)

Infrastructure:

  • license_client.license_server_api_urls
  • license_client.licensee