Skip to main content

SIP

Supported codecs

The Obelisk supports the following Codecs:

CodecClock-Rate
G.711 (PCMA)8,000
G.711 (PCMU)8,000
G.7228,000
H.26490,000

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>@<host>, used for creating the From/To header in SIP REGISTER messages
contactstringnoSee belowThe Contact of this SIP endpoint in the format sip:<username>@<host>, used for creating the SIP Contact header
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
offer_srtpboolnofalsetrue to offer SRTP as media transport when obelisk is creating the initial SDP offer
rtp_port_rangeRTP port rangeno40000-49999The port range for the SIP RTP/RTCP connections
max_video_bitrateintno6000000Maximum allowed video bitrate to the caller in bits/s
encode_video_at_half_bitrateboolnofalseEncode video at half the bitrate advertised by the caller. This ensures compatibility with devices that incorrectly report their supported H.264 maximum bitrate for both sending and receiving, instead of just receiving.

If ìd is not set, it is generated as sip:<username>@<registrar-host>. If no registrar is configured it is generated just like the contact field.

If contact 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"
contact = "sip:alice@192.168.1.100"
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