Skip to content

Limits and Timers ​

Every queue, table and timer in sipbridge has an upper bound, so overload leads to refused work instead of unbounded memory growth. The values are compiled in unless a setting is named, and they are maximums: nothing is allocated up front. The exact rules are in Protocol section 10, Service runtime, Resident Memory core and Binary Redis core.

Control sessions ​

ResourceBound
Envelope size1 MiB maximum; can be negotiated down to 512 bytes
Reference and correlation strings[A-Za-z0-9_.:@+-]{1,96}
Capabilities per hello32
Time to send hello5 seconds
One control write, including waiting for the writer2 seconds
Heartbeat interval / timeout1 second / 6 seconds
Control sessions64
Controller instance IDs remembered256
Memory of a closed session's connection attempt, and of late replies5 minutes
Pending outgoing calls / remembered late-reply markers per session128 / 1,024

Requests, decisions and commands ​

ItemBound
Time to answer a request with a decisionAbout 2 seconds from arrival; then sipbridge answers 503
remainingBudgetMs for decisions and other requests2,000 ms
remainingBudgetMs for a command40,000 ms
admission block4 KiB
Error text in a stored command result4 KiB (memory state; longer text is truncated)
One dialogEvent delivery attempt2 seconds; retried with pauses growing from 1 to 10 seconds until its deadline
Forked answers to one outgoing INVITE16 dialogs

Public SIP ​

ResourceBound
SIP message64 KiB
Concurrent TCP/TLS connections (inbound and outbound) and tracked flows4,096 each
UDP messages being handled or queued128; more are dropped without blocking the reader
Unused outbound TCP/TLS connectionClosed 2 minutes after its operation's deadline
TLS versionsTLS 1.2 and later

State capacity ​

ResourceDefaultSetting
Inbound and outbound contexts in Memory128 eachSIPBRIDGE_MEMORY_MAX_GROUPS (1 to 1,048,576)
Memory state plus room to finish accepted work1 GiBSIPBRIDGE_MEMORY_MAX_BYTES (at least 8 MiB)
Controller processes with a lease in Memory1,024fixed
Requests waiting for a controller decision per instance128 total, 32 per observed source addressfixed
Waiting requests plus retained refusals from the controller path per instance1,024 when admitting new requestsfixed
Retained refusals sipbridge generated before controller admission, per instance1,024fixed
Memory records kept to recognize duplicate refused requests4,096fixed
Inbound and outbound call legs with Redis, per instance1,024 eachfixed
Outgoing requests outside a call with Redis, per instance512fixed
Redis records plus reserved room per context32 MiBfixed
Local registrations in progress and subscriptions with Redis, per instance131,072 inbound contexts, 1 GiBfixed
Controller processes admitted at once with Redis, per namespace1,024fixed

Requests waiting for a decision count toward the inbound limit, so there is room to keep them if the controller accepts. These limits govern new work. Allow extra memory for the Go runtime, network buffers and Redis overhead. See State Backends.

Controller leases ​

TimerValue
Lease lifetime30 seconds
Lease renewalBy heartbeat, at most every 2 seconds per session
Lease end after a session closes or misses heartbeatsImmediate
Idle lease record (Redis, no calls)Removed after 120 seconds
Local challenge policy lifetimeAt most 60 seconds ahead

Shutdown ​

TimerDefaultSetting
Grace before listeners and idle streams close3 seconds--sip-withdrawal-grace (0 to 60 s)
Total time until process exit65 seconds--sip-drain-timeout (above the grace, at most 2 min)
Final completion reporting within the shutdown deadlineUp to 2 secondsfixed
Drain tracking per connection / per process64 / 8,192 outstanding transactionsfixed

Credentials ​

ItemValue
Certificate, key and token reload interval5 seconds
Bearer token length32 to 4,096 bytes

sipbridge holds SIP connections and runs the protocol; your application decides what happens on each call.