UA Configuration Parameters

Mandatory parameters

uri

SIP URI associated to the User Agent (String). This is a SIP address given to you by your provider.

"sip:alice@example.com"

outbound_proxy_set

Set of WebSocket URIs to connect to. If not specified ports 80 and 443 are taken for non secure WebSocket connections and connections over SSL/TLS, respectively. This parameter can be expressed in multiple ways:

  • Single String to define an only outbound proxy.
  • Array of Strings to define multiple outbound proxies.
  • Array of Objects to define multiple outbound proxies with weight. Proxies with higher weight value are used prior to those with lower value.
"ws://sip-ws.example.com"
"wss://sip-ws.example.com:8443/sip?KEY=1234"
[
  "ws://sip-ws-1.example.com",
  "ws://sip-ws-2.example.com",
]
[
  {ws_uri: "sip-ws-1.example.com", weight: 10},
  {ws_uri: "sip-ws-2.example.com", weight: 1}
]

Optional parameters

password

SIP Authentication password (String).

authorization_user

Username (String) to use when generating authentication credentials. If not defined the value in uri parameter is used.

display_name

Descriptive name (String) to be shown to the called party when calling or sending IM messages. It must NOT be enclosed between double quotes even if the given name contains multi-byte symbols (JsSIP will always enclose the display_name value between double quotes).

hack_via_tcp

Set Via transport parameter in outgoing SIP requests to TCP. Useful when traversing SIP nodes that are not ready to parse Via headers with WS or WSS value in the transport parameter. Valid values are true and false (Boolean). Default value is false.

hack_ip_in_contact

Set a random IP address as the host value in the Contact header field and Via sent-by parameter. Valid values are true and false (Boolean). Default value is a false.

register

Indicate if JsSIP User Agent should register automatically when starting. Valid values are true and false (Boolean). Default value is true.

register_expires

Registration expiry time (in seconds) (Integer). Default value is 600.

no_answer_timeout

Time (in seconds) (Integer) after which an incoming call is rejected if not answered. Default value is 60.

stun_server

STUN server (String) used for IP address discovery. Default value is “stun:stun.l.google.com:19302”.

stun:example.org
stuns:example.org
stun:example.org:8000

trace_sip

Indicate whether incoming and outgoing SIP request/responses must be logged in the browser console (Boolean). Default value is false.