UA Configuration Parameters

JsSIP.UA requires a configuration object with mandatory and optional parameters. Example:

var socket = new JsSIP.WebSocketInterface(ws://;

var configuration = {
  sockets  : [ socket ],
  uri      : '',
  password : 'superpassword'

var ua = new JsSIP.UA(configuration);

Full list of configuration parameters below:

Mandatory parameters


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

uri: ""


Set of JsSIP.Socket instances. This parameter can be expressed in multiple ways:

  • Single JsSIP.Socket instance.
  • Array of JsSIP.Socket instances.
  • Array of Objects defining a JsSIP.Socket instance with weight. Sockets with higher weight value are used prior to those with lower value.
sockets: socket
sockets: [
sockets: [
  {socket: socket1, weight: 10},
  {socket: socket2, weight: 1}

Optional parameters


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

authorization_user: "alice123"


Maximum interval (Number) in seconds between WebSocket reconnection attemps. Default value is 30.

connection_recovery_max_interval: 60


Minimum interval (Number) in seconds between WebSocket reconnection attempts. Default value is 2.

connection_recovery_min_interval: 4


String indicating the contact URI to be used in the Contact header field. The given URI host will be used as the Via header host parameter.


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).

display_name: "Alice ¶€ĸøĸø"


String indicating the UUID URI to be used as instance ID to identify the UA instance when using GRUU.

instance_id: "uuid:8f1fa16a-1165-4a96-8341-785b1ef24f12"
instance_id: "8f1fa16a-1165-4a96-8341-785b1ef24f12"


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

no_answer_timeout: 120


Enable Session Timers (as per RFC 4028). Default value is true.

session_timers: false


SIP Authentication password (String).

The plain SIP password. JsSIP deletes this value from its internal memory after the first successful authentication and, instead, stores the resulting ha1 and realm.

password: "1234"


SIP Authentication realm (String).

Just useful if plain SIP password is not given, so it also requires ha1 to be provided.

realm: ""

NOTE for Asterisk users: Asterisk always uses “asterisk” as realm.


SIP Authentication HA1 hash (String) for the Digest authentication.

If given (and plain SIP password is not given) the parameter realm is also required. Otherwise authentication is not feasible.

ha1: "270fe19ce3890bd85e105998b0a75cf0"


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

register: false


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

register_expires: 300


Set the SIP registrar URI. Valid value is a SIP URI without username. Default value is null which means that the registrar URI is taken from the uri parameter (by removing the username).

registrar_server: ''


If set to true every SIP initial request sent by JsSIP includes a Route header with the SIP URI associated to the WebSocket server as value. Some SIP Outbound Proxies require such a header. Valid values are true and false (Boolean). Default value is false.