Skip to main content

SIP

Configuration

The section in the configuration file is called sip.

FieldTypeRequiredDefault valueDescription
addrstringyes-The local IP address to bind to (0.0.0.0 binds to every address)
portintyes-The port to bind to (usually 5060)
idstringnoSee belowThe ID of this SIP endpoint in the format sip:<username>@<addr>
usernamestringnononeThe username to register with the SIP provider
passwordstringnononeThe password to register with the SIP provider
realmstringnononeThe realm of the given username/password pair
registrarstringnononeThe SIP URI of the registrar in the format sip:<domain>
outbound_proxystringnononeThe SIP proxy to send all requests to in the format sip:<domain>
nat_ping_deltastringno30 secondsSeconds between ping and pong to keep the NAT binding alive
stun_serverstringnononeThe host and optional port of the STUN server in the format <host>[:<port>]
enforce_qopboolnofalsetrue to enforce quality of protection on SIP authentication
rtp_port_rangeRTP port rangeno40000-49999The port range for the SIP RTP/RTCP connections

If ìd is not set, it is generated as sip:<username>@<addr> where <addr> may be replaced by the public address discovered using the STUN server.

RTP port range

FieldTypeRequiredDefault valueDescription
startstringyes-The lower bound of the port range for the SIP RTP/RTCP connections
endstringyes-The upper bound of the port range for the SIP RTP/RTCP connections

Example

[sip]
addr = "0.0.0.0"
port = 5060
id = "sip:alice@example.org"
username = "user"
password = "pass"
realm = "asterisk"
registrar = "sip:sip.example.org"
stun_server = "stun.example.org:3478"

[sip.rtp_port_range]
start = 40000
end = 49999