SIP Connector

LiveSwitch Server allows users to dial into calls, conferences, and broadcasts running on LiveSwitch using the SIP Connector, which acts as a proxy between the Media Server and remote SIP user agents.

The SIP Connector requires an account with a SIP trunking provider. Supported features include:

  • Trunk registration.
  • Multiple trunks.
  • Static inbound channel routing.
  • Dynamic inbound channel routing.
  • Dynamic outbound trunk routing.
  • Dynamic outbound caller ID.

Trunk Requirements

Outbound Calling

Outbound calling requires that the trunk supports receiving delayed offers:

  1. LiveSwitch sends an empty INVITE.
  2. LiveSwitch receives an ACK with an SDP offer.
  3. LiveSwitch sends an OK with an SDP answer.

Inbound Calling

Inbound calling requires that the trunk always sends early offers:

  1. LiveSwitch receives an INVITE with an SDP offer.
  2. LiveSwitch sends an ACK with an SDP answer.
  3. LiveSwitch receives an empty OK.

Trunk Registration

If the trunk is configured to register, it will do so with the supplied credentials (domain, username, password, and optional auth ID).

Multiple Trunks

When multiple trunks are configured, outbound calls are routed to the first available.

Dynamic outbound trunk routing is also available (see below).

Static Inbound Channel Routing

An optional application-level inbound mapping configuration can be provided to select a channel for an inbound call.

The configuration is static and consists of a set of records with following properties:

SIP Username string (primary key) The URI in the "To" header of the inbound INVITE message.
Channel ID string The ID of the channel to which the call should be routed.

Dynamic Inbound Channel Routing

An optional deployment-level inbound webhook URL can be provided to select an application and channel for an inbound call:

Request

The request is sent using the POST method to the URL as JSON with the following fields:

headers

Dictionary<string, string>

The headers from the inbound INVITE message.
sdp string The SDP offer from the inbound INVITE message.

Response

The response must be JSON and must include the following required fields:

applicationId

string

The ID of the application to which the call should be routed.
channelId string The ID of the channel to which the call should be routed.

The response may include the following optional fields:

userId string

The user ID to use for channel-level upstream connection open/close notifications.

(Defaults to the URI in the "From" header from the inbound INVITE message if not specified.)

Console SIP Configuration

For configuring Deployment-level Inbound Routing via your console please see the SIP Configuration section of our Console Configuration docs.

Dynamic Outbound Trunk Routing

An optional deployment-level outbound webhook URL can be provided to select a trunk for an outbound call.

Request

The request is sent using the POST method to the URL as JSON with the following fields:

applicationId string The ID of the application from which the call is originating.
channelId string The ID of the channel from which the call is originating.
clientId string The ID of the client from which the call is originating.
userId string The optional user ID of the client from which the call is originating.
sipTrunks SipTrunk[] The available trunks.

Each trunk is a record with the following properties:

id string The trunk identifier.
authId string The auth ID from the trunk credentials.
username string The username from the trunk credentials.
domain string The domain from the trunk credentials.

Response

The response must be JSON and must include the following required fields:

sipTrunkId string The trunk to which the call should be routed.

Console SIP Configuration

For configuring Deployment-level Outbound Routing via your console please see the SIP Configuration section of our Console Configuration docs.

Dynamic Outbound Caller ID

An optional channel-level outbound caller ID configuration can be provided to configure the contact used in the "From" header for outbound INVITE messages.

The configuration is static consists of a single record with following properties:

Display Name string

The display name to use in the "From" header in the outbound INVITE message.

(Defaults to null if not specified.)

Username string

The username to use for the URI in the "From" header in the outbound INVITE message.

(Defaults to the username from the trunk credentials if not specified.)

Both properties support a basic curly-brace template format (e.g. {userAlias}-{userId}) with the following variables available:

id string The ID of the client from which the call is originating.
deviceId string The optional device ID of the client from which the call is originating.
deviceAlias string The optional device alias of the client from which the call is originating.
userId string The optional user alias of the client from which the call is originating.
userAlias string The optional user ID of the client from which the call is originating.
tag string The optional tag of the client from which the call is originating.
roles string[] The optional roles of the client from which the call is originating.
region string The optional region of the client from which the call is originating.

Console SIP Configuration

For configuring Channel-level Outbound Caller ID via your console please see the SIP Outbound Caller ID Configuration section of our Console Configuration docs.