HTTPS API

  • Updated on August 29, 2022

The UCM6xxx provides a new API interface to query, edit PBX settings and implement multiple call functions on another server connected to it via API. UCM will actively send system reports and call reports to this other server. Additionally, legacy CDR API, REC API and PMS API in addition to QUEUE API are included and supported by default when enabling API.

Figure 1: API Flow

The UCM63xx series include the UCM620x, UCM630x and UCM630xA series as well as the UCM6510.

The UCM63xx series include the UCM620x, UCM630x and UCM630xA series as well as the UCM6510.

API Basics

To get started with UCM’s API feature, users must configure the HTTPS API settings and get familiar with the feature’s communication method, request structure, response messages, and event reports.

Configuring the API

Enabling PBX API Interface

  1. Log into the UCM web UI and navigate to Other Features → API Configuration → HTTPS API Settings (New).
  2. Check the Enable option and configure a username and password. These credentials will be used when connecting to the API.
Figure 2: HTTPS API Settings

Enable

Enable/Disable API. The default setting is disabled.

Username

Configure the username for API Authentication.

Password

Configure the password for API Authentication.

Call Control

If enabled, 3rd party applications will be able to manage inbound calls via API actions.
acceptCall will accept incoming calls while refuseCall will reject them. If no actions are done within 10 seconds, calls will automatically be accepted.

Table 1: New API Configuration Parameters

Server Configuration

The API server address is the same as the UCM’s web UI address. To configure the UCM’s HTTP server settings, navigate to System Settings → HTTP Server.

Figure 3: HTTP Server Settings

Login Restrictions

When several failed login attempts have been made from a specific IP address, that IP address will be added to the UCM’s blacklist and will be unable to access the UCM. To ensure this doesn’t happen to trusted IP addresses, consider enabling and adding its IP address to whitelist as shown on the same page as server configuration.

Communication

Communication Protocol

The API uses HTTPS protocol and the same certificate used for UCM web portal. If the UCM is using HTTP, the API feature cannot be used.

JSON data into HTTP request

Below is a JSON example of challenge action and how the JSON script will be encapsulated in HTTPS Post request:

  curl -H "Content-Type: application/json;charset=UTF-8" -H "Connection: close" -X POST -d '{"request": {"action": "challenge", "user": "cdrapi", "version": "1.0"}}' -k "https://192.168.5.153:8089/api" --insecure

As a response to the sent request, the UCM will return a challenge string which will be used to generate the token as mentioned above and with the same structure the login action needs to be sent to have the cookie id as response.

Communication Method

The communication between the UCM and 3rd party applications is like the following:

  • 3rd party application server sends request to UCM:
    1. 3rd party application initiates the request.
    2. 3rd party application is the client, and UCM is the server.
    3. Scenario: 3rd party application initiates calls and sends query to UCM.

Version Control

“Challenge” requests must contain the API version number. If version is not specified, requests will be parsed based on the latest version of the API, and this may result in information being processed incorrectly. Thus, it is highly recommended to include version number in the challenge request.

Example: If the latest API version is 1.2, and the 3rd party interface was developed using version 1.0, version 1.0 must be included when sending the challenge request.

  {"request": {"action": "challenge", "version": "1.0", "user": "api"}}

Operation Log

UCM’s Operation Log feature is able to display API activity history. API actions will be labeled with “(API)” at the end of each entry. Operation Log entries can be filtered and deleted.

Figure 4: Operation Log

API Queries

The new API supports the queries listed below which will accomplish certain requests and get DATA about different modules on UCM62xx.

getSystemStatus

addInboundRoute

listPaginggroup

getSystemGeneralStatus

getInboundRoute

addPaginggroup

listAccount

updateInboundRoute

getPaginggroup

getSIPAccount

deleteInboundRoute

updatePaginggroup

updateSIPAccount

playPromptByOrg

deletePaginggroup

listVoIPTrunk

listBridgedChannels

MulticastPaging

addSIPTrunk

listUnBridgedChannels

MulticastPagingHangup

getSIPTrunk

Hangup

listIVR

updateSIPTrunk

Callbarge

addIVR

deleteSIPTrunk

listQueue

getIVR

listOutboundRoute

getQueue

updateIVR

addOutboundRoute

updateQueue

deleteIVR

getOutboundRoute

addQueue

cdrapi

updateOutboundRoute

deleteQueue

recapi

deleteOutboundRoute

loginLogoffQueueAgent

pmsapi

listInboundRoute

pauseUnpauseQueueAgent

queueapi

mute

Unmute

hold

unhold

dialExtension

dialOutbound

callTransfer

transferNumberInbound

transferNumberOutbound

dialIVR

dialIVROutbound

dialQueue

dialRinggroup

dialOutboundTwo

listUser

getUser

updateUser

listExtensionGroup

listPinSets

refuseCall

acceptCall

applyChanges

addAnalogTrunk

getAnalogTrunk

listAnalogTrunk

updateAnalogTrunk

deleteAnalogTrunk

addSLATrunk

updateSLATrunk

deleteDigitalTrunk

addDigitalTrunk

getDogitalTrunk

listDigitalTrunk

updateDigitalTrunk

Table 2: New API Supported Queries

Note

There were rare occurrences when the UCM stopped responding to the HTTPS requests. In case that happens, please reboot the UCM.

Establishing Connection and User Authentication

To use HTTPS API users need to connect to the UCM6xxx’s IP address with HTTPS/HTTP port which is by default 8089 then authenticate using the configured Username and Password.

Challenge

The HTTP authentication is based on challenge/response authentication protocol. The client sends a request for a challenge.

{
    "request":{
        "action":"challenge",
        "user":"cdrapi",
        "version":"1.0"
    }
}

{
    "response":{
        "challenge":"0000001652831717"
    },
    "status":0
}

Key word

Value

Mandatory

Type

Note

Request Parameter

user

Yes

string

API username

Version

No

string

API protocol version. New versions will be available for future interfaces. Different versions will be compatible with one another. This keyword is not mandatory. By default, the latest version will be used. If the requested version cannot be matched, the latest version is used

Successful response

status

0

Yes

int

Successful response

challenge

16-digit Random number

Yes

string

Random string returned by the API used to generate secret key for logging in.

Failed response

status

Yes

Please see the error code list for more details.

remain_num

No

int

When obtaining parameter failed, the number of remaining attempts will be returned. After exceeding the remaining number of attempts, this IP and username will be added to UCM login blacklist. On UCM web page, the banned IP can be removed.

remain_time

No

int

When an IP address or username has been banned, the ban period will be returned.

Table 3: HTTP Challenge

Login

Upon obtaining the challenge string, the client then creates an MD5 hash consisting of the challenge and the user password. By sending a login command with the username and MD5 hash, the client will be able to log in. User information will be returned upon successful login.

{
    "request":{
        "action":"login",
        "token":"0faa24433e3c7a9bcfa8000f735305d5",
        "url":"http://192.168.5.199:8070",
        "user":"cdrapi"
    }
}

{
    "response":{
        "cookie":"sid1652831717-1574421057"
    },
    "status":0
}

Key word

Value

Mandatory

Type

Note

Request Parameter

user

Yes

string

API username

token

No

string

Verification code MD5(${challenge}${password})

url

No

string

The URL used by the 3rd party application to obtain API reports. For example: ${ip}:${port}/${path} Note: If this parameter is not included, no API report can be sent.

Note: This feature is not supported yet. 

Successful response

status

0

Yes

int

Successful response

Cookie

Yes

string

Cookie is generated after the 3rd party application successfully connects to the UCM. Excluding challenge and login requests, other API requests need to include the cookie returned by API authentication. Cookie times out in 10 minutes.

Failed response

status

Yes

Please see the error code list for more details.

remain_num

No

int

When obtaining parameter failed, the number of remaining attempts will be returned. After exceeding the remaining number of attempts, this IP and username will be added to UCM login blacklist. On UCM web page, the banned IP can be removed.

remain_time

No

int

When an IP address or username has been banned, the ban period will be returned.

Table 4: HTTP Login

Data Definition

Request Data

Action: Define the action needed to be executed on the UCM.

Cookie: Session identifier.

Parameters: Parameters of the defined action.

{
    "request":{
        "action":"",
        "cookie":"",
	  "options":""                #This field is optional to include parameters
    }
}

Parameters will be added depending on the used action

Response Data

Status: Please refer to the return code table. [Error Return Codes]

Operation Methods

Get System Configuration

getSystemStatus

The “getSystemStatus” action will return the system information.

  • Request
{
    "request":{
        "action":"getSystemStatus",
        "cookie":"sid877877-1574437822"
    }
}
  • Response
{
    "response":{
        "idle-time":"14:32:44",
        "part-number":"9660002815A",
        "serial-number":"21AWMJPH70BCA783",
        "system-time":"2019-11-22 17:50:26 UTC+02:00",
        "up-time":"07:33:15"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Successful response

status

0

Yes

int

Return successful, status is 0

part-number

No

string

Product part number

up-time

No

string

System uptime since bootup

idle-time

No

string

System idle time

system-time

No

string

System time

Failed response

status

yes

int

Please see the error code list for more details.

Table 5: getSystemStatus

getSystemGeneralStatus

The “getSystemGeneralStatus” action will return the version information.

  • Request
{
    "request":{
        "action":"getSystemGeneralStatus",
        "cookie":"sid877877-1574437822"
    }
}
  • Response
{
    "response":{
        "base-version":"1.0.20.13",
        "boot-version":"1.0.20.8",
        "core-version":"1.0.20.8",
        "gswave-version":"1.0.20.13",
        "lang-version":"1.0.20.13",
        "product-model":"UCM6202  V1.5A",
        "prog-version":"1.0.20.13",
        "rcvr-version":"1.0.20.8"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Successful response

status

0

yes

int

Successful response, status is 0

product-model

no

string

Product model

base-version

no

string

Base version

prog-version

no

string

Program version

boot-version

no

string

Boot version

core-version

no

string

Core version

rcvr-version

no

string

Recovery version

lang-version

no

string

Lang version

gswave-version

no

string

GSWave version

Failed response

status

yes

int

Please see the error code list for more details.

Table 6: getSystemGeneralStatus

Extension

listAccount

The “listAccount” action will return information about the extensions created on the UCM, such as the extension’s number, its name etc.

Note

The needed information, can be defined in the parameter “options”.

  • Request
{
"request":{
"action":"listAccount",
"cookie":"sid877877-1574437822",
"item_num":"30",
"options":"extension,account_type,fullname,status,addr",
"page":"1",
"sidx":"extension",
"sord":"asc"
#If only the action and the cookie were defined, this will return all the available account
}
}
  • Response
{
"response":{
"account":[
{
"account_type":"SIP(WebRTC)",
"addr":"-",
"extension":"1000",
"fullname":null,
"status":"Unavailable"
},
{
"account_type":"SIP(WebRTC)",
"addr":"192.168.5.95:62144",
"extension":"1102",
"fullname":null,
"status":"Idle"
},
],
"page":1,
"total_item":2,
"total_page":1
},
"status":0
}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

page

no

int

Retrieves the extensions on the specified page. This page is based on the value for the item_num parameter. If item_num is unspecified, all items will be on page 1.

item_num

no

int

Maximum number of extensions to retrieve for the query. If unspecified, all extensions will be returned. This also indicates the number of items per page for the page parameter

sord

acs, desc

no

string

Sorting method. acs stands for ascending, and desc stands for descending.

sidx

no

string

Sort according to the index.

options

extension, account_type, fullname, out_of_service, status, addr, urgemsg, newms, oldmsg

no

string

Specify the extension details to retrieve and display. Multiple items can be entered and must be separated by commas. If unspecified, all details will be returned.

Successful response:

status

0

yes

int

Successful response, status is 0

account

yes

Json array

Account List

total_item

yes

int

Total number of items on the list

total_page

yes

int

Total number of items on the list

page

yes

int

Page the extensions are on.

extension

yes

string

Extension number.

account_type

SIP, IAX, FXS, SIP(Web RTC)

no

string

Extension type.

fullname

no

string

Caller ID Name, which consists of first_name, space, and last name.

out_of_service

Yes, no

no

string

Indicates whether the extension is out of service

status

Idle, InUse, Busy, Unavailable, Ringing

no

string

Just “Extension status” is fine.

addr

no

string

IP address and port number of registered extensions. If there are multiple devices under the same account, they will be separated by commas.

urgmsg

no

int

Number of urgent messages.

newmsg

no

int

Number of new messages.

oldmsg

no

int

Number of old messages.

presence_status

unavailable, available,

away, chat, dnd, userdef

no

string

Presence status. Only SIP extensions support presence status.

presence_def_script

Custom presence status. If presence_status is userdef, this parameter’s value will be used.

user_name

no

string

Typically the same as extension number.

email_to_user

no

string

Indicates whether or not to send email notifications to an extension’s configured email address if the extension gets updated.

Failed response:

status

yes

int

Please see the error code list for more details.

Table 7: listAccount

getSIPAccount

The “getSIPAccount” action will return information about specific extension.

  • Request
{
"request":{
"action":"getSIPAccount",
"cookie":"sid877877-1574437822",
"extension":"1000"
}
}
  • Response
{
    "response":{
        "cti_feature_privilege":{
            "active_call":"no",
            "callbarge":"no",
            "extension_status":"no",
            "hangup":"no"
        },
        "extension":{
            "account_type":"SIP(WebRTC)",
            "alertinfo":null,
            "allow":"ulaw,alaw,gsm,g726,g722,g729,h264,ilbc",
            "authid":null,
            "auto_record":"off",
            "bypass_outrt_auth":"no",                                     
            "call_waiting":"yes",
            "callbarging_monitor":"",
            "cc_agent_policy":"never",
          "cc_max_agents":1,
            "cc_max_monitors":2,
            "cc_monitor_policy":"never",
            "cidnumber":"1000",
            "custom_autoanswer":"no",
            "directmedia":"no",
            "dnd":"no",
            "dnd_timetype":0,
            "dndwhitelist":"",
            "dtmfmode":"rfc2833",
            "emergcidnumber":null,
            "en_ringboth":"no",
            "enable_ldap":"yes",
            "enable_qualify":"no",
            "enable_webrtc":"yes",
            "enablehotdesk":"no",
            "encryption":"no",
            "extension":"1000",
            "external_number":null,
            "fax_gateway":"no",
            "faxdetect":"no",
            "fullname":null,
            "fwdwhitelist":null,
            "hasvoicemail":"yes",
            "ice_support":"yes",
            "intranet_ip_filter":"no",
            "limitime":null,
            "local_network1":null,
            "local_network10":null,
            "local_network2":null,
            "local_network3":null,
            "local_network4":null,
            "local_network5":null,
            "local_network6":null,
            "local_network4":null,
            "local_network5":null,
            "local_network6":null,
            "local_network7":null,
            "local_network8":null,
            "local_network9":null,
            "max_contacts":1,
            "media_encryption":"auto_dtls",
            "missed_call":"no",
            "mohsuggest":"default",
            "nat":"yes",
            "out_of_service":"no",
            "permission":"internal",
            "presence_def_script":null,
            "presence_status":"available",
            "qualify":1000,
            "qualifyfreq":60,
            "ring_timeout":null,
            "ringboth_timetype":0,
            "sca_enable":"no",
            "seamless_transfer_members":"",
            "secret":"pas0",
            "sendtofax":null,
            "skip_auth_timetype":0,
            "skip_vmsecret":"no",
            "specific_ip":null,
            "strategy_ipacl":0,
            "t38_udptl":"no",
            "tel_uri":"disabled",
            "use_avpf":"yes",
            "use_callee_dod_on_fm":"no",
            "use_callee_dod_on_fwd_rb":"no",
            "user_outrt_passwd":null,
            "vmsecret":"5333"
},
"sip_presence_settings":[
            {
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"available"
            },
"sip_presence_settings":[
            {
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"available"
            },
           {
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"away"
            },
            {
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"chat"
            },
            {
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"unavailable"
            },
{
                "cfb":null,
                "cfb_destination_type":"0",
                "cfb_timetype":0,
                "cfn":null,
                "cfn_destination_type":"0",
                "cfn_timetype":0,
                "cfu":null,
                "cfu_destination_type":"0",
                "cfu_timetype":0,
                "presence_status":"userdef"
            }
        ],
        "voicemail":{
            "vm_attach":null,
            "vm_reserve":null
        }
    },
    "status":0
}

Note: If you only want to get some parameters regarding a specific extension, users can specify that parameter in the sending request.

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

extension

Existing extension number

yes

string

Specify which extension's configuration to retrieve.

Successful response

status

0

yes

int

The response is successful, status is 0.

extension

no

Json obj

The specific configuration of the extension.

account_type

SIP, IAX, FXS, SIP(WebRTC)

no

string

Extension type.

fullname

no

string

Caller ID Name, which consists of first_name, space, and last name.

hasvoicemail

yes, no

no

string

Indicates whether voicemail is enabled or disabled.

cidnumber

no

string

Caller ID of incoming calls.

secret

no

string

SIP/IAX password.

vmsecret

no

string

Voicemail password.

skip_vmsecret

Yes, no

no

string

Indicates whether an extension will need to enter a password when dialing into voicemail.

ring_timeout

no

int

Extensions’ ring timeout. If unspecified, the system ring timeout will be used. Default is 60 seconds.

auto_record

all, external, internal, off

no

string

Auto-recording.

all:all incoming calls to the extension will be recorded

external: only calls to external numbers will be

recorded.

internal: only calls to internal numbers will be

recorded.

off: No calls will be recorded.

encryption

no, yes, support

no

string

SRTP encryption mode. Set whether to turn on SRTP mode to encrypt RTP streams.

Support: Enable but not forced.

faxdetect

no, yes

no

string

Configure the mode of using fax. There are 2 available settings. The default is “no”.

no:Disable fax related features.
yes (Fax detection): Fax signals from this user or the trunk can be detected during a call. The received fax will be sent to the email address set for the user. If the user's email address is not configured, the fax will be sent to the default email address set on the fax page.

sendtofax

yes, no

no

string

Indicates whether fax will also be sent to the extension’s configured email address when receiving a fax call.

strategy_ipacl

0,1,2

no

int

Indicates the device’s ACL policy.
0(Allow All):Any IP address can register to this extension.
1(Local Network): Only IP addresses in the configured subnets can register to this extension. Devices on the UCM’s subnet is allowed by default. Up to 10 subnets can be added.
2 (Special IP address): This option seems to have been merged with 1 (Local Network) in 1.0.20.x

local_network1

no

string

local_network1-10 are the subnets that are allowed to register to the extension when 1 is configured as the value for strategy_ipacl.

local_network2

no

string

local_network3

no

string

local_network4

no

string

local_network5

no

string

local_network6

no

string

local_network7

no

string

local_network8

no

string

local_network9

no

string

local_network10

no

string

specific_ip

no

string

When the policy is 2, that is, Special IP Address, Format is xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.

allow

ulaw, alaw, gsm, g726, g722, g729, h264, ilbc, g726aal2, adpcm, g723, h263, h263p, vp8, opus, h265, rtx

no

string

The extension’s supported codecs. Several codecs can be configured for a single extension.

dnd

yes, no

no

string

Indicates DND status.

If set to yes, all calls will be ignored, and the extension’s call forwarding rules will not take effect

dnd_timetype

0,1,2,3,4,5,6,8

no

int

The time conditions where DND status will be enabled.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

permission

internal,internal-local,internal-local-national,internal-local-national-international

no

string

Outbound call permissions of the extension.

internal:Internal

internal-local:Local

internal-local-national:Nationwide

internal-local-national-international:International

nat

yes, no

no

string

Indicates whether the extension is behind a NAT. If the UCM is using a public IP address to communicate with devices behind NAT, one-way audio issues may occur if this option is not enabled, NAT is not configured properly, or if SIP/RTP ports are not supported by the firewall.

bypass_outrt_auth

no, yes, bytime

no

string

Indicates whether the extension can skip password authentication when dialing out of a trunk

yes: Users will not need to enter a password when dialing out of a trunk.

bytime: Users will not need to enter a password when dialing out of a trunk only during the specified time condition.

skip_auth_timetype

0,1,2,3,4,5,6,8

no

int

Time condition where the extension will be able to dial out of a trunk without needing to enter a password.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

t38_udptl

yes, no

no

string

Indicates whether T.38 support is toggled on or off

directmedia

yes, no

no

string

Indicates whether direct media is enabled or not.

No: The PBX will route RTP media streams from SIP

endpoints through itself.

Yes: The PBX will attempt to redirect RTP media streams so that they are only between caller and callee. Note: It is not always possible for the UCM to negotiate endpoint-to endpoint media routing.

dtmfmode

rfc4733, info, inband, auto

no

string

Indicates the DTMF signaling sent from the extension

Info: Signaling is transmitted through SIP messages.

Inband: Signaling is transmitted in audio streams. Requires PCMU and PCMA codec support.

RFC4733: Signaling is transmitted as audio but is encoded separately from the audio stream.

Auto: Selects the signaling to use based on negotiation.

Signaling is preferred in the following priority: RFC4733, Inband, Info

enable_qualify

yes, no

no

string

Indicates whether keep-alive is enabled for this extension.

Yes: The PBX periodically sends SIP OPTION messages to the extension endpoint to monitor and maintain UCM’s connection to the endpoint.

qualifyfreq

no

int

Keep-alive Frequency.

Indicates how often keep-alive messages are sent to this extension’s endpoints.

authid

no

string

Authentication ID.

This is the SIP service subscriber's ID used for authentication. If not configured, the Extension Number will be used for authentication.

tel_uri

disabled, user_phone, enabled

no

string

TEL URI.

Enabled: TEL URI and Remove OBP from Route cannot be enabled at the same time. "Tel:" will be used instead of "SIP:" in the SIP request.

User_Phone: If the phone has an assigned PSTN telephone number, this field should be set. A "User=Phone" parameter will then be attached to the Request-Line and "TO" header in the SIP request to indicate the E.164 number.

enablehotdesk

no, yes

no

string

Indicates whether hotdesking is enabled for this extension.

Yes: SIP Password will accept only alphanumeric characters; Extension will be used for AuthID.

user_outrt_passwd

no

string

Dial Trunk Password

Password that must be entered by the extension to dial out.

out_of_service

yes, no

no

string

Indicates whether the “Disable this Extension” option is toggled on or off for this extension.

Yes: The extension is disabled.

No: The extension is enabled.

mohsuggest

default,ringbacktone_default,……

no

string

Music on Hold.

Indicates the Music on Hold playlist to use when putting parties on hold.

en_ringboth

no,yes

no

string

Ring Simultaneously: Indicates whether the “Ring Simultaneously” option is toggled on or off for this extension

If enabled, both this extension and the configured external number will be rung at the same time. If the calling the external number requires the use of a

register trunk, the register trunk’s number will be displayed to the caller. Failover trunks cannot be used for Ring Simultaneously calls.

external_number

no

string

The external number configured for Ring Simultaneously. Hyphens (-) are ignored

use_callee_dod_on_fwd_rb

no, yes

no

string

Indicates whether the callee’s DOD number will be used as CID for forwarded calls or Ring Simultaneously calls

use_callee_dod_on_fm

no, yes

no

string

Use Callee DOD for Follow Me

Indicates whether to the callee’s DOD number will be used as CID for Follow Me calls.

ringboth_timetype

0,1,2,3,4,5,6, 8

no

int

Time Condition for Ring Simultaneously

The time conditions when Ring Simultaneously will be used

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

enable_ldap

yes, no

no

string

Enable LDAP

Indicates whether this extension can be added to LDAP phonebooks.

max_contacts

no

int

Concurrent Registrations

The maximum allowed number of endpoints that can register to this extension. Supported values: 1-10

custom_autoanswer

no, yes

no

string

Custom Call-info for Auto Answer

Indicates whether the extension supports auto-answer when denoted in Call-info and Alert-info headers.

sca_enable

no, yes

no

string

Enable SCA

Indicates whether or not SCA is enabled for the extension

call_waiting

yes, no

no

string

Call Waiting

Indicates whether calls can be made to the extension while it is already in a call. If disabled, CC service and Call Forward Busy will not work.

emergcidnumber

no

string

Emergency Calls CID

CallerID number that will be used when calling out and receiving direct callbacks.

enable_webrtc

yes, no

no

string

Enable WebRTC Support

Indicates whether this extension supports WebRTC registration and calling.

alertinfo

none, ring1, ring2, ring3, ring4, ring5, ring6, ring7, ring8, ring9, ring10, Bellcore-dr1, Bellcore-dr2

Bellcore-dr3, Bellcore-dr4, Bellcore-dr5, custom

Alert-info

Indicates the alert-info header that will be used in the extension’s INVITE requests to specify a ring tone to be used by the UAS.

limitime

no

int

Maximum Call Duration

Indicates the maximum duration of this extension’s calls. The default value 0 means no limit.

dndwhitelist

no

string

DND whitelist

Displays the numbers that can call this extension even if it has DND enabled. Multiple numbers are separated by commas.

fwdwhitelist

no

string

Forward Whitelist

Displays the numbers that will ignore this extension’s call forwarding rules when calling in. Multiple numbers are separated by commas

callbarging_monitor

no

string

Allow call-barging

Displays the extensions that can barge in and monitor this extensions’ calls via feature code.

seamless_transfer_members

no

string

Allowed to seamless transfer

Displays the extensions that can seamlessly transfer to this extension.

sip_presence_settings

Json array

The specific configuration content of the online status of the SIP extension. The specific content needs to specify which state the presence_status is.

"sip_presence_settings": [ {

"presence_status": "available",

"cfb":"6000" ,

"cfn": null,

"cfu": null,

"cfb_timetype": 1,

"cfn_timetype": 0,

"cfu_timetype": 0,

"cfb_destination_type": "0",

"cfn_destination_type": "0",

"cfu_destination_type": "0"

},{

"presence_status": "unavailable",

"cfb": null,

"cfn": "12345",

"cfu": null,

"cfb_timetype": 0,

"cfn_timetype": 2,

"cfu_timetype": 0,

"cfb_destination_type": "0",

"cfn_destination_type": "0",

"cfu_destination_type": "0"

}]

When available, cfb to extension 6000;

When unavailable, cfn to custom extension 12345.

presence_status

available, away, chat, dnd, userdef, unavailable

no

string

Presence status of this extension. Default is Available.

cfb

no

string

Call Forward Busy (CFB) destination.

Callers will be redirected to this number if the extension is busy.

cfn

no

string

Call Forward No Answer (CFNA) Destination

Callers will be redirected to this number if calls to the extension are not answered before ring timeout.

Note: If  unspecified, this feature is disabled.

cfu

no

string

Call Forward Unconditional (CFU) destination. Callers will always be redirected to this number.

cfb_timetype

0,1,2,3,4,5,6,8

no

string

Call forward busy based on this time condition. CFB will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

cfn_timetype

0,1,2,3,4,5,6,8

no

string

Call forward no answer based on this time condition. CFNA will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

cfu_timetype

0,1,2,3,4,5,6,8

no

string

Call forward unconditional based on this time condition. CFU will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

cfb_destination_type

0,1,2,3,4,5,6,8

Extension type of the CFB destination. If unspecified, CFB will be disabled.0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

cfn_destination_type

0,1,2,3,4,5,6,8

Extension type of the CFNA destination. If unspecified, CFNA will be disabled.

0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

cfu_destination_type

0,1,2,3,4,5,6,8

Extension type of the CFU destination. If unspecified, CFU will be disabled

0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

voicemail

no

Json obj

Specific Configuration of voicemail.

"voicemail": {

"vm_attach": null,

"vm_reserve": null

}

vm_attach

NULL, yes, no

no

string

Send voicemail to email

NULL: “Default”. Global voicemail settings in the Voicemail page will be used

vm_reserve

NULL, yes, no

no

string

Keep Voicemail after Emailing

Only applicable when either condition is fulfilled:

1. Edit Extension→Send Voicemail to Email is

enabled.

2.Voicemail→Voicemail Email Settings→Send

Voicemail to Email is enabled and Edit Extension→Send Voicemail to Email is set to “Default”.

Global voicemail settings in the Voicemail page will be used.

“Default”. Global voicemail settings in the Voicemail page will be used.

Failed response

status

yes

int

Please see the error code list for more details.

Table 8: getSIPAccount

updateSIPAccount

This action will allow users to update an existing SIP account.

  • Request
{
    "request":{
        "action":"updateSIPAccount",
        "cookie":"sid719338887-1574671289",
        "extension":"1000",
        "permission":"internal"
    }
}
  • Response
{
    "response":{
        "extension":{
            "alertinfo":null,
            "extension":"1000"
        }
    },
    "status":0
}

Note

Editing presence configuration requires sending the entire json list of sip_presence_settings. Make sure to specify the presence status when updating presence settings.

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

extension

Required.   2-18 digits

yes

string

Specify which extension's configuration to retrieve.

hasvoicemail

yes, no

no

string

Indicates whether voicemail is enabled or disabled.

cidnumber

no

string

Caller ID of incoming calls.

secret

no

string

SIP/IAX password.

vmsecret

no

string

Voicemail password.

skip_vmsecret

Yes, no

no

string

Indicates whether an extension will need to enter a password when dialing into voicemail.

ring_timeout

Value between 3 and 600. Can be set to “null”. When set to null, global settings will be used.

no

int

Ring Timeout

when set to NULL, the system default ring timeout is used.

auto_record

all, external, internal, off

no

string

Auto-recording.

all:all incoming calls to the extension will be recorded

external: only calls to external numbers will be

recorded.

internal: only calls to internal numbers will be

recorded.

off: No calls will be recorded.

encryption

no, yes, support

no

string

SRTP encryption mode. Set whether to turn on SRTP mode to encrypt RTP streams.

Support: Enable but not forced.

faxdetect

no, yes

no

string

Configure the mode of using fax. There are 2 available settings. The default is “no”.

no:Disable fax related features.
yes (Fax detection): Fax signals from this user or the trunk can be detected during a call. The received fax will be sent to the email address set for the user. If the user's email address is not configured, the fax will be sent to the default email address set on the fax page.

sendtofax

yes, no

no

string

Indicates whether fax will also be sent to the extension’s configured email address when receiving a fax call.

strategy_ipacl

0,1,2

no

int

Indicates the device’s ACL policy.
0(Allow All):Any IP address can register to this extension.
1(Local Network): Only IP addresses in the configured subnets can register to this extension. Devices on the UCM’s subnet is allowed by default. Up to 10 subnets can be added.
2 (Special IP address): This option seems to have been merged with 1 (Local Network) in 1.0.20.x

local_network1

no

string

local_network1-10 are the subnets that are allowed to register to the extension when 1 is configured as the value for strategy_ipacl.

local_network2

no

string

local_network3

no

string

local_network4

no

string

local_network5

no

string

local_network6

no

string

local_network7

no

string

local_network8

no

string

local_network9

no

string

local_network10

no

string

specific_ip

IP address

no

string

When the policy is 2, that is, Special IP Address, Format is xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.

allow

ulaw,alaw,gsm,g726,g722,g729,h264,ilbc,g726aal2,adpcm,g723,h263,h263p,vp8,opus,h265,rtx

no

string

The extension’s supported codecs. Several codecs can be configured for a single extension.

dnd

yes, no

no

string

Do Not Disturb.

yes: All calls will be ignored, and the call forward unconditional/ no answer/ busy of the extension will not take effect.

dnd_timetype

0,1,2,3,4,5,6,8

no

int

The time conditions where DND status will be enabled.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

permission

internal,internal-local,internal-local-national,internal-local-national-international

no

string

Select outbound permission.

internal:internal

internal-local:local

internal-local-national:nationwide

internal-local-national-international:international

nat

yes, no

no

string

NAT is used when UCM uses public IP and communicates with devices hidden behind a NAT network, such as a broadband router. You may encounter one-way audio problem. This type of problem is often associated with NAT configuration or SIP and RTP ports supported by the firewall.

bypass_outrt_auth

no, yes, bytime

no

string

Skip trunk authentication.

yes: When dialing an external line, the user does not need to enter a password;

bytime: dial an external line in the set time condition, the user does not need to enter a password.

skip_auth_timetype

0,1,2,3,4,5,6,8

no

int

Time condition where the extension will be able to dial out of a trunk without needing to enter a password.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

t38_udptl

yes, no

no

string

Whether to support T.38 UDPTL.

directmedia

yes, no

no

string

Whether to enable direct media.

No: the PBX will route the media streams from SIP endpoints through itself.

Yes: the PBX will attempt to redirect the RTP media streams to bypass the PBX and to go directly between caller and callee. Note: It is not always possible for the PBX to negotiate endpoint-to-endpoint media routing.

dtmfmode

rfc4733, info, inband, auto

no

string

Default mode of sending DTMF signal.

The DTMF signal is carried by the info method of SIP signaling. Inband: Requires 64kbit codec PCMU and PCMA.

Auto: Adaptive preference is for RFC2833, followed by inband.

enable_qualify

yes, no

no

string

Enable keeping-alive.

Yes: The PBX periodically sends SIP OPTION signaling to detect if the host is online

qualifyfreq

Required. Set a value between 1

and 3600.

no

int

Keep-alive Frequency.

When the host is on, set the interval of sending keep-alive messages measured in seconds.

authid

Up to 32 characters excluding

space., ;:?"()<>@,\/[]={}.

no

string

Authentication ID.

This is the SIP service subscriber's ID used for authentication. If not configured, the Extension Number will be used for authentication.

tel_uri

disabled, user_phone, enabled

no

string

TEL URI.

Enabled: TEL URI and Remove OBP from Route cannot be enabled at the same time. "Tel:" will be used instead of "SIP:" in the SIP request.

User_Phone: If the phone has an assigned PSTN telephone number, this field should be set. A "User=Phone" parameter will then be attached to the Request-Line and "TO" header in the SIP request to indicate the E.164 number.

enablehotdesk

no, yes

no

string

Support Hot-desking Mode

yes:SIP Password will accept only alphanumeric characters; Extension will be used for AuthID.

user_outrt_passwd

4-10 digits

no

string

Dial Trunk Password

Configure personal password when making outbound calls.

out_of_service

yes, no

no

string

Whether to disable this extension

yes:disable

no:enable

mohsuggest

Required: default,

ringbacktone_default, MoH playlist name, etc

no

string

Music on Hold.

Specify which Music on Hold class to suggest to the bridged channel when putting them on hold.

en_ringboth

no,yes

no

string

Ring Simultaneously

If you want the extension and external number to ring simultaneously, check this box. If you use register trunk for outbound calls, the caller will display the registered number. The outbound call will use only the main trunk. The failover trunk will not be used.

external_number

Up to 32 alphanumeric characters

and special characters +-*#

no

string

Set the external number for Ring Simultaneously. "-" is the connection character and will be ignored.

use_callee_dod_on_fwd_rb

no, yes

no

string

yes: Use the callee's DOD number as callerID on Outgoing Forwarding or Ring Simultaneously calls.

use_callee_dod_on_fm

no, yes

no

string

Use Callee DOD for Follow Me

Use the callee DOD number as CID if configured Follow Me numbers are external numbers.

ringboth_timetype

0,1,2,3,4,5,6, 8

no

int

Time Condition for Ring Simultaneously

The time conditions when Ring Simultaneously will be used

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

enable_ldap

yes, no

no

string

Enable LDAP

yes: If enabled, the extension will be added to LDAP Phonebook PBX lists.

max_contacts

Value between 1 and 10

no

int

Concurrent Registrations

The maximum endpoints which can be registered to this extension. Value: 1-10.

custom_autoanswer

no, yes

no

string

Custom Call-info for Auto Answer

yes: If checked, the invite message sent to the extension will contain a Call-info header to indicate auto answer.

sca_enable

no, yes

no

string

Enable SCA.

call_waiting

yes, no

no

string

Call waiting

yes: Allows calls to the extension even when it is already in a call. This only works if the caller is directly dialing the extension. If disabled, the CC service and busy in-call forward will not work.

emergcidnumber

2-32 alphanumeric characters

no

string

Emergency Calls CID

CallerID number that will be used when calling out and receiving direct callbacks.

enable_webrtc

yes, no

no

string

Enable WebRTC Support

Enable registration and call from WebRTC.

alertinfo

none, ring1, ring2, ring3, ring4, ring5, ring6, ring7, ring8, ring9, ring10, Bellcore-dr1, Bellcore-dr2

Bellcore-dr3, Bellcore-dr4, Bellcore-dr5, custom

Alert-info

When present in an INVITE request, the Alert-info header field specifies an alternative ring tone to the UAS.

limitime

Value between 0 and 86400

no

int

Maximum Call Duration

The maximum call duration (in seconds). The default value 0 means no limit.

dndwhitelist

no

string

DND whitelist

Multiple numbers are supported and separated by commas.

fwdwhitelist

no

string

Forward Whitelist

Set extension numbers, multiple can be separated by commas. Calls from users in the forward whitelist will not be forwarded.

callbarging_monitor

no

string

Set up Allow call-barging list. Members of the list can spy on this extension via feature codes. Multiple extensions can be set, separated by commas.

seamless_transfer_members

no

string

Set up Allow to seamless transfer list. Members of the list can seamlessly transfer via feature code. Multiple extensions can be set, separated by commas.

sip_presence_settings

Json array

The specific configuration content of the online status of the SIP extension. The specific content needs to specify which state the presence_status is.

"sip_presence_settings": [ {

"presence_status": "available",

"cfb":"6000" ,

"cfn": null,

"cfu": null,

"cfb_timetype": 1,

"cfn_timetype": 0,

"cfu_timetype": 0,

"cfb_destination_type": "0",

"cfn_destination_type": "0",

"cfu_destination_type": "0"

},{

"presence_status": "unavailable",

"cfb": null,

"cfn": "12345",

"cfu": null,

"cfb_timetype": 0,

"cfn_timetype": 2,

"cfu_timetype": 0,

"cfb_destination_type": "0",

"cfn_destination_type": "0",

"cfu_destination_type": "0"

}]

When available, cfb to extension 6000;

When unavailable, cfn to custom extension 12345.

presence_status

available, away, chat, dnd, userdef, unavailable

no

string

Set the presence status of this extension. Default is Available. To set the transfer destination, configure call transfer.

cfb

no

string

Configure the target number to be forwarded to for Call Forward Busy(CFB).

 Incoming calls during busy time will be forwarded to the entered extension.

Corresponds to the extension number under the cfb_destination_type type.

cfn

no

string

Configure the target number to be forwarded to for Call Forward No Answer(CFN).

Incoming calls that are not answered after ring timeout will be forwarded to the entered extension.

Note: If not specified, this feature is disabled. Corresponds to the extension number under the cfn_destination_type type.

cfu

no

string

Configure the target number to be forwarded to for Call Forward Unconditional(CFU). All incoming calls will be forwarded to the entered extension unconditionally. Corresponds to the extension number under the cfu_destination_type type.

cfb_timetype

0,1,2,3,4,5,6,8

no

string

Call forward busy based on this time condition. CFB will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

cfn_timetype

0,1,2,3,4,5,6,8

no

string

Call forward no answer based on this time condition. CFNA will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

cfu_timetype

0,1,2,3,4,5,6,8

no

string

Call forward unconditional based on this time condition. CFU will be active only during the selected time condition.

0:All Time

1:Office Time

2:Out of Office Time

3:Holiday

4: Out of Holiday

5:Out of office time or holiday

6:Specific time

8:Office time and out of holiday

cfb_destination_type

0,1,2,3,4,5,6

Extension type of the CFB destination. If unspecified, CFB will be disabled.0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

cfn_destination_type

0,1,2,3,4,5,6

Extension type of the CFNA destination. If unspecified, CFNA will be disabled.

0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

cfu_destination_type

0,1,2,3,4,5,6

Extension type of the CFU destination. If unspecified, CFU will be disabled

0: None

1: Extension

2: Custom Number

3: Voicemail

4: Ring Group

5: Queues

6: Voicemail Group

vm_attach

yes, no

If set to NULL, global setting will be used.

no

string

Send voicemail to email

NULL: the global setting will be used.

vm_reserve

Yes, no, NULL If set to NULL, global setting will be used.

no

string

Keep Voicemail after Emailing

Only applies if extension-level is enabled or global Send Voicemail to Email is enabled and extension-level is default.

NULL: the global setting will be used.

Successful response

status

0

yes

int

Successful response,status is 0

Failed response

status

yes

int

Please see the error code list for more details.

Table 9: updateSIPAccount

Trunk

listVoIPTrunk

The “listVoIPTrunk” action will allow users to get information about the existing SIP trunk, such as the trunk’s name, its IP address etc.

Note

The needed information, can be defined in the parameter “options”. Otherwise all the information will be returned.

  • Request
{
    "request":{
        "action":"listVoIPTrunk",
        "cookie":"sid719338887-1574671289",
        "options":"trunk_index,trunk_name,trunk_type"
    }
}

  • Response
{
    "response":{
        "page":1,
        "total_item":3,
        "total_page":1,
        "voip_trunk":[
            {
                "trunk_index":2,
                "trunk_name":"test",
                "trunk_type":"peer"
            },
            {
                "trunk_index":3,
                "trunk_name":"test2",
                "trunk_type":"peer"
            },
            {
                "trunk_index":4,
                "trunk_name":"test12",
                "trunk_type":"peer"
            }
        ]
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Page

no

int

Get extension list by page number.

item_num

no

int

Number of trunks to return for the request. If unspecified, all trunks will be returned.

Sord

acs,desc

no

string

Sorting method. acs stands for ascending, and desc stands for descending.

Sidx

no

string

Sort by trunk index. This is based on trunk creation date.

options

trunk_index, trunk_name, host, trunk_type, username, technology, ldap_sync_enable, trunks.out_of_service

no

string

Specify the information to return. Multiple options can be selected and must be separated by commas. If unspecified, all the listed information will be returned.

Successful response

status

0

yes

int

Successful response, status is 0

voip_trunk

yes

Json array

VOIP trunk list

total_item

yes

int

Total number of items that were returned.

total_page

yes

int

Total number of pages in the list.

page

yes

int

What page is on. 

trunk_index

no

string

Trunk ID

trunk_name

no

string

Trunk name

Host

no

string

Host

trunk_type

peer, register

no

string

Trunk type

Peer trunk and register trunk

username

no

string

Username of register trunk.

NULL for peer trunk.

Failed response

status

yes

int

Please see the error code list for more details.

Table 10: listVoIPTrunk

addSIPTrunk

The “addSIPTrunk” action will allow users to create SIP trunks.

  • Request
{
    "request":{
        "action":"addSIPTrunk",
        "cookie":"sid719338887-1574671289",
        "host":"192.168.5.222",
        "trunk_name":"GStest",
        "trunk_type":"peer"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk_name

yes

string

Trunk name

Host

yes

string

Host

trunk_type

Peer, register

yes

string

Trunk type

Username

Up to 64 characters

yes

string

Configure the username to authenticate with the VoIP provider.

Secret

Configure the password to authenticate with the VoIP provider. Required for register trunks.

The rest options are Same as updateSIPTrunk

Successful response

Status

0

yes

int

The response is successful, status is 0

Failed response

Status

yes

int

Please see the error code list for more details.

Table 11: addSIPTrunk

getSIPTrunk

The “getSIPTrunk” will allow users to get information about a specific trunk.

  • Request
{
    "request":{
        "action":"getSIPTrunk",
        "cookie":"sid23597213-1574672527",
        "trunk":"3"
    }
}
  • Response
{
    "response":{
        "trunk":{
            "allow":"ulaw,alaw,gsm,g726,g729,ilbc",
            "allow_outgoing_calls_if_reg_failed":"yes",
            "auth_trunk":"no",
            "authid":null,
            "auto_recording":"no",
            "cc_agent_policy":"never",
            "cc_max_agents":5,
            "cc_max_monitors":5,
            "cc_monitor_policy":"never",
            "cidname":null,
            "cidnumber":null,
            "dialin_direct":"no",
            "did_mode":"request-line",
            "dtmfmode":null,
            "enable_qualify":"no",                     
            "encryption":"no",
            "fromdomain":null,
            "fromuser":null,
            "host":"1.2.55.4",
            "keepcid":"no",
            "keeporgcid":"no",
            "ldap_custom_prefix":null,
            "ldap_default_outrt":null,
            "ldap_default_outrt_prefix":null,
            "ldap_sync_enable":"no",
            "ldap_sync_passwd":null,
            "ldap_sync_port":null,
            "nat":"no",
            "need_register":"no",
            "out_maxchans":0,
            "out_of_service":"no",
            "outboundproxy":null,
            "pai_number":null,
            "passthrough_pai":"yes",
            "qualifyfreq":60,
            "rmv_obp_from_route":"no",
            "secret":null,
            "send_ppi":"no",
            "status":"Unmonitored",
            "tel_uri":"disabled",
            "transport":"udp",
            "trunk_index":3,
            "trunk_name":"test2",
            "trunk_type":"peer",
            "uri_sip_or_sips":0,
            "use_dod_as_from_name":"no",
            "use_dod_in_ppi":"no",
            "use_for_sfu_conf":"no",
            "use_origcid_in_ppi":"no",
            "username":null
}
    },
    “status”:0
}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk

yes

string

Retrieves the configuration of the specified trunk. Please enter the trunk ID.

Successful response

status

0

yes

int

The response is successful, status is 0.

trunk

yes

Json, obj

Specific Trunk configuration.

trunk_index

yes

string

Trunk id.

allow

ulaw,alaw,gsm,g726,g729,ilbc,g722,g726aal2,adpcm,g723,h263,h263p,h264,h265,vp8,opus,rtx.

no

string

The trunk’s supported codecs

allow_outgoing_calls_if_reg_failed

yes, no

no

string

Whether outgoing calls are allowed the trunk is unable to register successfully.

auth_trunk

yes, no

no

string

Authenticate trunk.

If enabled, UCM will respond to incoming calls with 401 message to authenticate the trunk.

authid

no

string

Authenticate ID

This is the SIP service subscriber's ID used for authentication. If not configured, the Extension Number will be used for authentication.

auto_recording

no, yes

no

string

Auto record.

cc_agent_policy

native, never

no

string

To enable CC service

Control together with cc_monitor_policy.

CC service is enabled if both cc_agent_policy and cc_monitory_policy are native. It is disabled if both are set to never.

cc_max_agents

no

int

The maximum number of CCSS agents that may be allocated to this channel. In other words, this number is the maximum number of CC requests this channel is allowed to make.

cc_max_monitors

no

int

The maximum number of monitor structures which may be created for this device. In other words, this number tells how many callers may request CC services for a specific device at one time.

cc_monitor_policy

native, never

no

string

To enable CC service

Control together with cc_agent_policy.

CC service is enabled if both cc_agent_policy and cc_monitory_policy are native. It is disabled if both are set to never.

cidname

no

string

Caller ID Name

CID name for this trunk that will be used if the caller does not have CID name configured.

cidnumber

no

string

Caller ID

Number that the trunk will try to use when making outbound calls.

CID priority from highest to lowest is as follows:

From User (register trunk only) > Inbound Call CID (enable using remote CID) > Trunk CID/register trunk username (Keep Trunk CID enabled) > DOD CID(with correspond DOD configuration) > Extension CID > Register Trunk Username (for register trunk only, Keep Trunk CID disabled) > Global Outbound CID.

Note: Certain providers may ignore this CID.

dialin_direct

no, yes

no

string

Direct callback

Allows external numbers the option to get directed to the extension that last called them.

did_mode

request-line, to-header

no

string

Direct callback

Allows external numbers the option to get directed to the extension that last called them.

dtmfmode

null, rfc2833, info, inband, auto

no

string

Configures the mode for sending DTMF.

Null: Use global setting.

RFC4733 (default): DTMF is transmitted as audio in the RTP stream but is encoded separately from the audio stream. Backward-compatible with RFC2833.

Info: DTMF is transmitted through SIP signaling using info method.

Inband: DTMF is transmitted as audio and is included in the audio stream.

Auto: self-adjust

enable_qualify

yes, no

no

string

Enable Heartbeat Detection

yes:the PBX will regularly send SIP OPTIONS to check if the device is online.

encryption

no, yes, support

no

string

SRTP encryption mode

Toggles support for RTP stream encryption.

fax_intelligent_route

no

string

Enable fax intelligent routing. Set the destination to which the fax will be forwarded when a fax is detected. The following options are available:

  • Extension: Sends a fax to the specified extension when a fax is detected. If FXS extension is selected here, the fax will be sent to the FXS extension.

  • • Fax to E-mail: When the fax is detected, the fax will be sent as an attachment to the specified e-mail address. The e-mail address can be the extension's mailbox or self-identification. Define a mailbox.

Note: If you need to send a fax to your mailbox, make sure that the Mailbox in System is set up correctly.

fax_intelligent_route_destination

no

string

Fax destination. The destination of fax intelligent routing can only be a fax extension or an fxs extension with a fax device.

faxdetect

yes, no

no

string

Fromdomain

no

string

From domain

Configure the actual domain where the extension comes from. Can override From field. For example,"trunk.UCM6510.provider.com "is the domain name of the following From header field. sip:1234567@trunk.UCM6510.provider.com

fromuser

no

string

Configure the actual user

Can override From header field. A single ID could register multiple DID. For example "1234567”is the username of the following From header field: sip:1234567@trunk.UCM6510.provider.com

host

no

string

Enter the IP address or hostname of the VoIP provider's server.

keepcid

no, yes

no

string

Keep Trunk CID

yes: Trunk CID will not be overwritten by host CID. When set to yes, cidnumber is mandatory.

keeporgcid

no, yes

no

string

Keep Original CID

Keep CID from the inbound call when dialing out even if option "Keep Trunk CID" is enabled. Please make sure the peer PBX at the other end supports matching user entry using the "username" field from the authentication line.

ldap_custom_prefix

no

string

LDAP Dialed Prefix

System will automatically modify the remote contacts by adding this prefix. When ldap_default_outrt is set to self-defined, use this prefix.

ldap_default_outrt

no

int

LDAP Outbound Rule

Specify an outbound rule. The PBX system will automatically modify the remote contacts by adding prefix parsed from this rule.

If null and ldap_default_outrt_prefix is configured, use custom outbound prefix. If null, no outbound prefix is added by default.

ldap_sync_enable

no, yes

no

string

Sync LDAP Enable

Provide and update the local LDAP contact to a remote peer automatically (SIP peer trunk only). To ensure successful synchronization, the remote peer needs to enable this service and set the same password as the local UCM.

ldap_sync_passwd

no

string

Sync LDAP Password

This is the password used for LDAP contact file encryption and decryption. The password must be the same for both peers to ensure successful synchronization.

ldap_sync_port

no

int

Sync LDAP Port

The TCP port used by this service.

nat

no, yes

no

string

Enable this setting if the UCM is using public IP and communicating with devices behind NAT.

Note 1: This setting will overwrite the Contact header of received messages, which may affect the ability to establish calls when behind NAT. Consider changing settings in PBX Settings->SIP Settings->NAT instead.

If one is experiencing one-way audio issues, please check the NAT configuration and SIP/RTP ports in the firewall.

need_register

no, yes

no

string

Whether to register on the external server.

out_maxchans

no

int

The number of current outgoing calls over the trunk at the same time. The default value 0 means no limit.

out_of_service

no

int

The number of current outgoing calls over the trunk at the same time. The default value 0 means no limit.

outboundproxy

no

string

Outbound proxy

When configured, the outbound signal will be sent to the proxy instead of the devices directly. The outbound proxy can be domain name or IP address.

pai_number

no

string

PAI Header

PAI header for the trunk formatted as “name<number>”, “<number>”, or “number”. If not configured, CID will be used instead.

passthrough_pai

yes, no

no

string

Passthrough PAI Header

If enabled and "Send PAI Header" is disabled, PAI headers will be preserved as calls pass through the UCM.

qualifyfreq

no

int

Configure the frequency (in seconds) to send SIP OPTIONS messages to check the status of the device. Default is 60.

rmv_obp_from_route

no, yes

no

string

Remove OBP from Route

If enabled, the outbound proxy URI in the Route header will be removed from SIP requests. Default setting is “No”.

secret

no

string

Password of register trunk

send_ppi

yes, no

no

string

Send PPI Header

Yes: the invite message sent to trunks will contain PPI (P-Preferred-Identity) Header.

status

Unknown, Unmonitored, Reachable, Unreachable, Registered, Unregistered, Lagged, Failed, Request Sent, Rejected, Timeout, No Authentication

no

string

tel_uri

disabled, user_phone, enabled

no

string

TEL URI

Enabled: TEL URI and Remove OBP from Route cannot be enabled at the same time. If set to "Enable", "Tel:" will be used instead of "SIP:" in the SIP request.

User_phone: If the phone has an assigned PSTN telephone number, this field should be set. A "User=Phone" parameter will then be attached to the Request-Line and "TO" header in the SIP request to indicate the E.164 number.

transport

udp, tcp, tls

no

string

Configure the SIP Transport method. Using TCP requires local TCP support; using TLS requires local TLS support.

trunk_index

no

string

Trunk ID

trunk_name

no

string

Provider name

Configure a unique label to identify the trunk when listed in outbound rules and incoming rules.

trunk_type

peer, register

no

string

Trunk type

Peer trunk or register trunk

use_dod_in_ppi

no, yes

no

string

Displays whether the DOD is being used for the PPI header.

If both use_dod_in_pi and use_origcid_in_ppi are set to “no”, CID will be used for the PPI header.

use_origcid_in_ppi

yes, no

no

string

Displays whether or not the original CID is used for the PPI header.

If both use_dod_in_pi and use_origcid_in_ppi are set to “no”, CID will be used for the PPI header.

username

no

string

Configure the username to authenticate with the VoIP provider.

use_for_sfu_conf

yes, no

no

string

IPVT Mode

Enabling this will allow UCM to establish communication with IPVT.

Failed response

status

yes

string

Please see the error code list for more details.

Table 12: getSIPTrunk

updateSIPTrunk

The “updateSIPTrunk” action will allow users to update existing SIP trunk while specifying the trunk’s number.

  • Request
{
    "request":{
        "action":"updateSIPTrunk",
        "cookie":"sid23597213-1574672527",
        "trunk":"5",
        "trunk_name":"GS1"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

cookie

yes

string

Cookie: Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk

yes

string

Trunk id, specify which trunk to edit.

allow

ulaw, alaw, gsm, g726, g729, ilbc, g722, g726aal2, adpcm, g723, h263, h263p, h264, h265, vp8, opus, rtx, mandatory

no

string

Supported codec, multiple can be set.

allow_outgoing_calls_if_reg_failed

yes, no

no

string

Whether outgoing calls are allowed when registration failed

no:Calls are not allowed when the registration fails. If no outgoing registration is set, this configuration item can be ignored.

auth_trunk

yes, no

no

string

Authenticate trunk
yes: the UCM will send a 401 response to the incoming call to authenticate the trunk.

authid

Up to 64 characters

no

string

Authenticate ID

This is the SIP service subscriber’s ID used for authentication. If not configured, the Extension Number will be used for authentication.

auto_recording

no, yes

no

string

Auto record.

cc_agent_policy

native, never

no

string

To enable CC service

Control together with cc_monitor_policy.

When cc_agent_policy and cc_monitor_policy are native at the same time, service is enables. When both are never, service is disabled.

cc_max_agents

1-999

no

int

The maximum number of CCSS agents that may be allocated to this channel. In other words, this number is the maximum number of CC requests this channel is allowed to make.

cc_max_monitors

1-999

no

int

The maximum number of monitor structures which may be created for this device. In other words, this number tells how many callers may request CC services for a specific device at one time.

cc_monitor_policy

native, never

no

string

To enable CC service

Control together with cc_agent_policy.

When cc_agent_policy and cc_monitor_policy are native at the same time, service is enables. When both are never, service is disabled.

cidname

2-64 characters

no

string

Caller ID Name

Configure the new name of the caller when the extension has no CallerID Name configured.

cidnumber

2-64 characters

no

string

Caller ID

Number that the trunk will try to use when making outbound calls.

CID priority from highest to lowest is as follows:

From User (register trunk only) > Inbound Call CID (enable using remote CID) > Trunk CID/register trunk username (Keep Trunk CID enabled) > DOD CID(with correspond DOD configuration) > Extension CID > Register Trunk Username (for register trunk only, Keep Trunk CID disabled) > Global Outbound CID.


Note: Certain providers may ignore this CID.

dialin_direct

no, yes

no

string

Direct callback

Allows external numbers the option to get directed to the extension that last called them.

did_mode

request-line, to-header

no

string

DID Mode

Configure to obtain the destination ID of an incoming SIP call from SIP Request-line or To header.

dtmfmode

Null, rfc4733, info, inband, auto

no

string

Configures the mode for sending DTMF.

Null: Use global setting.

RFC4733 (default): DTMF is transmitted as audio in the RTP stream but is encoded separately from the audio stream. Backward-compatible with RFC2833.

Info: DTMF is transmitted through SIP signaling using info method.

Inband: DTMF is transmitted as audio and is included in the audio stream.

Auto: self-adjust

enable_qualify

yes, no

no

string

Enable Heartbeat Detection

yes:the PBX will regularly send SIP OPTIONS to check if the device is online.

encryption

no, yes, support

no

string

SRTP encryption mode

Set whether to turn on SRTP mode to encrypt RTP streams.

fax_intelligent_route

no

string

Enable fax intelligent routing. Set the destination to which the fax will be forwarded when a fax is detected. The following options are available:

  • Extension: Sends a fax to the specified extension when a fax is detected. If FXS extension is selected here, the fax will be sent to the FXS extension.

  • Fax to E-mail: When the fax is detected, the fax will be sent as an attachment to the specified e-mail address. The e-mail address can be the extension’s mailbox or self-identification. Define a mailbox. Note: If you need to send a fax to your mailbox, make sure that the Mailbox in System is set up correctly.

fax_intelligent_route_destination

no

string

Fax destination. The destination of fax intelligent routing can only be a fax extension or an fxs extension with a fax device.

fromdomain

Up to 60 characters

no

string

From domain

Configure the actual domain where the extension comes from. Can override From field. For example,”trunk.UCM6510.provider.com “is the domain name of the following From header field. sip:1234567@trunk.UCM6510.provider.com

fromuser

Up to 64 characters

no

string

Configure the actual user,Can override From header field. A single ID could register multiple DID. For example “1234567”is the username of the following From header field: sip:1234567@trunk.UCM6510.provider.com

host

Required. Up to 60 characters.

no

string

Enter the IP address or hostname of the VoIP provider’s server.

keepcid

no, yes

no

string

Keep Trunk CID

yes: Trunk CID will not be overwritten by host CID. When set to yes, cidnumber is mandatory.

keeporgcid

no, yes

no

string

Keep Original CID

Keep CID from the inbound call when dialing out even if option “Keep Trunk CID” is enabled. Please make sure the peer PBX at the other end supports matching user entry using the “username” field from the authentication line.

ldap_custom_prefix

1-14 characters

no

string

LDAP Dialed Prefix

System will automatically modify the remote contacts by adding this prefix. When ldap_default_outrt is set to self-defined, use this prefix.

ldap_default_outrt

The existing outgoing route id

no

int

LDAP Outbound Rule

Specify an outbound rule. The PBX system will automatically modify the remote contacts by adding prefix parsed from this rule.

If null and ldap_default_outrt_prefix is configured, use custom outbound prefix. If null, no outbound prefix is added by default.

ldap_sync_enable

no, yes

no

string

Sync LDAP Enable

Provide and update the local LDAP contact to a remote peer automatically (SIP peer trunk only). To ensure successful synchronization, the remote peer needs to enable this service and set the same password as the local UCM.

ldap_sync_passwd

4-64 alphanumeric characters and underscore (_) only.

no

string

Sync LDAP Password

This is the password used for LDAP contact file encryption and decryption. The password must be the same for both peers to ensure successful synchronization.

ldap_sync_port

Value between 1-65534

no

int

Sync LDAP Port

The TCP port used by this service.

nat

no, yes

no

string

Enable this setting if the UCM is using public IP and communicating with devices behind NAT.

Note 1: This setting will overwrite the Contact header of received messages, which may affect the ability to establish calls when behind NAT. Consider changing settings in PBX Settings->SIP Settings->NAT instead.

If one is experiencing one-way audio issues, please check the NAT configuration and SIP/RTP ports in the firewall.

This configuration needs to be confirmed under real situation because it will change the Contact header field of incoming message in tun affects the establishing of calls. Under NAT environment, it requires configuring on NAT interface of SIP settings.

need_register

no, yes

no

string

Whether to register on the external server.

out_maxchans

Value between 0-999

no

int

The number of current outgoing calls over the trunk at the same time. The default value 0 means no limit.

out_of_service

no, yes

no

string

Whether to disable the trunk.

outboundproxy

Domain name or IP address

no

string

Outbound proxy

When configured, the outbound signal will be sent to the proxy instead of the devices directly. The outbound proxy can be domain name or IP address.

pai_number

Up to 60 characters

no

string

PAI Header

The user and name of the PAI header, it is formatted as “name<number>” or “<number>” or “number”. If null, use the CID according to the priority.

passthrough_pai

yes, no

no

string

Passthrough PAI Header

If enabled and “Send PAI Header” is disabled, PAI headers will be preserved as calls pass through the UCM.

qualifyfreq

Value between 1-3600

no

int

Configure the frequency (in seconds) to send SIP OPTIONS messages to check the status of the device.

Default is 60.

rmv_obp_from_route

no, yes

no

string

Remove OBP from Route

It is used for removing the URI of outbound proxy from Route header field of phone system. If enabled, Route header will be removed from SIP requests. The default setting is “No”.

secret

Up to 64 characters

no

string

Password of register trunk

send_ppi

no, yes

no

string

Send PPI Header

Yes: the invite message sent to trunks will contain PPI (P-Preferred-Identity) Header.

tel_uri

disabled, user_phone, enabled

no

string

TEL URI

Enabled: TEL URI and Remove OBP from Route cannot be enabled at the same time. If set to “Enable”, “Tel:” will be used instead of “SIP:” in the SIP request.

User_phone: If the phone has an assigned PSTN telephone number, this field should be set. A “User=Phone” parameter will then be attached to the Request-Line and “TO” header in the SIP request to indicate the E.164 number.

transport

udp, tcp, tls

no

string

Configure the SIP Transport method. Using TCP requires local TCP support; using TLS requires local TLS support.

trunk_name

2-64 characters

no

string

Trunk id

use_dod_in_ppi

no, yes

no

string

Configure how to set the PPI number.

When use_dod_in_ppi and use_origcid_in_ppi are both no, set the ppi number by CID option priority.

When use_origcid_in_ppi is yes, use the original CID in the PPI header, if no original CID, use the default number. When use_dod_in_ppi is yes, use the DOD number in the PPI header, if no DOD number, use the default number.

use_origcid_in_ppi

no, yes

no

string

Configure how to set the PPI number.

When use_dod_in_ppi and use_origcid_in_ppi are both no, set the ppi number by CID option priority.

When use_origcid_in_ppi is yes, use the original CID in the PPI header, if no original CID, use the default number. When use_dod_in_ppi is yes, use the DOD number in the PPI header, if no DOD number, use the default number.

username

Up to 64 characters

no

string

Configure the username to authenticate with the VoIP provider.

use_for_sfu_conf

yes, no

no

string

IPVT Mode

Configures the UCM to be used exclusively for IPVT. Warning: This will lock out certain UCM features.

Successful response

status

0

yes

int

Successful response, the status is 0.

Failed response

status

yes

int

Please see the error code list for more details.

Table 13: updateSIPTrunk

deleteSIPTrunk

The “deleteSIPTrunk” action, allows users to delete an existing trunk.

  • Request
{
    "request":{
        "action":"deleteSIPTrunk",
        "cookie":"sid23597213-1574672527",
        "trunk":"5"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Trunk

yes

string

Enter the trunk ID to specify the trunk to delete.

Successful response

Status

0

yes

int

The response is successful, status is 0

Failed response

Status

yes

int

Please see the error code list for more details.

Table 14: deleteSIPTrunk

listAnalogTrunk

The “listAnalogTrunk” action will allow users to get information about the existing analog trunks, such as the trunk’s name, trunk index etc.

Note: The needed information, can be defined in the parameter “options”. Otherwise all the information will be returned.

  • Request
{
    "request":{
        "action":"listAnalogTrunk",
        "cookie":"sid1838731674-1582859646",     
        "options":"trunk_name,trunk_index,chans,out_of_service,trunkmode”       
    }
}
  • Response
{
    "response":{
                "analogtrunk":[
            {
                "chans":"1",
                "out_of_service":"no",
                "trunk_index":7,
                "trunk_name":"123",
                "trunkmode":"normal"
            }
        ],
        "page":1,
        "total_item":1,
        "total_page":1
    },
    "status":0

}

Key Word

Value

Mandatory

Type

Note

Request Parameter

Cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Page

no

int

Get extension list by page number.

item_num

no

int

Number of trunks to return for the request. If unspecified, all trunks will be returned.

Sord

acs,desc

no

string

Sorting method. acs stands for ascending, and desc stands for descending.

Sidx

no

string

Sort by trunk index. This is based on trunk creation date.

options

trunk_name, trunk_index, chans, out_of_service, trunkmode

no

string

Successful response

Status

0

yes

int

Successful response, status is 0

analogtrunk

yes

Json array

Analog trunk list

total_item

yes

int

Total number of items that were returned.

total_page

yes

int

Total number of pages in the list.

Page

yes

int

What page is on.

trunk_index

no

string

Trunk ID

trunk_name

no

string

Trunk name

out_of_service

no

string

Either the trunk is disabled or not

Chans

no

string

Used ports

trunkmode

no

string

Trunk mode

Failed response

status

yes

int

Please see the error code list for more details.

Table 15: listAnalogTrunk

addAnalogTrunk

The “addAnalogTrunk” action will allow users to create Analog trunks.

  • Request
{
    "request":{
		"chans": 2,
		"trunkgroup":"",
		"action": "addAnalogTrunk",
		"cookie":"sid65643067-1582875896"
            "trunk_name":"1232",
		"trunkmode": "normal",
		"polarityswitch": "no",
		"enablecurrentdisconnectthreshold":"yes",
		"currentdisconnectthreshold": 200,
		"ringtimeout": 8000,
		"rxgain": 0,
            "txgain": 0,
		"usecallerid": "yes",
		"cidmode": 0,
		"fxooutbandcalldialdelay": 0,
		"auto_record": "no",
		"out_of_service": "no",
		"dahdilineselectmode": "ascend",
		"lectype": 0,
		"busydetect": "yes",
		"busycount": 2,
		"congestiondetect": "yes",
		"congestioncount": 2,
		"countrytone": "us",
		"busy": "f1=480@-50,f2=620@-50,c=500/500",
		"congestion": "f1=480@-50,f2=620@-50,c=250/250",
            "dialin_direct": "no",
		"cidstart": "ring",
		"cidsignalling": "bell",
		"faxdetect": "incoming",
		"fax_gateway": "no"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk_name

yes

string

Trunk name

Auto_record

Yes, no

no

string

Whether to enable automatic recording

Busy

no

string

Busy tone settings

Busydetect

Yes, no

no

string

Whether to enable busy tone detection

busycount

no

int

The number of busy tones the user will hear before hanging up the call when Busy Detection is enabled.

Chans

yes

int

Used ports

Congestion

no

string

Congestion tone settings

Congestioncount

no

int

The number of congestion tones to wait for when Congestion Detection is enabled.

Congestiondetect

Yes, no

no

string

Congestion Detection is used for detecting far end congestion signal.

Countrytone

no

string

Country for tone settings. You can also select Custom and set the values manually.

Currentdisconnectthreshold

50-3000

no

int

Current hang-up threshold (ms)

Dahdilineselectmode

no

string

Outgoing line selection

dialin_direct

Yes, no

no

string

Direct callback

Enablecurrentdisconnectthreshold

no

string

Whether to enable the current hang-up threshold

Fxooutbandcalldialdelay

0-3000

no

int

FXO dial delay

Fax_gateway

Yes, no

no

string

Either the FXO mode is set to fax gateway or not

Lectype

no

int

Echo cancellation mode

out_maxchans

no

int

Maximum number of calls

out_of_service

Yes, no

no

string

Either the trunk is disabled or not

Polarityonanswerdelay

100 – 2000

no

int

Polarity reversal response delay

Polarityswitch

Yes, no

no

string

Detect polarity reversal

ringtimeout

4000 – 20000

no

int

ringtimeout

Rxgain

-13 –  +12

no

real

RX gain

trunkmode

Normal, SLA

no

string

Trunk mode

Txgain

-13 –  +12

no

real

TX gain

Usecallerid

Yes, no

no

string

Whether to enable use callerID option or not

Trunkgroup

yes

string

The default is 0 when adding. The value is the same as trunk index

Cidsignaling

no

string

CallerID scheme

Cidmode

no

int

Caller number combination

Successful response

Status

0

yes

int

The response is successful, status is 0

Failed response

Status

yes

int

Please see the error code list for more details.

Table 16: listAnalogTrunk

getAnalogTrunk

The “getAnalogTrunk” will allow users to get information about a specific trunk.

  • Request
{
    "request":{
        "action":"getAnalogTrunk",
        "cookie":"sid23597213-1574672527",
        "analogtrunk":"3"
    }
}
  • Response
{
    "response":{
        "analogtrunk":{
            "auto_record":"no",
            "busy":"f1=480@-50,f2=620@-50,c=500/500",
            "busycount":2,
            "busydetect":"yes",
            "callerid":"asreceived",
            "chans":"1",
            "cidmode":0,
            "cidsignalling":"bell",
            "cidstart":"ring",
            "congestion":"f1=480@-50,f2=620@-50,c=250/250",
            "congestioncount":2,
            "congestiondetect":"yes",
            "countrytone":"us",
            "currentdisconnectthreshold":200,
            "dahdilineselectmode":"ascend",
            "dialin_direct":"no",
            "echocancel":128,
            "enablecurrentdisconnectthreshold":"yes",
            "fax_gateway":"no",
            "fax_intelligent_route":"no",
            "fax_intelligent_route_destination":null,
            "faxdetect":"incoming",
            "fxooutbandcalldialdelay":0,
            "lectype":0,
            "out_maxchans":0,
            "out_of_service":"no",
            "polarityonanswerdelay":600,
            "polarityswitch":"no",
            "ringtimeout":8000,
            "rxgain":0.0,
            "tmp":7,
            "trunk_index":7,
            "trunk_name":"123",
            "trunkgroup":7,
            "trunkmode":"normal",
            "txgain":0.0,
            "usecallerid":"yes"
}
    },
    “status”:0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

analogtrunk

yes

int

Trunk id

Successful response

trunk_name

Yes

string

Trunk name

Auto_record

Yes, no

No

string

Whether to enable automatic recording

Busy

No

string

Busy tone settings

Busydetect

Yes, no

No
 

string

Whether to enable busy tone detection

busycount

No

int

The number of busy tones the user will hear before hanging up the call when Busy Detection is enabled.

Chans

yes

int

Used ports

Congestion

No

string

Congestion tone settings

Congestioncount

No

int

The number of congestion tones to wait for when Congestion Detection is enabled.

Congestiondetect

Yes, no

No

string

Congestion Detection is used for detecting far end congestion signal.

Countrytone

No

string

Country for tone settings. You can also select Custom and set the values manually.

Currentdisconnectthreshold

50-3000

No

int

Current hang-up threshold (ms)

Dahdilineselectmode

No

string

Outgoing line selection

dialin_direct

Yes, no

No

string

Direct callback

Enablecurrentdisconnectthreshold

No

string

Whether to enable the current hang-up threshold

Fxooutbandcalldialdelay

0-3000

No

int

FXO dial delay

Fax_gateway

Yes, no

No

string

Either the FXO mode is set to fax gateway or not

Lectype

No

int

Echo cancellation mode

out_maxchans

No

int

Maximum number of calls

out_of_service

Yes, no

No

string

Either the trunk is disabled or not

Polarityonanswerdelay

100 – 2000

No

int

Polarity reversal response delay

Polarityswitch

Yes, no

No

string

Detect polarity reversal

ringtimeout

4000 – 20000

No

int

Ringtimeout

Rxgain

-13 –  +12

No

real

RX gain

Trunkmode

Normal, SLA

No

string

Trunk mode

Txgain

-13 – +12

No

real

TX gain

Usecallerid

Yes, no

No

string

Whether to enable use callerID option or not

Trunkgroup

yes

string

The default is 0 when adding. The value is the same as trunk index

Cidsignaling

No

string

CallerID scheme

Cidmode

No

int

Caller number combination

Status

0

Yes

int

The response is successful, status is 0

Failed response

Status

Yes

int

Please see the error code list for more details.

Table 17: getAnalogTrunk

updateAnalogTrunk

The “updateAnalogTrunk” action will allow users to update existing Analog trunk while specifying the trunk group.

  • Request
{
    "request":{
        "trunkmode": "normal",
		"polarityswitch": "no",
		"enablecurrentdisconnectthreshold":"yes",
		"currentdisconnectthreshold": 200,
		"ringtimeout": 8000,
		"rxgain": 0,
            "txgain": 0,
		"usecallerid": "yes",
		"cidmode": 0,
		"fxooutbandcalldialdelay": 0,
		"auto_record": "no",
		"out_of_service": "no",
		"dahdilineselectmode": "ascend",
		"lectype": 0,
		"busydetect": "yes",
		"busycount": 2,
		"congestiondetect": "yes",
		"congestioncount": 2,
		"countrytone": "us",
		"busy": "f1=480@-50,f2=620@-50,c=500/500",
		"congestion": "f1=480@-50,f2=620@-50,c=250/250",
		"dialin_direct": "no",
		"cidstart": "ring",
		"cidsignalling": "bell",
		"faxdetect": "incoming",
		"fax_gateway": "no",
		"chans": 2,
		"trunkgroup":7,
		"action": "updateAnalogTrunk",
		"cookie":"sid65643067-1582875896"

    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Trunk_index

Yes

string

Trunk index

Other parameters are the same as addAnalogTrunk action

Successful response

Status

0

Yes

int

The response is successful, status is 0

Failed response

Status

Yes

int

Please see the error code list for more details.

Table 18: updateAnalogTrunk

deleteAnalogTrunk

The “deleteAnalogTrunk” action, allows users to delete an existing trunk.

  • Request
{
    "request":{
        "action":"deleteAnalogTrunk",
        "analogtrunk":7,
        "cookie":"sid1449753552-1582877632"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

analogtrunk

Yes

int

Enter the trunk ID to specify the trunk to delete.

Successful response

status

0

yes

int

The response is successful, status is 0

Failed response

Status

yes

int

Please see the error code list for more details.

Table 19: deleteAnalogTrunk

addSLATrunk

The action “addSLATrunk” allows user to enable SLA on an existing analog trunk.

  • Request
{
    "request":{
        "action":"addSLATrunk",
        "bargeallowed":"yes",
        "cookie":"sid1344581054-1582879094",
        "device":"DAHDI/1",
        "holdaccess":"open",
        "trunk_name":"1232"     
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Trunk_name

yes

string

Trunk name

Device

no

string

Device port id (DAHDI / 1)

Bargeallowed

Yes, no

no

string

Whether to allow barge or not.

Holdaccess

Open, private

no

string

Successful response

Status

0

Yes

Int

The response is successful, status is 0

Failed response

Status

Yes

int

Please see the error code list for more details.

Table 20: addSLATrunk

updateSLATrunk

The “updateSLATrunk” action allows user to update an existing SLA analog trunk.

  • Request
{
    "request":{
        "action":"updateSLATrunk",
        "bargeallowed":"yes",
        "cookie":"sid1344581054-1582879094",
        "device":"DAHDI/1",
        "holdaccess":"open",
        "trunk_index":7,
        "trunk_name":"43243"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Trunk_index

yes

string

Trunk index

Other parameters are the same as addSLATrunk action

Successful response

Status

0

Yes

int

The response is successful, status is 0

Failed response

Status

Yes

int

Please see the error code list for more details.

Table 21: updateSLATrunk

listDigitalTrunk

The “listDigitalTrunk” action will allow users to get information about the existing Digital trunks, such as the trunk’s name, trunk index etc.

Note: The needed information, can be defined in the parameter “options”. Otherwise all the information will be returned.

  • Request
{
    "request":{
        "action":"listDigitalTrunk",
        "options":"trunk_name,type,trunk_index,span,channel,out_of_service",
        "cookie":"sid1271797830-1582880510"
    }
}
  • Response
{
    "response":{
         "digital_trunks":[
            {
                "channel":"1-15,17-31",
                "out_of_service":"no",
                "span":3,
                "trunk_index":"1",
                "trunk_name":"4324",
                "type":"E1 (CPE)"
            }
        ],
        "page":1,
        "total_item":1,
        "total_page":1
    },
    "status":0

}

Key Word

Value

Mandatory

Type

Note

Request Parameter

cookie

Yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Page

No

int

Get extension list by page number.

item_num

No

int

Number of trunks to return for the request. If unspecified, all trunks will be returned.

sord

acs,desc

No

string

Sorting method. acs stands for ascending, and desc stands for descending.

sidx

No

string

Sort by trunk index. This is based on trunk creation date.

options

trunk_name, type, trunk_index, span, channel, out_of_service

no

string

Specify the information to return. Multiple options can be selected and must be separated by commas. If unspecified, all the listed information will be returned.

Successful response

status

0

yes

Int

Successful response, status is 0

Digital_trunk

yes

Json array

Digital trunk list

total_item

yes

Int

Total number of items that were returned.

total_page

yes

Int

Total number of pages in the list.

page

yes

Int

What page is on.

trunk_index

No

string

Trunk ID

trunk_name

No

string

Trunk name

out_of_service

No

string

Either the trunk is disabled or not

Span

No

string

Used ports

Type

No

string

Pattern type

Channel

No

string

Signaling channel

Failed response

status

Yes

int

Please see the error code list for more details.

Table 22: ListDigitalTrunk

addDigitalTrunk

The “addDigitalTrunk” action will allow users to create Digital trunks.

  • Request
{
    "request":{
        "action":"addDigitalTrunk",
        "auto_recording":"yes",
        "callerid":"543543",
        "cidname":"32432",
	  "cookie":"sid2074121023-1582881736",
        "dahdilineselectmode":"poll",
        "dialin_direct":"yes",
        "group_index":1,
        "hidecallerid":"yes",
        "keepcid":"yes",
        "technology":"PRI",
        "trunk_name":"4324"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk_name

Yes

string

Trunk name

group_index

Yes, no

yes

int

Channel group

Hidecallerid

no

string

Hide caller ID

Keepcid

Yes, no

no

string

Callerid

no

string

Caller ID

Cidname

no

string

Caller ID name

Auto_recording

Yes, no

no

string

Either to enable auto recording or not.

Dahdilineselectmode

ascend, poll, desend

no

string

Outbound route selection

dialin_direct

Yes, no

no

string

Callback

Technology

PRI, SS7, MFC/R2, EM, EM_W

no

string

Signaling protocol

Successful response

Status

0

yes

int

The response is successful, status is 0

Failed response

Status

yes

int

Please see the error code list for more details.

Table 23: addDigitalTrunk

getDigitalTrunk

The “getDigitalTrunk” will allow users to get information about a specific Digital trunk.

  • Request
{
    "request":{
        "action":"getDigitalTrunk",
        "cookie":"sid1105656270-1582883162",
        "trunk":1
    }
}
  • Response
{
    "response":{
        "trunk":{
            "auto_recording":"no",
            "callerid":null,
            "cidname":null,
            "dahdilineselectmode":"ascend",
            "dialin_direct":"no",
            "fax_intelligent_route":"no",
            "fax_intelligent_route_destination":null,
            "faxdetect":"yes",
            "group_index":1,
            "hidecallerid":"no",
            "keepcid":"no",
            "out_of_service":"no",
            "pulsedial":"no",
            "status":"Unavailable",
            "trunk_index":1,
            "trunk_name":"324"
}
    },
    “status”:0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

yes

string

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

Trunk

yes

int

Trunk id

Request parameter

trunk_name

Yes

string

Trunk name

Status

0

yes

int

Trunk_name

yes

string

Trunk name

Trunk

yes

int

Trunk id

group_index

Yes, no

yes

int

Channel group

Hidecallerid

no

string

Hide caller ID

Keepcid

Yes, no

no

string

Callerid

no

string

Caller ID

Cidname

no

string

Caller ID name

Auto_recording

Yes, no

no

string

Either to enable auto recording or not.

Dahdilineselectmode

ascend, poll, descend

no

string

Outbound route selection

dialin_direct

Yes, no

no

string

Callback

Status

no

string

Trunk status

Out_of_service

no

string

Whether the trunk is disabled or not

Failed response

Status

yes

int

Please see the error code list for more details.

Table 24: getDigitalTrunk

updateDigitalTrunk

The “updateDigitalTrunk” action will allow users to update existing Analog trunk while specifying the trunk id.

  • Request
{
    "request":{
        "action":"updateDigitalTrunk",
        "auto_recording":"yes",
        "callerid":"543543",
        "cidname":"32432",
        "cookie":"sid1105656270-1582883162",
        "dahdilineselectmode":"poll",
        "dialin_direct":"yes",
	  "group_index":1,
        "hidecallerid":"yes",
        "keepcid":"yes",
        "trunk":1,
        "trunk_name":"4324”

    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

Key Word

Value

Mandatory

Type

Note

Request parameter

Cookie

yes

String

Returned value after login. All requests must include this value. If no cookie is included, error code -6 will be returned.

trunk_name

Yes

String

Trunk name

Trunk

yes

Int

Trunk id

group_index

Yes, no

yes

int

Channel group

Hidecallerid

no

string

Hide caller ID

Keepcid

Yes, no

no

string

Callerid

no

string

Caller ID

Cidname

no

string

</