Skip to main content
Versionv1

Sip Accounts API (v1)

Download OpenAPI specification:Download

Restrictions

Get SIP Account Restrictions

Get the restrictions set for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
accountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Logical Account or Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Restrictions By Threshold

Get all blacklist restrictions for all SIP Accounts where the traffic costs are higher then the given threshold.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
accountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Logical Account or Voice Account.

threshold
required
number <double>
Example: 4

The threshold to search the blacklist restrictions for.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Restrictions

Update the restrictions that are set up for the given SIP Account.

CAUTION! This action will overwrite ALL current restrictions, so when adding a restriction to the existing list, send the entire current list of restrictions with the new restriction appended.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
accountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Logical Account or Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

restrictionType
required
string (Restriction Type)
Enum: "Blacklist" "Whitelist" "Unknown"
Example: blacklist

Sets the type of the restrictions, this can be either set to whitelist or blacklist. When set to whitelist, only calls to the given prefixes will be allowed, when set to blacklist, only calls to the given prefixes will be blocked.

Request Body schema:

List of the new restrictions to be set.

Array
username
string or null

Username of the SIP Account.

prefix
string or null

Phone number prefix affected by the restriction.

restrictionType
string (Restriction Type)
Enum: "Blacklist" "Whitelist" "Unknown"

List of available user restriction types.

forcedByCm
boolean

Whether this restriction was created and enforced by CM or not. This value cannot be set or updated via the API.

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Sip Accounts

Get SIP Account

Get a single SIP Account by it's unique identifier.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "guid": "string",
  • "createdOn": "2019-08-24T14:15:22Z",
  • "customerAccountGuid": "string",
  • "name": "string",
  • "username": "string",
  • "isActive": true,
  • "inPrison": true,
  • "config": {
    }
}

Delete SIP Account

Delete the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "requestId": "string",
  • "errors": [
    ]
}

Get SIP Accounts

Get all SIP Accounts belonging to the given Voice Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

query Parameters
includeConfig
boolean
Example: includeConfig=true

Whether or not to include the SIP Account configuration, defaults to true.

q
string
Example: q=

The search query that can be applied to search through the items before they get paginated.

skip
integer <int32>
Example: skip=0

The amount of items to be skipped, defaults to 0.

take
integer <int32>
Example: take=25

The amount of items to take, defaults to 25.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create SIP Account

Create a new SIP Account for the given Voice Account. The username and password for the new SIP Account will be automatically generated by CM.com.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

Responses

Response samples

Content type
application/json
{
  • "guid": "string",
  • "createdOn": "2019-08-24T14:15:22Z",
  • "customerAccountGuid": "string",
  • "name": "string",
  • "username": "string",
  • "isActive": true,
  • "inPrison": true,
  • "config": {
    }
}

Enable SIP Account

Updates the isActive state of the SIP Account to true.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "requestId": "string",
  • "errors": [
    ]
}

Disable SIP Account

Updates the isActive state of the SIP Account to false, meaning this SIP Account is no longer able to make or receive calls.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "requestId": "string",
  • "errors": [
    ]
}

Delete SIP Account From Prison

When the wrong password of the SIP Account was entered too many times, the account get's a temporary ban by being put in prison. This endpoint allows you to remove the SIP Account from prison.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "requestId": "string",
  • "errors": [
    ]
}

Update SIP Account Display Name

Update the display name for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Request Body schema:

CM.Voice.SipAccounts.Api.Models.Api.ApiUpdateDisplayNameRequest

name
string or null

New display name for the SIP Account.

Responses

Request samples

Content type
{
  • "name": "My new display name"
}

Response samples

Content type
application/json
{
  • "guid": "string",
  • "createdOn": "2019-08-24T14:15:22Z",
  • "customerAccountGuid": "string",
  • "name": "string",
  • "username": "string",
  • "isActive": true,
  • "inPrison": true,
  • "config": {
    }
}

Get SIP Account Credentials

Get the username and decrypted password for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Reset SIP Account Password

Generates a new password for the given SIP Account. The new decrypted password will be returned in the response body.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Sip Config

Get SIP Account Config

Get the configuration for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
{
  • "cpsLimit": 2,
  • "ccLimit": 100,
  • "alwaysAnonymous": false,
  • "hasAnonymousOverride": false,
  • "defaultOutboundCallerId": "",
  • "restrictionType": "blacklist",
  • "primaryTrunkId": "outbound02",
  • "secondaryTrunkId": "outbound01",
  • "blockNonEerToEer": false,
  • "allowPremium": false
}

Update SIP Account Config

Update the configuration for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Request Body schema:

New sip config

cpsLimit
integer <int32>

Limit of the amount of calls that can be set up per second.

ccLimit
integer <int32>

Limit of the amount of calls that can take place concurrently.

alwaysAnonymous
boolean

Whether or not outbound calls from this SIP Account will always be dialed out with CLI anonymous.

hasAnonymousOverride
boolean

When set to true, this option guarantees routing that support anonymous calls.

defaultOutboundCallerId
string or null

The CLI used when making outbound calls. This does not override a valid CLI that is already provided in the SIP invite.

restrictionType
string or null

Sets the type of prefix restrictions placed on this SIP Account, this can be either set to whitelist or blacklist. When set to whitelist, only calls to the given prefixes will be allowed, when set to blacklist, only calls to the given prefixes will be blocked.

primaryTrunkId
string or null

Platform name or domain of the primary SIP trunk or DNS that will be used. The /trunks and /platformdomains endpoints can be used to get a list of currently active SIP Trunks and Platform Domains.

secondaryTrunkId
string or null

Platform name or domain of the secondary (backup) SIP trunk that will be used. The /trunks and /platformdomains endpoints can be used to get a list of currently active SIP Trunks and Platform Domains. When using DNS, reach out to support for a backup DNS.

blockNonEerToEer
boolean

All calls with a non-European CLI to a European country will be blocked for this SIP account.

allowPremium
boolean

Allow calls to premium pay-per-minute or pay-per-call numbers.

Responses

Request samples

Content type
{
  • "cpsLimit": 2,
  • "ccLimit": 100,
  • "alwaysAnonymous": false,
  • "hasAnonymousOverride": false,
  • "defaultOutboundCallerId": "",
  • "restrictionType": "blacklist",
  • "primaryTrunkId": "outbound02",
  • "secondaryTrunkId": "outbound01",
  • "blockNonEerToEer": false,
  • "allowPremium": false
}

Response samples

Content type
application/json
{
  • "cpsLimit": 2,
  • "ccLimit": 100,
  • "alwaysAnonymous": false,
  • "hasAnonymousOverride": false,
  • "defaultOutboundCallerId": "",
  • "restrictionType": "blacklist",
  • "primaryTrunkId": "outbound02",
  • "secondaryTrunkId": "outbound01",
  • "blockNonEerToEer": false,
  • "allowPremium": false
}

Get active SIP Trunks

Get a list of all currently active CM.com SIP Trunks.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
sipAccountGuid
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get active Platform Domains

Get a list of all currently active CM.com Platform Domains.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string
sipAccountGuid
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Sip Endpoints

Get SIP Account Endpoints

Get all SIP Endpoints that are set up for the given SIP Account.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update SIP Account Endpoints

Update the SIP Endpoints that are set up for the given SIP Account.

CAUTION! This action will overwrite ALL current SIP Endpoints, so when adding an Endpoint to the existing list, send the entire current list of SIP Endpoints with the new Endpoint appended.

Authorizations:
X-CM-PRODUCTTOKEN
path Parameters
voiceAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the Voice Account.

sipAccountGuid
required
string <uuid>
Example: 00000000-0000-0000-0000-000000000000

Unique identifier of the SIP Account.

Request Body schema:

CM.Voice.SipAccounts.Api.Models.Api.ApiSipEndpoint

Array
guid
string or null

Unique identifier of the SIP Endpoint.

createdOn
string <date-time>

Date and time on which the SIP Endpoint was created.

hostname
string or null

Hostname of the SIP Endpoint, when given, the IP address should be left blank.

ipAddress
string or null

External IP address of the SIP Endpoint, when given, the hostname should be left blank.

port
integer <int32>

Port number of the SIP Endpoint, when set to 0 any port number will be used.

subnetMask
integer <int32>

Subnet mask of the SIP Endpoint.

isTrusted
boolean

Whether authentication is required for the SIP endpoints to use the SIP Account or not. It is not recommended to set this to true.

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]