HTTPS API

  • Updated on March 1, 2024

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.

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.
HTTPS API Settings
Note

The admin can create multiple users with different credentials to be able to authenticate into the API.

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.

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: HTTPS API Login

Logout

The user can send a logout request to log out of the API session.

  • Request
{
    "request":{
        "action":"logout",
        "cookie":"sid930353464-1670323942"
    }
}
  • Response
{
    "response":{},
    "status":0
}

Key word

Value

Mandatory

Type

Note

Request Parameter

cookie

No

string

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

Successful response

status

0

Yes

int

Successful response

Failed response

status

Yes

Please see the error code list for more details.

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

Add SIPAccountAndUser

Creates a new SIP extension. The addSIPAccountAndUser’s supported parameters and values are the same as the existing updateSIPAccount command.

  • Request
{
    "request": {
        "action": "addSIPAccountAndUser",
        "cookie": "sid343971159-1551949394",
        "extension": "1001",
        "max_contacts": "3",
        "permission": "internal",
        "language": "ch",
        "secret": "Abc123456!",
        "vmsecret": "Abc123456!",
        "user_password": "Abc123456!",
        "wave_privilege_id": "0",
        "presence_settings":
            [{
                "presence_status": "available",
                "cfu_destination_type": "1",
                "cfb_destination_type": "0",
                "cfn_destination_type": "5",
                "cfu_timetype": "0",
                "cfb_timetype": "0",
                "cfn_timetype": "0",
                "cfu": "6000",
                "cfn": "6500",
                "cfb": ""
            }, {
                "presence_status": "away",
                "cfu_destination_type": "5",
                "cfb_destination_type": "0",
                "cfn_destination_type": "0",
                "cfu_timetype": "0",
                "cfb_timetype": "0",
                "cfn_timetype": "0",
                "cfu": "6500",
                "cfn": "",
                "cfb": ""
            }, {
                "presence_status": "chat",
                "cfb": null,
                "cfn": null,
                "cfu": null,
                "cfb_timetype": 0,
                "cfn_timetype": 0,
                "cfu_timetype": 0,
                "cfb_destination_type": "0",
                "cfn_destination_type": "0",
                "cfu_destination_type": "0"
            }, {
                "presence_status": "userdef",
                "cfu_destination_type": "0",
                "cfb_destination_type": "0",
                "cfn_destination_type": "0",
                "cfu_timetype": "0",
                "cfb_timetype": "0",
                "cfn_timetype": "0",
                "cfu": "",
                "cfn": "",
                "cfb": ""
            }, {
                "presence_status": "unavailable",
                "cfb": null,
                "cfn": null,
                "cfu": null,
                "cfb_timetype": 0,
                "cfn_timetype": 0,
                "cfu_timetype": 0,
                "cfb_destination_type": "0",
                "cfn_destination_type": "0",
                "cfu_destination_type": "0"
            }]
    }
}
  • Response
{
    "response": {
        "need_apply": "yes"
    },
    "status": 0
}

deleteUser

Delete an existing SIP extension.

Supported parameters:

Key Word

Value

Mandatory

Type

Note

Request Parameters

cookie

yes

string

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

user_name

yes

string

The extension number

  • Request
{
    "request":{
        "action":"deleteUser",
        "cookie":"sid1466367100-1946280676",
        "user_name":"1003"
    }
}
  • Response
{
    "response": {
        "need_apply": "yes"
    },
    "status": 0
}

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

Wave

cleanTerminalChatInformation

The “cleanTerminalChatInformation” action allows the user to clear the chat history of the user’s Wave client.

  • Request
{
        "request":{
              "action":"cleanTerminalChatInformation",
              "cookie":"sid1602522965-14864168234",
              "extension":"1007"
         }
}
  • Response
{
"response":{
"need_apply":"no"
},
"status":0
}

chatTerminalChatInformation Request Parameters

NameSupported ValuesRequiredValue TypeComments
cookie YesStringCookie value is obtained after logging in via the login command. If the cookie is invalid, error code -6 will be returned.
extension YesIntegerUser’s extension number

chatTerminalChatInformation Request Responses

If the updateUser request is successful, the following will appear:

Parameter NameSupported ValuesValue TypeComments
status0IntegerSuccess. Status is 0.
need_applyyes,noStringWhether changes need to be applied to take effect.

If the cleanTerminalChatInformation request failed, the following will appear:

Parameter NameSupported ValuesValue TypeComments
statusIntegerError code will appear. Please refer to the list of error codes for more details.

getSIPAccountQR

Example Request

{
    “request”:{
        “extension”:”1000″,
        “action”:”getSIPAccountQR”
    }
}

Example Response:

{
	“response”:{
		“qr_base”:”iVBORw0KGgoAAAANSUhEUgAAAKsAAACrAQMAAAAjJv5aAAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlP//8i138cAAAAJcEhZcwAACxIAAAsSAdLdfvwAAALDSURBVEiJ5Zc/rqQwDMaNUqSDCyDlGulyJbgAfy4AV6LLNSLlAkmXAuH9Msy894ot1mirXYQofjMKY/vzZw/xby/6v3Eimo/QHbzZvmOTD2rkOPM5OBpszEVdOjQeRI6PfnL9zDTiVM+rp/ERHixN7iR3dkXtT/HMZveBNM2F+RmuUZ6TPeeDE54/g/9jjHyPvv++v8sgwLgua/ajlq518YcgBDhRTxTzgSh5P0yycZfjzIrZbDZeDkmKG31SJcHsw3yYFfl2JnsatFof4MripVX2EDLeYPYHuECDiK8nPJnIhU6OL1L7oZJGpkNXGyKucozK47wGfUm8ct/4L0FIsFOZY4b0yjk5xf5OlQxfDvGpRGpBfIXIno0c86vyF4WmhJkR5UeaEvw6myZouf7GHnIe5ZgLdHdWq2OqplVLJ8bJUWsDir9QaO/OkGOGAC3kExdLHaKkd/AyjBxrNARO5d0j8W+HEOHMJmmFQGcP40TZzS7H7PuB4qbhWKG10KDKD3DB2eHlmgHWuzJ1cpwsBgj6+yRtNofWMOsDrCP6csEEYBQN3zJZjjFOZw/rNZDwBiUWxU8w/Bu1CkS3Q9walGGAwSHK6hNQMRp0lWOuC8I5lqq+RJhvbyGLMFhTpWfYn63FSzBsxTg52ANcCuMIc0Bt9rZeGYbBtK72JXaf+aCB+lGO2fOiMUMgZNgMBpphOc51BatrC+4W3qlv1xTiAtFBPhgg2H2gwbcgRPhysAeaCIFC0dTqvnmAiRdHXYlLXcRULnflZTjps9UYjNWxXq7Zd3KMK2GxPeBVGCbxy6tEOL32lN2fI5Ro60bWyDH2wUmjHdHi0A68yuQHGOstVpXqVQgXDnr3pRiPJSYk3tbpmv1Hg1KMJPm6reRDcR3UcsywhzC8PHiwJr0HowzXfGPx0fXzFvb97gYZ/iv/vP4p/AvzqV1YIWFVRAAAAABJRU5ErkJggg==”
   },
    “status”: 0
}
NameSupported ValuesRequiredValue TypeComments
cookie YesStringCookie value is obtained after logging in via the login command. If the cookie is invalid, error code -6 will be returned.
extension YesIntegerUser’s extension number

If the getSIPAccountQR request is successful, the following will appear:

Parameter NameSupported ValuesValue TypeComments
status0IntegerSuccess. Status is 0.
qr_baseBBase64 stringTo turn this string into a QR code, there are various tools available to convert Base64 strings to images. For example, on linux, the terminal command base64 -d aa.txt > test.jpg can convert the string to a QR code image.

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

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

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 25: UpdateDigitalTrunk

deleteDigitalTrunk

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

  • Request
{
    "request":{
        "action":"deleteDigitalTrunk",
        "trunk":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.

Trunk

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 26: deleteDigitalTrunk

Outbound Route

listOutboundRoute

The “listOutboundRoute” allows users to list the existing outbound route such as the route’s name, its permission etc.

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

  • Request
{
    "request":{
        "action":"listOutboundRoute",
        "cookie":"sid23597213-1574672527",
        "options":"outbound_rt_name,outbound_rt_index,permission,sequence,pattern,out_of_service"
    }
}
  • Response
{
    "response":{
        "outbound_route":[
            {
                "members":[],
                "out_of_service":"no",
                "outbound_rt_index":2,
                "outbound_rt_name":"test123",
                "pattern":"_1xxx",
                "permission":"none",
                "sequence":1
            }
        ],
        "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

Retrieves outbound routes by the page they’re on.

item_num

no

int

Extension number on each page, which is, the maximum items of each return. If empty, all members are returned by default.

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

outbound_rt_name, outbound_rt_index, permission, sequence, pattern, out_of_service

no

string

Specifies the information to retrieve. Several items can be entered and separated by commas. If unspecified, all outbound route information will be retrieved.

Successful response

status

0

yes

int

Successful response, status is 0

outbound_route

yes

Json array

Outbound route 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

Page number that the trunks are on.

outbound_rt_index

no

string

ID of the outbound route. Used for updating and deleting outbound routes.

outbound_rt_name

no

string

Name of the outbound route.

Permission

no

string

Privilege Level

The required permission level to use the outbound route.

sequence

no

string

Trunk type

Peer trunk and register trunk

pattern

no

string

Outbound routing rules. Multiple patterns are separated by commas.

Failed response

Status

yes

int

Please see the error code list for more details.

Table 27: listOutboundRoute

addOutboundRoute

The “addOutboundRoute” will allow users to add an outbound route for a specific trunk that needs to be defined using the “default_trunk_index”.

  • Request
{
    "request":{
        "action":"addOutboundRoute",
        "cookie":"sid23597213-1574672527",
        "default_trunk_index":"3",
        "outbound_rt_name":"test123",
        "pattern":[
            {
                "match":"_1xxx"
            }
        ]
    }
}
  • 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.

outbound_rt_index

yes

string

The id of the outgoing route, which configuration of the outgoing route is obtained.

outbound_rt_name

2-24 letters/numbers/special characters_-. Mandatory.

yes

string

Outbound route name

default_trunk_index

mandatory

yes

string

Corresponding trunk id used by the outbound route

pattern

mandatory

no

Json array

Available Extensions/Extension Groups after enabling filter on source caller ID.

Outgoing prefix

All patterns are prefixed by “_” character, but please do not enter more than one “_” at the beginning. All patterns can add comments, such as “_pattern /* comment */”. In patterns, some characters have special meanings:

  • [12345-9] … Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N … Any digit from 2-9.

  • . … Wildcard, matching one or more characters.

  • ! … Wildcard, matching zero or more characters immediately.

  • X … Any digit from 0-9.

  • Z … Any digit from 1-9.

  • – … Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z. Multiple patterns can be one member in json array, which is saved in match.

For example, pattern is _1, _2: "pattern":[

            {

                "allow":null,

                "match":"_1",

                "outbound_rt_index":2,

                "strip_prefix":null

            },

            {

                "allow":null,

                "match":"_2",

                "outbound_rt_index":2,

                "strip_prefix":null

            }

        ]

permission

none, Internal, local, national, international

no

string

outbound permission.

internal:internal

internal-local:local

internal-local-national:nationwide

internal-local-national-international:international

out_of_service

Yes, no

no

string

Whether to disable the outgoing route

password

4-10 digits. If null, no outbound password is used.

no

string

Outbound password

strip

[0,32]

no

int

Strip

Specify the number of digits that will be stripped from the beginning of the dialed string before the call is placed via the selected trunk. For example, the users will dial 9 as the first digit of a long distance calls. However, 9 should not be sent out via analog lines and the PSTN line. In this case, one digit should be stripped before the call is placed.

prepend

0 to 20 alphanumeric characters or +_*#

no

string

Prepend

Those digits will be prepended after the dialing number is stripped.

enable_wlist

Yes, no

no

string

Enable Filter on Source Caller ID

Set to yes to enable filter on Source Caller ID. If enabled, Caller ID must in the selected list or match Custom Dynamic Route to make outbound calls.

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 28: addOutboundRoute

getOutboundRoute

The “getOutboundRoute” allows users to get information about an existing outbound route.

  • Request
{
    "request":{
        "action":"getOutboundRoute",
        "cookie":"sid932531770-1574674600",
        "custom_member":"",
        "default_trunk_index":"",
        "enable_wlist":"",
        "failover_outbound_data":"",
        "limitime":"",
        "members":"",
        "out_of_service":"",
        "outbound_route":"2",
        "outbound_rt_index":"",
        "outbound_rt_name":"",
        "password":"",
        "pattern":"",
        "permission":"",
        "pin_sets_id":"",
        "prepend":"",
        "strip":"",
        "time_mode":""
    }
 }
  • Response
{
    "response":{
        "failover_outbound_data":[],
        "outbound_route":{
            "custom_member":null,
            "default_trunk_index":3,
            "enable_wlist":"no",
            "limitime":null,
            "members":null,
            "out_of_service":"no",
            "outbound_rt_index":2,
            "outbound_rt_name":"test123",
            "password":null,
            "permission":"none",
            "pin_sets_id":null,
            "prepend":null,
            "strip":0,
            "time_mode":0
        },
"pattern":[
            {
                "allow":null,
                "match":"_1xxx",
                "outbound_rt_index":2,
                "strip_prefix":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

outbound_route

yes

string

Outbound route id, which configuration of the outgoing route is obtained.

Successful response

status

0

yes

int

The response is successful, status is 0

outbound_route

yes

Json, obj

Configuration of the specified outbound route

outbound_rt_index

yes

string

ID of the outbound route.

outbound_rt_name

no

string

Name of the outbound route

permission

none, Internal, local, national, international

no

string

The required permission level to use the outbound route.

disable

internal:internal

internal-local:local

internal-local-national:national

internal-local-national-international:international

default_trunk_index

no

string

The ID of the trunk used for the outbound route.

out_of_service

Yes, no

string

Disable this Route


Displays whether this outbound route is disabled.

password

string

The password required to use the outbound route

strip

int

Strip

The number of digits to remove from the beginning of a dialed number before actually making the call.

Don’t think the example is necessary in this case.

prepend

string

Prepend

The digits to add to the beginning of a dialed number before actually making the call.

enable_wlist

Yes, no

string

Enable Filter on Source Caller ID

If enabled, only the selected extensions/extension groups or extensions that satisfy the Custom Dynamic Route pattern can use the outbound route.

members

string

Available Extensions/Extension Groups.

The extensions and extension groups that can use this outbound route when Enable Filter on Source Caller ID is toggled on. Extension groups will be identified by ID.

pattern

no

json array

Outgoing prefix

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

[12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z. Multiple patterns can be one member in json array, which is saved in match.

For example, pattern is _1, _2: "pattern":[

            {

                "allow":null,

                "match":"_1",

                "outbound_rt_index":2,

                "strip_prefix":null

            },

            {

                "allow":null,

                "match":"_2",

                "outbound_rt_index":2,

                "strip_prefix":null

            }

        ]

failover_outbound_data

json array

Each failover trunk is a member of json array.

  • failover_prepend:failover prepend

  • failover_strip:failover strip

  • failover_trunk_index:failover trunk id

  • failover_trunk_sequence :failover trunk sequence

  • outbound_rt_index :outbound route id

For example, the first failover trunk of outbound route 3 is Trunk 4, strip is 2, prepend is 1:

"failover_outbound_data":[

            {

                "failover_prepend":"1",

                "failover_strip":2,

                "failover_trunk_index":4,

                "failover_trunk_sequence":1,

                "outbound_rt_index":3

            }

        ]

Failed response

status

yes

int

Please see the error code list for more details.

Table 29: getOutboundRoute

updateOutboundRoute

The “updateOutboundRoute” allows users to update an existing outbound route.

  • Request
{
    "request":{
        "action":"updateOutboundRoute",
        "cookie":"sid932531770-1574674600",
        "outbound_route":"2",
        "outbound_rt_name":"out1",
        "permission":"internal"
    }
}
  • 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.

outbound_rt_index

yes

string

The id of the outgoing route, which configuration of the outgoing route is updated

outbound_rt_name

Required. 2-24 alphanumeric characters, hyphens (-), or underscores (_)

no

string

Outgoing route name

permission

none, Internal, local, national, international

no

string

outbound permission.

internal:internal

internal-local:local

internal-local-national:nationwide

internal-local-national-international:international

default_trunk_index

required

no

string

The corresponding trunk id of the outbound route

pattern

required

no

Json array

Pattern

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z. For multiple modes, see the array written in json. For example, rules for allowing 2xxx, 12xx outgoing is set as following: [{"match": "_2xxx/*asadad*/"}, {"match": "_12xx"}]

out_of_service

Yes, no

no

string

Whether to disable the outgoing route

password

4-10 digits. If not configured, no password will be used for the outbound route.

strip

0-32

no

int

Strip

Specify the number of digits that will be stripped from the beginning of the dialed string before the call is placed via the selected trunk. For example, the users will dial 9 as the first digit of a long-distance calls. However, 9 should not be sent out via analog lines and the PSTN line. In this case, one digit should be stripped before the call is placed.

prepend

0-20 alphanumeric characters or special characters +_#*

no

string

Prepend

The digits that will be prepended after the dialing number is stripped.

enable_wlist

Yes, no

no

string

Enable Filter on Source Caller ID

Set yes to enable filter on Source Caller ID. If enabled, Caller ID must in the selected list or match Custom Dynamic Route to make outbound calls.

members

no

string

Available Extensions/Extension Groups after enabling filter on source caller ID.

If is extension group, use the id of the group. Multiple should be separated by commas:6000,6001,group-1

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 30: updateOutboundRoute

deleteOutboundRoute

The “deleteOutboundRoute” action allows users to delete an existing outbound route.

  • Request
{
    "request":{
        "action":"deleteOutboundRoute",
        "cookie":"sid932531770-1574674600",
        "outbound_route":"2"
    }
}
  • 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.

inbound_route

yes

string

The ID of the inbound route

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

Yes, no

yes

string

Whether “Apply” is required for the configuration to take effect.

Failed response

status

yes

int

Please see the error code list for more details.

Table 31: deleteOutboundRoute

PIN Group

addPinSets

The “addPinSets” allows user to add new pin group.

  • Request
{
    "request":{
        "action":"addPinSets",
        "cookie":"sid448621180-1620223665",
        "members":[
            {
                "pin":"1234",
                "pin_name":"testmember",
                "pin_sets_id":"1602745045405"
            }
        ],
        "pin_sets_id":"1602745045405",
        "pin_sets_name":"test",
        "record_in_cdr":"yes"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

updatePinSets

“updatePinSets” allow users to update an existing PIN group.

  • Request
{
    "request":{
        "action":"updatePinSets",
        "cookie":"sid227949405-1609409802",
        "members":[
            {
                "pin":"4567",
                "pin_name":"testmember22",
                "pin_sets_id":"1602745045405"
            }
        ],
        "pin_sets_id":"1602745045405",
        "pin_sets_name":"testtttttt",
        "record_in_cdr":"yes"
    }
}
  • Response
{
    "response":{
        "need_apply":"yes"
    },
    "status":0
}

getPinSets

“getPinSets” allow users to retrieve details of a specific PIN group.

  • Request
{
    "request":{
        "action":"getPinSets",
        "cookie":"sid227949405-1609409802",
		"pin_sets_id":"1602745045405"
		}
}
  • Response
{
    "response":{
        "members":[
            {
                "pin":"4567",
                "pin_name":"testmember22",
                "pin_sets_id":"1602745045405"
            }
        ],
        "pin_sets_id":{
            "pin_sets_id":"1602745045405",
            "pin_sets_name":"testtttttt",
            "record_in_cdr":"yes"
        }
    },
    "status":0
}

deletePinSets

deletePinSets allows users to delete an existing PIN group

  • Request
{
    "request":{
        "action":"deletePinSets",
        "cookie":"sid227949405-1609409802",
        "pin_sets_id":"1602745045405"
    }
}
  • 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.

member

yes

Json array

List of the PIN group members.

pin

yes

int

PIN number that will be required to dial out.

pin_name

yes

string

PIN name.

Pin_sets_id

yes

int

The ID of the Pin group.

Pin_sets_name

yes

string

The name of the Pin group.

Record_in_cdr

yes,no

no

string

Specify Whether or not to display the used PIN group and name in a call's CDR entry.

Successful response

status

0

yes

int

The response is successful, status is 0

need_apply

Yes,no

yes

string

Whether “Apply” is required for the configuration to take effect.

members

yes

Json array

List of the members of the pin group.

Pin_sets_id

yes

int

Indicates the Pin group ID.

pin_sets_name

no

string

Indicates the pin name.

record_in_cdr

Yes,no

no

string

Indicates whether the extension is out of service

Failed response

status

yes

int

Please see the error code list for more details.

Table 32: PIN Group

Inbound Route

listInboundRoute

The “listInboundRoute” allows users to list the existing inbound routes such as the route’s name, its permission etc.

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

  • Request
{
    "request":{
        "action":"listInboundRoute",
        "cookie":"sid932531770-1574674600",
        "trunk_index":"1"
    }
}
  • Response
    "response":{
        "inbound_route":[
            {
                "account":null,
                "accout_voicemail_out_of_service":"no",
                "alertinfo":null,
                "announcement":null,
                "blocking_did_collect_calls":"no",
                "callback":null,
                "conference":null,
                "destination_type":"byDID",
                "dialdirect":"no",
                "did_pattern_allow":"",
                "did_pattern_match":"_.",
                "did_strip":0,
                "directory":null,
                "disa":null,
                "en_multi_mode":"no",
                "enable_fax_detect":"no",
                "enable_inbound_muti_mode":"no",
                "external_number":null,
                "fax":null,
                "fax_intelligent_route":"email",
                "fax_intelligent_route_destination":null,
                "inbound_mode":0,
                "inbound_muti_mode":0,
                "inbound_rt_index":1,
                "inbound_suffix":null,
                "incoming_prepend":null,
                "ivr":null,
                "members":[
                          {
                        "account":null,
                        "announcement":null,
                        "callback":null,
                        "conference":null,
                        "destination_type":"byDID",
                        "did_strip":0,
                        "directory":null,
                        "disa":null,
                        "en_multi_mode":"no",
                        "end_hour":"",
                        "end_min":"",
                        "external_number":null,
                        "fax":null,
                        "inbound_mode":"0",
                        "ivr":null,
                        "mode":"",
                        "multimedia_conference":null,
                        "paginggroup":null,
                        
                        "queue":null,
                        "ringgroup":null,
                        "sequence":"0",
                        "start_hour":"",
                        "start_min":"",
                        "tc":"0",
                        "timetype":"0",
                        "vmgroup":null,
                        "voicemail":null
                    }
                ],
                "multimedia_conference":null,
                "out_of_service":"no",
                "paginggroup":null,
                "permission":"internal-local-national-international",
                "prepend_inbound_name":null,
                "prepend_inbound_name_enable":null,
                "prepend_trunk_name":"no",
                "queue":null,
                "ringgroup":null,
                "set_callerid_enable":"no",
                "set_callerid_name":"${CALLERID(name)}",
                "set_callerid_number":"${CALLERID(num)}",
                "trunk_index":1,
                "vmgroup":null,
                "voicemail":null
            }
        ],
"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

Retrieves all the inbound routes on the specified page.

item_num

no

int

Retrieves the maximum number of inbound routes to retrieve for the query. If unspecified, all inbound routes will be returned.

sord

acs,desc

no

string

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

sidx

no

string

Sort according to the index.

trunk_index

yes

int

The ID of the trunk of which to retrieve the inbound routes of.

options

inbound_rt_index,  did_pattern_match,  did_pattern_allow,  out_of_service

no

string

See previous comments regarding similar parameter

Successful response

status

0

yes

int

The response is successful, status is 0

inbound_route

yes

Json array

List of inbound routes

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

Page number that the trunks are on.

inbound_rt_index

yes

string

ID of the inbound route.

members

yes

Json array

Destination of the inbound route

did_pattern_match

no

string

Callee id pattern match mode of the inbound route

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

did_pattern_allow

no

string

Callee pattern match

out_of_service

yes, no

no

string

Indicates whether the extension is out of service

Failed response

status

yes

int

Please see the error code list for more details.

Table 33: listInboundRoute

addInboundRoute

The “addInboundRoute” action allows users to add and configure an inbound route for a specific trunk that needs to be defined using the “trunk_index”.

  • Request
{
    "request":{
        "account":"1001",
        "action":"addInboundRoute",
        "cookie":"sid1302335489-1574676590",
        "destination_type":"account",
        "dial_trunk":"no",
        "did_pattern_match":"[{\"did_pattern_match\": \"_x.\"}]",
        "did_strip":"0",
        "en_multi_mode":"no",
        "enable_fax_detect":"no",
        "enable_inbound_muti_mode":"no",
        "ext_conference":"no",
        "ext_directory":"no",
        "ext_group":"no",
        "ext_local":"yes",
        "ext_paging":"no",
        "ext_queues":"no",
        "fax_intelligent_route":"email",
        "fax_intelligent_route_destination":"1001",
        "inbound_muti_mode":"0",
        "multi_mode":"[]",
        "out_of_service":"no",
        "permission":"internal",
        "prepend_trunk_name":"no",
        "set_callerid_enable":"no",
        "set_callerid_name":"${CALLERID(name)}",
        "set_callerid_number":"${CALLERID(num)}",
        "time_condition":"[]",
        "trunk_index":"6",
        "voicemailgroups":"no",
        "voicemenus":"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.

inbound_route

yes

string

Inbound route id, which inbound route to obtain configuration from.

trunk_index

yes

int

Trunk id of inbound route

inbound_suffix

no

string

Inbound Mode Suffix

Dial global inbound feature code + the inbound mode suffix(or dial inbound mode suffix) could switch the mode of the inbound route.

BLF subscription inbound mode suffix can monitor inbound multiple mode.

inbound_multi_mode

no

string

Inbound mode

permission

Internal, local, national, international

no

string

Inbound permission

Internal, local, national, international.

enable_inbound_muti_mode

no

string

Inbound multiple mode

Can be configured in the "Inbound Routes" page. If enabled, the global inbound mode will be used. Otherwise, the default mode will be used.

set_callerid_number

no

string

Configure the pattern-matching format to manipulate the numbers of incoming callers or to set a fixed callerID number for calls that go through this inbound route.

  • ${CALLERID(num)}: Default value which indicates the number of an incoming caller (CID). The CID will not be modified.

  • ${CALLERID(num):n}: Skips the first n characters of a CID number, where n is a number.

  • ${CALLERID(num):-n}: Takes the last n characters of a CID number, where n is a number.

  • ${CALLERID(num):s:n}: Takes n characters of a CID number starting from s+1, where n is a number and s is a character position (e.g. ${CALLERID(num):2:7} takes 7 characters after the second character of a CID number.

  • n${CALLERID(num)}: Prepends n to a CID number, where n is a number.

set_callerid_name

string

Configure the pattern-matching format to customize the callerID name of incoming callers.

  • ${CALLERID(name)}: Default value which indicates the name of an incoming caller.

  • A${CALLERID(name)}B: Prepends the character "A" and appends the character "B" to ${CALLERID(name)}.

Using a string instead of the pattern-matching syntax will set a fixed name to incoming callers.

set_callerid_enable

yes, no

no

string

Manipulate Caller ID (CID) name and/or number within the call flow.

out_of_service

yes, no

no

string

Whether to disable this inbound route

prepend

no

string

Prepend

Those digits will be prepended after the dialing number is stripped.

enable_wlist

yes, no

no

string

Enable Filter on Source Caller ID

Set to yes to enable filter on Source Caller ID. If enabled, Caller ID must in the selected list or match Custom Dynamic Route to make outbound calls.

incoming_prepend

no

string

Prepend

Those digits will be prepended after the dialing number is stripped.

alertinfo

no

string

Alert info

did_strip

no

string

Strip

Specify the number of digits that will be stripped from the beginning of the dialed string before the call is placed via the selected trunk. For example, the users will dial 9 as the first digit of a long distance calls. However, 9 should not be sent out via analog lines and the PSTN line. In this case, one digit should be stripped before the call is placed.

callback

no

string

Default destination-callback

external_number

no

string

Default destination- external number

directory

no

string

Default destination-dial by name

disa

no

string

Default destination-DISA

fax

no

string

Default destination-Fax

paginggroup

no

string

Default destination-paging/intercom group

queue

no

string

Default destination-Queues

ringgroup

no

string

Default destination-ring group

ivr

no

string

Default destination-IVR

vmgroup

no

string

Default destination-voicemail group

conference

no

string

Default destination-conference rooms

voicemail

no

string

Default destination-voicemail

account

no

string

Default destination-extension

prepend_trunk_name

yes, no

no

string

Prepend trunk name

destination_type

no

string

Default destination

did_pattern_allow

no

string

callerID pattern

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

did_pattern_match

yes

string

Pattern

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

Multiple patterns should be separated by commas. For example the patterns are _1xx, _2xx, the configuration should be:

"did_pattern_allow":"_1xx,_2xx"

seamless_transfer_did_whitelist

no

string

Extension list allowed to seamless transfer.

Allows the selected extension to use this function. If an extension is busy, and a mobile phone is bound to that extension, the mobile phone can pick up calls to that extension.

ext_directory

yes, no

no

string

Dial by name, add at least one destination for the did destination.

ext_paging

yes, no

no

string

Paging/intercom group, add at least one destination for the did destination.

ext_group

yes, no

no

string

Ring group, add at least one destination for the did destination.

ext_queues

yes, no

no

string

Queues, add at least one destination for the did destination.

ext_conference

yes, no

no

string

Conference room, add at least one destination for the did destination.

voicemenus

yes, no

no

string

IVR, add at least one destination for the did destination.

voicemailgroups

yes, no

no

string

Voicemail groups, add at least one destination for the did destination.

ext_fax

yes, no

no

string

Fax, add at least one destination for the did destination

ext_local

yes, no

yes

string

extensions, add at least one destination for the did destination.

dial_trunk

yes, no

no

string

Dial trunk

multi_mode

yes

Json obj

Mode1

time_condition

yes

Json obj

Time condition

blocking_did_collect_calls

yes, no

no

string

Block Collect Calls

If enabled, collect calls will be blocked. Otherwise calls will be dealt as normal calls.

Note: Collect calls are indicated by the header "P-Asserted-Service-Info: service-code=Backward Collect Call, P-Asserted-Service-Info: service-code=Collect Call".

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect.

Failed response

status

yes

int

Please see the error code list for more details.

Table 34: addInboundRoute

getInboundRoute

The “getInboundRoute” action allows users to get information about a specific inbound route.

  • Request
{
    "request":{
        "action":"getInboundRoute",
        "cookie":"sid1148042340-1574781519"
    }
}
  • Response
{
    "response":{
        "inbound_did_destination":{
            "dial_trunk":"yes",
            "ext_conference":"yes",
            "ext_directory":"yes",
            "ext_fax":"yes",
            "ext_group":"yes",
            "ext_local":"yes",
            "ext_multimedia_conference":"yes",
            "ext_paging":"yes",
            "ext_queues":"yes",
            "inbound_rt_index":1,
            "voicemailgroups":"yes",
            "voicemenus":"yes"
        },
        "inbound_routes":{
            "account":null,
            "accout_voicemail_out_of_service":"no",
            "alertinfo":null,
            "announcement":null,
            "blocking_did_collect_calls":"no",
            "callback":null,
            "conference":null,
            "destination_type":"byDID",
            "dialdirect":"no",
            "did_pattern_allow":"",
            "did_pattern_match":"_.",
            "did_strip":0,
            "directory":null,
            "disa":null,
            "en_multi_mode":"no",
            "enable_fax_detect":"no",
            "enable_inbound_muti_mode":"no",
            "external_number":null,
            "fax":null,
            "fax_intelligent_route":"email",
            "fax_intelligent_route_destination":null,
            "inbound_muti_mode":0,
            "inbound_rt_index":1,
            "inbound_suffix":null,
            "incoming_prepend":null,
            "ivr":null,
            "multimedia_conference":null,
            "out_of_service":"no",
            "paginggroup":null,
            "permission":"internal-local-national-international",
            "prepend_inbound_name":null,
            "prepend_inbound_name_enable":null,
            "prepend_trunk_name":"no",
            "queue":null,
            "ringgroup":null,
            "seamless_transfer_did_whitelist":"",
            "set_callerid_enable":"no",
            "set_callerid_name":"${CALLERID(name)}",
            "set_callerid_number":"${CALLERID(num)}",
            "trunk_index":1,
            "vmgroup":null,
            "voicemail":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.

inbound_route

yes

string

The ID of the inbound route

Successful response

status

0

yes

int

The response is successful, status is 0

inbound_routes

yes

Json obj

Configuration of the specified inbound route

inbound_suffix

no

string

Inbound Mode Suffix

The suffix of the inbound route. Dialing the global inbound mode feature code + this suffix will toggle the route’s inbound mode. BLF subscription inbound mode suffix can monitor inbound multiple mode.

inbound_multi_mode

no

string

The current inbound mode of the inbound route.

permission

Internal, local, national, international

no

string

Privilege Level.

Permission level of incoming calls when they are routed to other trunks. This must be equal to or higher than the destination trunk’s Privilege Level for calls to be routed successfully.

enable_inbound_muti_mode

no

string

Inbound multiple mode

Displays whether this route

set_callerid_number

no

string

Configure the pattern-matching format to manipulate the numbers of incoming callers or to set a fixed CallerID number for calls that go through this inbound route

  • ${CALLERID(num)}: Default value which indicates the number of an incoming caller (CID). The CID will not be modified.

  • ${CALLERID(num):n}: Skips the first n characters of a CID number, where n is a number.

  • ${CALLERID(num):-n}: Takes the last n characters of a CID number, where n is a number.

  • ${CALLERID(num):s:n}: Takes n characters of a CID number starting from s+1, where n is a number and s is a character position (e.g. ${CALLERID(num):2:7} takes 7 characters after the second character of a CID number).

  • n${CALLERID(num)}: Prepends n to a CID number, where n is a number.

set_callerid_name

string

Configure the pattern-matching format to customize the CallerID name of incoming callers.

  • ${CALLERID(name)}: Default value which indicates the name of an incoming caller.

  • A${CALLERID(name)}B: Prepends the character "A" and appends the character "B" to ${CALLERID(name)}.

Using a string instead of the pattern-matching syntax will set a fixed name to incoming callers.

set_callerid_enable

yes, no

no

string

Set CallerID Info

Displays whether the route will manipulate the CID information of incoming calls based on set_callerid_number and set_callerid_name.

out_of_service

yes, no

no

string

Indicates whether the extension is out of service

prepend

no

string

Prepend

The digits to add to the beginning of a dialed number before actually making the call.

alertinfo

no

string

Alert info

callback

no

string

The number configured for callback when selected as Default Destination.

external_number

no

string

The number configured for external number when selected as Default Destination.

directory

no

string

The number configured for dial by name when configured as Default Destination.

disa

no

string

Default destination-DISA

fax

no

string

Default destination-Fax

paginggroup

no

string

Default destination-paging/intercom group

queue

no

string

Default destination-Queues

ringgroup

no

string

Default destination-ring group

ivr

no

string

Default destination-IVR

vmgroup

no

string

Default destination-voicemail group

conference

no

string

Default destination-conference rooms

voicemail

no

string

Default destination-voicemail

account

no

string

Default destination-extension

prepend_trunk_name

yes, no

no

string

Prepend trunk name

destination_type

no

string

Default Destination

The destination that incoming calls will be routed to.

did_pattern_allow

no

string

callerID pattern

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

Multiple patterns should be separated by commas. For example the patterns are _123, _234, the configuration should be:

"did_pattern_allow":"_123,_234"

did_pattern_match

yes

string

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

Multiple patterns should be separated by commas. For example the patterns are _1xx, _2xx, the configuration should be:

"did_pattern_allow":"_1xx,_2xx"

trunk_index

yes

string

ID of the trunk associated with the inbound route.

seamless_transfer_did_whitelist

no

string

List of extensions allowed to seamless transfer. Allows the selected extension to use this function. If an extension is busy, and a mobile phone is bound to that extension, the mobile phone can pick up calls to that extension.

inbound_did_destination

yes

Json obj

Allowed DID Destination

Extension types that incoming calls can be routed to when “By DID” is selected for Default Destination..

ext_directory

no

string

Dial by name

ext_paging

no

string

Paging/intercom group

ext_group

no

string

Ring group

ext_queues

no

string

queues

ext_conference

no

string

Conference room

voicemenus

no

string

IVR

voicemailgroups

no

string

Voicemail groups

ext_fax

no

string

Fax

ext_local

no

string

extensions

dial_trunk

yes, no

no

string

Dial trunk

blocking_did_collect_calls

yes, no

no

string

Block collect calls

Indicates whether or not collect calls will be blocked.
Note: Collect calls are indicated by the header "P-Asserted-Service-Info: service-code=Backward Collect Call, P-Asserted-Service-Info: service-code=Collect Call".

Failed response

Table 35: getInboundRoute

updateInboundRoute

The “updateInboundRoute” action allows users to update an existing inbound route.

  • Request
{
    "request":{
        "account":"1001",
        "action":"updateInboundRoute",
        "cookie":"sid1058050971-1574689082",
        "destination_type":"account",
        "inbound_route":"3"
    }
}
  • 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.

inbound_route

yes

string

The ID of the inbound route

inbound_suffix

no

string

Inbound Mode Suffix

The suffix of the inbound route. Dialing the global inbound mode feature code + this suffix will toggle the route’s inbound mode. BLF subscription inbound mode suffix can monitor inbound multiple mode.

inbound_multi_mode

no

string

The current inbound mode of the inbound route.

permission

Internal, local, national, international

no

string

Privilege Level.

Permission level of incoming calls when they are routed to other trunks. This must be equal to or higher than the destination trunk’s Privilege Level for calls to be routed successfully.

enable_inbound_muti_mode

no

string

Inbound multiple mode

Displays whether this route

set_callerid_number

no

string

Configure the pattern-matching format to manipulate the numbers of incoming callers or to set a fixed CallerID number for calls that go through this inbound route

  • ${CALLERID(num)}: Default value which indicates the number of an incoming caller (CID). The CID will not be modified.

  • ${CALLERID(num):n}: Skips the first n characters of a CID number, where n is a number.

  • ${CALLERID(num):-n}: Takes the last n characters of a CID number, where n is a number.

  • ${CALLERID(num):s:n}: Takes n characters of a CID number starting from s+1, where n is a number and s is a character position (e.g. ${CALLERID(num):2:7} takes 7 characters after the second character of a CID number).

  • n${CALLERID(num)}: Prepends n to a CID number, where n is a number.

set_callerid_name

string

Configure the pattern-matching format to customize the CallerID name of incoming callers.

  • ${CALLERID(name)}: Default value which indicates the name of an incoming caller.

  • A${CALLERID(name)}B: Prepends the character "A" and appends the character "B" to ${CALLERID(name)}.

Using a string instead of the pattern-matching syntax will set a fixed name to incoming callers.

set_callerid_enable

yes, no

no

string

Set callerID info

Manipulate Caller ID (CID) name and/or number within the call.

out_of_service

yes, no

no

string

Whether to disable the inbound route.

prepend

no

string

Prepend

Those digits will be prepended after the dialing number is stripped.

enable_wlist

yes, no

no

string

Enable Filter on Source Caller ID

Set to yes to enable filter on Source Caller ID. If enabled, Caller ID must in the selected list or match Custom Dynamic Route to make outbound calls.

incoming_prepend

no

string

Prepend

Those digits will be prepended after the dialing number is stripped.

alertinfo

no

string

Alert info

did_strip

no

string

Strip

Specify the number of digits that will be stripped.  For example, the users will dial 9 as the first digit of a long-distance calls. However, 9 should not be sent out via analog lines and the PSTN line. In this case, one digit should be stripped before the call is placed.

callback

no

string

The number configured for callback when selected as Default Destination.

external_number

no

string

The number configured for external number when selected as Default Destination.

directory

no

string

Default destination-dial by name

disa

no

string

Default destination-DISA

fax

no

string

Default destination-Fax

paginggroup

no

string

Default destination-paging/intercom group

queue

no

string

Default destination-Queues

ringgroup

no

string

Default destination-ring group

ivr

no

string

Default destination-IVR

vmgroup

no

string

Default destination-voicemail group

conference

no

string

Default destination-conference rooms

voicemail

no

string

Default destination-voicemail

account

no

string

Default destination-extension

prepend_trunk_name

yes, no

no

string

Prepend trunk name

destination_type

no

string

Default Destination

The destination that incoming calls will be routed to.

did_pattern_allow

no

string

callerID pattern

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

Multiple patterns should be separated by commas. For example the patterns are _123, _234, the configuration should be:

"did_pattern_allow":"_123,_234"

did_pattern_match

yes

string

All patterns are prefixed by "_" character, but please do not enter more than one "_" at the beginning. All patterns can add comments, such as "_pattern /* comment */". In patterns, some characters have special meanings:

  • [12345-9] ... Any digit in the brackets. In this example, 1,2,3,4,5,6,7,8,9 are allowed.

  • N ... Any digit from 2-9.

  • . ... Wildcard, matching one or more characters.

  • ! ... Wildcard, matching zero or more characters immediately.

  • X ... Any digit from 0-9.

  • Z ... Any digit from 1-9.

  • - ... Hyphen is to connect characters and it will be ignored.

  • [] Contain special characters ([x], [n], [z]) represent letters x, n, z.

Multiple patterns should be separated by commas. For example the patterns are _1xx, _2xx, the configuration should be:

"did_pattern_allow":"_1xx,_2xx"

seamless_transfer_did_whitelist

no

string

List of extensions allowed to seamless transfer. Allows the selected extension to use this function. If an extension is busy, and a mobile phone is bound to that extension, the mobile phone can pick up calls to that extension.

ext_directory

no

string

Dial by name

ext_paging

no

string

Paging/intercom group

ext_group

no

string

Ring group

ext_queues

no

string

queues

ext_conference

no

string

Conference room

voicemenus

no

string

IVR

voicemailgroups

no

string

Voicemail groups

ext_fax

no

string

Fax

ext_local

no

string

extensions

dial_trunk

yes, no

no

string

Dial trunk

multi_mode

yes

Json obj

Mode1

time_condition

yes

Json obj

Time condition

blocking_did_collect_calls

yes, no

no

string

Block collect calls

Indicates whether or not collect calls will be blocked.
Note: Collect calls are indicated by the header "P-Asserted-Service-Info: service-code=Backward Collect Call, P-Asserted-Service-Info: service-code=Collect Call".

Successful response

status

0

yes

int

The response is successful, status is 0

need_apply

Yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 36: updateInboundRoute

deleteInboundRoute

The “deleteInboundRoute” action allows users to delete an existing inbound route.

  • Request
{
    "request":{
        "action":"deleteInboundRoute",
        "cookie":"sid1058050971-1574689082",
        "inbound_route":"3"
    }
}
  • 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.

outbound_route

yes

string

The id of the outbound route, which configuration of the outbound route is obtained

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 37: deleteInboundRoute

Inbound Route Blacklist

listInboundBlacklist

Query the basica information for the PBX inbound route blacklist, such as blacklist number and range

  • Request

Parameters

Mandatory

Type

Description

Cookie

Yes

String

This is the return value after login. All requests need to carry this value.
If no cookie is included, error code -6 will be returned

Sord

No

String

Sorting rule.
Range:

  • asc: ascending

  • desc: descending

  • default: asc

Sidx

No

String

Sort by this string.
Range:

  • number: blacklist by number

Page

No

String

Obtain blacklist by page (define which page).

Item_num

No

String

Define how many members to return in each query. If not specified, all members will be returned.

  • Response: successful

Parameter

Type

Description

status

Integer

If response is successful, status is 0.

number

String

Blacklist number

inbound_rt_index

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

total_item

Integer

Total number of inbound route blacklist.

total_page

Integer

Total number of pages.

page

Integer

Page number

total_blacklist_item

Integer

Total number of pages.

  • Response: failed

Parameter

Type

Description

status

Integer

See error code.

Example:

  • Request

Query inbound route blacklist:

{
    "request":{
        "action":"listInboundBlacklist",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response
{
    "response": {
        "number": [
            {
                "number": "123",
                "inbound_rt_index": "1"
            },
            {
                "number": "1234",
                "inbound_rt_index": "0"
            }
        ],
        "total_item": 2,
        "total_page": 1,
        "page": 1,
        "total_blacklist_item": 2
    },
    "status": 0
}

deleteAllInboundBlacklist

Delete PBX’s all inbound route blacklist

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value. If no cookie is included, error code -6 will be returned

  • Response: successful

Parameter

Type

Description

Status

Integer

If response is successfull, status is 0

need_apply

String

Whether to require "apply" to make configuration take effect.

Range:

  • yes

  • no

  • Response: failed

Parameter

Type

Description

status

Integer

See error code.

Example:

  • Request:
{
    "request":{
        "action":"deleteAllInboundBlacklist",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response:
{
	"response": {
		"need_apply": "yes"
	},
	"status": 0
}

deleteInboundBlacklist

Delete IPPBX’s specific inbound route blacklist.

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value. If no cookie is included, error code -6 will be returned.

number

yes

String

Blacklist number

  • Response: Successful

Parameter

Type

Description

Status

Integer

If response is successfull, status is 0

need_apply

String

Whether to require "apply" to make configuration take effect.

Range:

  • yes

  • no

  • Response: Failed

Parameter

Type

Description

status

Integer

See error code.

Example:

Delete number “123” from inbound route blacklist.

  • Request
{
    "request":{
        "action":"deleteInboundBlacklist",
        "number":"123",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response
{
	"response": {
		"need_apply": "yes"
	},
	"status": 0
}

addInboundBlacklist

Add inbound route blacklist and configure related information such as blacklist number and range.

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value.
If no cookie is included, error code -6 will be returned.

number

yes

String

Blacklist number

inbound_rt_index

yes

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

  • Response: Successful

Parameter

Type

Description

status

Integer

If response is successful, status is 0.

number

String

Blacklist number

inbound_rt_index

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

total_item

Integer

Total number of inbound route blacklist.

total_page

Integer

Total number of pages.

page

Integer

Page number

total_blacklist_item

Integer

Total number of pages.

  • Response: Failed

Parameter

Type

Description

status

Integer

See error code.

Example:

  • Request

Add blacklist 123 and configure the range to take effect. For example, to specify the inbound route to take effect, please use listInboundRoute interface to obtain inbound route id first.

{
    "request":{
        "action":"addInboundBlacklist",
        "inbound_rt_index":" ****get by listInboundRoute**** ",
        "number":"123",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response: Successful
{
	"response": {
		"need_apply": "yes"
	},
	"status": 0
}

updateInboundBlacklist

Modify inbound route blacklist and the range to take effect.

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value.
If no cookie is included, error code -6 will be returned.

number

yes

String

Blacklist number

inbound_rt_index

yes

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inboud route.

  • Existing inbound route id.

  • Response: Successful

Parameter

Type

Description

status

Integer

If response is successful, status is 0.

number

String

Blacklist number

inbound_rt_index

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

total_item

Integer

Total number of inbound route blacklist.

total_page

Integer

Total number of pages.

page

Integer

Page number

total_blacklist_item

Integer

Total number of pages.

  • Response: Failed

Parameter

Type

Description

status

Integer

See error code.

Example:

  • Request

Modify blacklist number 123 effective range. Please use list InboundRoute interface to obtain inbound route id first.

{
    "request":{
        "action":"updateInboundBlacklist",
        "inbound_rt_index":" ****get by listInboundRoute**** ",
        "number":"123",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response
{
	"response": {
		"need_apply": "yes"
	},
	"status": 0
}

getInboundBlacklistSettings

Get inbound route blacklist settings, i.e., whether to use blacklist.

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value.
If no cookie is included, error code -6 will be returned.

  • Response: Successful

Parameter

Type

Description

status

Integer

If response is successful, status is 0.

number

String

Blacklist number

inbound_rt_index

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

total_item

Integer

Total number of inbound route blacklist.

total_page

Integer

Total number of pages.

page

Integer

Page number

total_blacklist_item

Integer

Total number of pages.

  • Response: Failed

Parameter

Type

Description

status

Integer

See error code.

Example:

Get inbound route blacklist settings, i.e., whether a blacklist is enabled or not.

  • Request:
{
    "request":{
        "action":"getInboundBlacklistSettings",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response:
{
    "response": {
        "inbound_blacklist_settings": {
            "enable": "yes"
        }
    },
    "status": 0
}

updateInboundBlacklistSettings

Modify inbound route blacklist settings, i.e., whether to enable a blacklist.

  • Request

Parameter

Mandatory

Type

Description

cookie

yes

String

This is the return value after login. All requests need to carry this value.
If no cookie is included, error code -6 will be returned.

number

yes

String

Blacklist number

inbound_rt_index

yes

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

  • Response: Successful

Parameter

Type

Description

status

Integer

If response is successful, status is 0.

number

String

Blacklist number

inbound_rt_index

String

Range.
Enter inbound route id.
If inbound route id is 0, it means all inbound route will take effect.

  • 0: all inbound route.

  • Existing inbound route id.

total_item

Integer

Total number of inbound route blacklist.

total_page

Integer

Total number of pages.

page

Integer

Page number

total_blacklist_item

Integer

Total number of pages.

  • Response: Failed

Parameter

Type

Description

status

Integer

See error code.

Example:

  • Request
{
    "request":{
        "action":"updateInboundBlacklistSettings",
        "enable":"yes",
        "cookie":"sid323724187-1655780813"
    }
}
  • Response
{
	"response": {
		"need_apply": "yes"
	},
	"status": 0
}

playPromptByOrg

The “playPromptByOrg” actions allows to play the selected prompt in the configured extension.

  • Request
{
    "request":{
        "action":"playPromptByOrg",
        "channel":"1000",
        "cookie":"sid1863069817-1574933211",
        "type":"ivr"
        "variable":"prompt1” 
    }
}
  • 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.

type

ivr, name_voice, moh

yes

string

Type of audio prompt to play.

  • ivr: Custom prompt uploaded to IVR.

  • name_voice: Username prompt for an extension

  • moh: Music on Hold file

channel

yes

string

Extension to send the prompt to.

Example: If set to 6000, extension 6000 will ring, and the prompt will play upon answering the call

variable

yes

string

File name of the audio prompt

File extension is not necessary. The audio prompt should exist under the specified type.

class

no

string

Music on Hold Playlist

If “moh” is selected as type, enter the MoH playlist name. If unspecified, the Default playlist will be used.

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 38: playPromptByOrg

Voice Call

listBridgedChannels

The “listBridgedChannels” action will list the bridged channels.

  • Request
{
    "request":{
        "action":"listBridgedChannels",
        "cookie":"sid95569340-1574692824"
    }
}
  • Response
{
    "response":{
        "channel":[
            {
                "bridge_id":"7f12ed1a-f03d-4575-a4cb-f986f864c2a2",
                "bridge_time":"2019-11-25 09:43:19",
                "callerid1":"1001",
                "callerid2":"1000",
                "channel1":"PJSIP/1001-00000002",
                "channel2":"PJSIP/1000-00000003",
                "have_send":1,
                "inbound_trunk_name":"",
                "name1":"1001",
                "name2":"",
                "outbound_trunk_name":"",
                "uniqueid1":"1574692996.4",
                "uniqueid2":"1574692996.5"
            }
        ],
        "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.

Successful response

status

0

yes

int

The response is successful, status is 0.

total_item

int

Current number of established calls.

page

int

Current page is on.

channel

Json array

Detailed list of currently established calls.

channel1

string

The calling channel. If the call is from an extension, the extension number will be displayed. If the call originated from an external source instead, the trunk ID will be displayed instead.

This channel name will be used for call control commands.

channel2

string

The called channel. If the call is from an extension, the extension number will be displayed. If the call originated from an external source instead, the trunk ID will be displayed instead.

This channel name will be used for call control commands.

callerid1

string

Calling number

callerid2

string

Called number

uniqueid1

string

Calling channel identifier

uniqueid2

string

Called channel identifier

bridge_time

string

Duration of the call starting from the time the call was answered.

name1

string

Caller’s name

name2

string

Callee’s name

bridge_id

string

Bridge ID

inbound_trunk_name

string

Name of the trunk used for the inbound call. If the call is outbound, this field will be empty.

outbound_trunk_name

string

Name of the trunk used for the outbound call. If the call is inbound, this field will be empty.

Failed response

status

yes

int

Please see the error code list for more details.

Table 39: listBridgedChannels

listUnBridgedChannels

The “listUnBridgedChannels” action allows users to list the unbridged channels.

  • Request
{
"request":{
"action":"listUnBridgedChannels",
"cookie":"sid624909538-1574783406"
}
}
  • Response
{
"response":{
"channel":[],
"page":1,
"total_item":0,
"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.

Successful response

status

0

yes

int

The response is successful, status is 0.

total_item

int

Current number of established calls.

page

int

Current page is on.

channel

Json array

Detailed list of currently established calls.

channel

string

The calling channel. If the call is from an extension, the extension number will be displayed. If the call originated from an external source instead, the trunk ID will be displayed instead.

This channel name will be used for call control commands.

state

string

Channel status(Up, Ringing...)

service

string

Channel type(macro-dial, queue.....)

callername

string

Caller name

callernum

string

Caller number

connectednum

string

Connected number(when the channel is not bridged, display s)

connectedname

string

Connected name

alloc_time

string

Channel change time(the first one is channel establish time)

inbound_trunk_name

string

The name of trunk from where the unanswered incoming call originated.

outbound_trunk_name

string

The name of the trunk used for the unanswered outgoing call. 

Failed response

status

yes

int

Please see the error code list for more details.

Table 40: listUnBridgedChannels

Hangup

The “Hangup” action allows users to end an active call.

  • Request
{
"request":{
"action":"Hangup",
"channel":"PJSIP/4000-00000084",
"cookie":"sid1926227010-1576858973"
}
}
  • 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.

channel

yes

string

The channel of the call to hang up. This information can be obtained by using the listBridgeChannels command.

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 41: Hangup

Callbarge

The “Callbarge” action allows users to barge into an ongoing call.

  • Request
{
"request":{
"action":"callbarge ",
"barge-exten":"4002",
"channel":"PJSIP/4003-00000087",
"cookie":"sid1926227010-1576858973",
"exten":"4003" }
}
  • 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.

channel

yes

string

The channel to monitor

exten

yes

string

The extension that will monitor the call.

mode

yes

string

  • Null: Only listen in on the call. No parties will be able to hear you.

  • W: Talk to the extension being monitored. The other party will not hear you.

  • B: Join in on the call. Both parties will be able to hear and talk to you.

barge-exten

yes

string

Specify whether to request permission from an extension before monitoring its call.

Request permission: @1

Don’t request permission: @0

Example: To request permission from extension 2002 permission to monitor its ongoing call, enter 2002@1 

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 42: Callbarge

Mute

Mute the extension through this interface. That is, the remote party of the extension cannot hear the extension,

and the extension can hear the voice of the other party. To unmute, use the unmute interface. The extension

will also be automatically unmuted after the call ends.

  • Request
{
"request": {
"action": "mute",
"cookie": "sid612583207-1551962142",
"channel": "PJSIP/2000-00000013",
}
}
  • Response
{
      "response": {},
      "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.

channel

yes

string

The channel to be muted

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 43: Mute

Unmute

Unmute muted calls through the API.

  • Request
{
"request": {
"action": "unmute",
"cookie": "sid612583207-1551962142",
"channel": "PJSIP/2000-00000013",
}
}
  • Response
{
"response": {},
"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.

channel

yes

string

The channel to monitor

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 44: Unmute

Hold

This action allows users to hold current call of the specified extension through this interface. Use unhold action if need to resume call.

  • Request
{
"request": {
"action": "hold",
"cookie": "sid612583207-1551962142",
"channel": "PJSIP/2000-00000013",
}
}
  • Response
{
"response": {},
"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.

channel

yes

string

The channel to hold. Users can obtain the channel number by using the listBridgeChannels command.

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 45: Hold

Unhold

This action allows users to Resume the held call.

  • Request
{
"request": {
"action": "unhold",
"cookie": "sid612583207-1551962142",
"channel": "PJSIP/2000-00000013",
}
}
  • Response
{
"response": {},
"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.

channel

yes

string

The channel to resume a held call.

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 46: Unhold

DialExtension

This action allows users to dial local extension.

  • Request
{
    "request":{
        "action":"dialExtension",
        "callee":"1002",
        "caller":"1005",
        "cookie":"sid2035575025-1556156494"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

caller

yes

string

Caller number

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

no

No

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 47: DialExtension

DialOutbound

This application allows users to dial external numbers.

  • Request
{
    "request":{
        "action":"dialOutbound",
        "outbound":"4002",
        "caller":"1005",
        "cookie":"sid2035575025-1556156494"
    }
}
  • Response
{
    "request":{
        "action":"dialOutbound",
        "outbound":"4002",
        "caller":"1005",
        "cookie":"sid2035575025-1556156494"
    }
}

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.

caller

yes

string

Caller number

outbound

yes

string

Callee number

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

no

No

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 48: DialOutbound

CallTransfer

The action allows users to transfer in-call number to another number.

  • Request
{
    "request":{
        "action":"callTransfer",
        "channel":"PJSIP/1008-00000040",
        "extension":"1002",
        "cookie":"sid49474975-1556163431"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

channel

yes

string

The channel that initiates the transfer.

extension

yes

string

The transfer destination.

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 50: CallTransfer

TransferNumberInbound

This action allows users to transfer external inbound call that is ringing or in call to other extension.

  • Request
{
    "request":{
        "action":"transferNumberInbound",
        "cookie":"sid1612261872-1556164651",
        "channel":"PJSIP/trunk_4-00000044",
        "callee":"1008"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

channel

yes

string

Channel of the inbound call.

callee

yes

string

The destination that the caller will be transferred to.

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 51: TransferNumberInbound

TransferNumberOutbound

This action allows users to transfer the caller of an unanswered or ongoing outbound call to another destination

  • Request
{
    "request":{
        "action":"transferNumberOutbound",
        "cookie":"sid1612261872-1556164651",
        "channel":"PJSIP/1008-00000048",
        "outbound":"4002"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

channel

yes

string

Channel of the outbound call.

outbound

yes

string

The destination that the caller will be transferred to.

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 52: TransferNumberOutbound

DialIVR

This action allows users to dial other extension via IVR.

  • Request
{
    "request":{
        "action":"dialIVR",
        "cookie":"sid806817679-1556171969",
        "caller":"1002",
        "ivrnumber":"7000"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

caller

yes

string

The internal extension that will be used to dial other extensions via the IVR specified for the ivrnumber parameter.

ivrnumber

yes

string

IVR number.

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 53: DialIVR

DialIVROutbound

This action will allow users to dial external number via IVR.

  • Request
{
    "request":{
        "action":"dialIVROutbound",
        "cookie":"sid806817679-1556171969",
        "outcaller":"4005",
        "ivrnumber":"7000"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

caller

yes

string

The internal extension that will be used to dial external numbers via the IVR specified for the ivrnumber parameter.

ivrnumber

yes

string

IVR number.

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 54: DialIVROutbound

DialQueue

This action allows users to dial into a queue’s extension.

  • Request
{
    "request":{
        "action":"dialQueue",
        "cookie":"sid1772490686-1556173837",
        "outcaller":"4005",
        "queue":"6500"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

outcaller

yes

string

Caller number (external extension)

queue

yes

string

Call Queue number

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 55: DialQueue

DialRinggroup

This action allows users to dial into a ring group’s extension.

  • Request
{
    "request":{
        "action":"dialRinggroup",
        "cookie":"sid1772490686-1556173837",
        "outcaller":"4005",
        "ringgroup":"6500"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

outcaller

yes

string

Caller number (external extension)

ringgroup

yes

string

Ring Group number

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 56: DialRinggroup

DialOutboundTwo

This action allows users to call between two external extensions.

  • Request
{
    "request":{
        "action":"dialOutboundTwo",
        "cookie":"sid1772490686-1556173837",
        "outcaller":"4005",
        "outcallee":"1506"
    }
}
  • Response
{
    "response":{
        "need_apply":"no"
    },
    "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.

outcaller

yes

string

Caller number (external extension)

outcallee

yes

string

Callee number(external extension)

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 57: DialOutboundTwo

refuseCall

This action allows users to reject an inbound call and this is doable if the “Call Control option” is enabled in the UCM’s API Configuration page which gives a 3rd party services 10 seconds to manage incoming calls.

  • Request
{
	"request": {
		"action": "refuseCall",
		"cookie": "sid612583207-1551962142",
		"channel": "PJSIP/2000-00000013"
	}
}
  • Response
{
	"response": {},
	"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.

channel

yes

string

The channel of the call to be rejected.

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 58: refuseCall

AcceptCall

This action allows users to accept inbound call, and this is doable if the “Call Control option” is enabled in the UCM’s API Configuration page which gives a 3rd party services 10 seconds to manage incoming calls.

  • Request
{
	"request": {
		"action": " acceptCall",
		"cookie": "sid612583207-1551962142",
		"channel": "PJSIP/2000-00000013"
	}
}
  • Response
{
	"response": {},
	"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.

channel

yes

string

The channel of the call to be accepted.

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 59: acceptCall

Call Queue

listQueue

The “listQueue” action will allow users to list the available call queues such as the queue’s name, the members etc.

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

  • Request
{
    "request":{
        "action":"listQueue",
        "cookie":"sid226931826-1574694317",
        "options":"extension,queue_name,strategy,queue_chairmans,members",
        "sidx":"extension",
        "sord":"asc"
    }
}
  • Response
{
    "response":{
        "page":1,
        "queue":[
            {
                "extension":"6500",
                "members":null,
                "queue_chairmans":null,
                "queue_name":"Test",
                "strategy":"ringall"
            }
        ],
        "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 queue list by page number.

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, queue_name, strategy, queue_chairmans, members

no

string

Specifies the information to retrieve for each queue. If unspecified, all information will be retrieved.

Successful response

status

0

yes

int

The response is successful, status is 0.

total_item

yes

int

Total number of items on the list

total_page

yes

int

Total pages of the list

page

yes

int

What page is on. 

extension

no

int

Extension number.

queue_name

no

string

Queue name

strategy

ringall, linear, leastrecent, fewestcalls, random, memory

no

string

Strategy

  • Ring All: Ring all available agents simultaneously until one agent answers.

  • Linear: Ring agents in the specified order.

  • Least Recent: Ring the agent who has been called the least recently.

  • Fewest Calls: Ring the agent with the fewest completed calls.

  • Random: Ring a random agent.

  • Round Robin: Ring agents using round robin schedule with memory.

queue_chairmans

no

string

Queue chairman

members

v

string

Queue agents

Failed response

status

yes

int

Please see the error code list for more details.

Table 60: listQueue

getQueue

The “getQueue” action allows users to get information about a specific call queue.

  • Request
{
    "request":{
        "action":"getQueue",
        "cookie":"sid226931826-1574694317",
        "queue":"6500"
    }
}
  • Response
{
    "response":{
        "queue":{
            "account":null,
            "account_el":null,              
            "account_t":null,                
            "account_v":null,               
            "alertinfo":null,
            "announce_frequency":20,
            "announce_holdtime":"no",
            "announce_position":"no",
            "announcement":null,
            "announcement_el":null,
            "announcement_t":null,
            "announcement_v":null,
            "auto_record":"off",
            "autofill":"yes",
            "createid":"0",
            "custom_dates":null,
            "custom_months":null,
            "custom_prompt":null,
            "custom_welcome_prompt":null,
            "destination_type":"voicemail",
            "destination_type_el":"playsound",
            "destination_type_t":"hangup",
            "destination_type_v":"account",
            "destination_voice_enable":"no",
            "directory":null,
            "directory_el":null,
            "directory_t":null,
            "directory_v":null,
            "email":null,
            "enable_agent_login":"no",
            "enable_destination":"D",
            "enable_feature":"no",
            "enable_welcome":"no",
            "extension":"6500",
            "external_number":null,
            "external_number_el":null,
            "external_number_t":null,
            "external_number_v":null,
            "hasvoicemail":"no",
            "ivr":null,
            "ivr_el":null,
            "ivr_t":null,
            "ivr_v":null,
            "joinempty":"no",
            "leavewhenempty":"strict",
            "maxlen":0,
            "members":null,
            "musicclass":"default",
            "pagingtype":"once",
            "permission":"internal",
            "pin":null,
            "queue_chairman":null,
            "queue_chairmans":null,
            "queue_dest":null,
            "queue_dest_el":null,
            "queue_dest_t":null,
            "queue_dest_v":null,
            "queue_name":"Test",
            "queue_timeout":60,
            "queuesasvm":"no",
            "replace_caller_id":"no",
            "reportholdtime":"no",
            "retry":5,
            "ringgroup":null,
            "ringgroup_el":null,
            "ringgroup_t":null,
            "ringgroup_v":null,
            "ringtime":30,
            "schedule_clean_enable":"no",
            "starttime":null,
            "strategy":"ringall",
            "tmp":null,
            "tmp2":"6500",
            "vm_extension":null,
            "vm_extension_el":null,
            "vm_extension_t":null,
            "vm_extension_v":null,
            "vmgroup":null,
            "vmgroup_el":null,
            "vmgroup_t":null,
            "vmgroup_v":null,
            "vmsecret":null,
            "voice_prompt_time":60,
            "vq_callback_enable_timeout":"no",
            "vq_callback_timeout":60,
            "vq_mode":"periodic",
            "vq_outprefix":null,
            "vq_periodic":20,
            "vq_switch":"no",
            "waittime":null,
            "week_date":null,
            "wrapuptime":10
        }
    },
    "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.

queue

no

string

Specific queue number

Successful response

queue_name

0

yes

string

Queue name

musicclass

yes

string

The Music on Hold playlist used by the queue.

leavewhenempty

yes

string

Configures whether to disconnect callers in queue based on agent status. There are three options:

  • Yes: Callers will be disconnected from queue if all agents are paused or unavailable.

  • No: Callers will never be disconnected from queue.

  • Strict (Default): Callers will be disconnected from the queue if there are no agents or if all agents are unavailable or paused.

joinempty

yes

string

Configures whether callers can dial into a call queue with no agents. There are three options:

  • Yes: Callers can always dial into a queue even if it is empty.

  • No (Default): Callers cannot dial into a queue if all agents are unavailable or paused.

  • Strict: Callers cannot dial into a queue if there are no agents or if all agents are unavailable or paused.

pin

no

string

PIN for dynamic agent login.

The suffix for dynamic agent login can be configured on the Agent Login page. 

ringtime

yes

string

Ring time

Configure the number of seconds to ring an agent. The minimum is 5.

strategy

ringall, linear, leastrecent, fewestcalls, random, memory

yes

string

Strategy

  • Ring All: Ring all available agents simultaneously until one agent answers.

  • Linear: Ring agents in the specified order.

  • Least Recent: Ring the agent who has been called the least recently.

  • Fewest Calls: Ring the agent with the fewest completed calls.

  • Random: Ring a random agent.

  • Round Robin: Ring agents using round robin schedule with memory.

wrapuptime

yes

string

Wrap-up time

Configure the delay time (in seconds) after a completed call before a new call will ring. If set to 0, there will be no delay between call completion and a new call.

maxlen

yes

string

Max Queue Length

Configure the maximum number of calls to be queued at once. This number does not include calls that have been connected to agents, only calls that are still in queue. When this maximum value is exceeded, the caller will hear a busy tone and be forwarded to the configured failover destination. Default value is 0 (unlimited).

reportholdtime

yes, no

no

string

Report wait time

If enabled, the wait time of the caller will be shown to the agent before establishing the call.

auto_record

all, external, internal, off

yes

string

Auto Record

all: All incoming calls to this extension will be recorded.

Off: This extension's calls will not be recorded.

External: All external calls of the extension will be recorded.

Internal: All internal calls of the extension will be recorded.

queue_timeout

yes

int

Max wait time

Amount of time to keep a caller in queue before rerouting them to the timeout destination. 

enable_feature

yes, no

no

string

Enable Feature Codes

If enabled, call queue members can use feature codes to transfer, call park or disconnect calls.

alertinfo

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

no

string

Alert-info

When the extension is callee, the Alert-info header field specifies an alternative ring tone to the callee.

voice_prompt_time

no

Destination Prompt Cycle

Configures the amount of time (in seconds) to pass before repeating the audio prompt specified in the custom_promt parameter below to callers. During the prompt, users can press 1 to transfer to the queue’s configured Destination Prompt destination. Valid range is 20-200. Default is 20 seconds.

custom_prompt

no

string

Custom prompt

When playing a custom prompt, press 1 to enter the failover destination or continue waiting in queue.

retry

no

int

Retry time

Configure the number of seconds to wait before ringing the next agent. The minimum is 1.

replace_caller_id

yes, no

no

string

Replace display name

If enabled, the UCM will replace the caller CID name with Call Queue name.

queue_chairmans

no

string

Queue chairman

enable_agent_login

yes, no

no

string

Enable agent login

Allows agent logins via 3rd party services.

Warning: Enabling this will log out all dynamic agents.

vq_switch

yes, no

no

string

Enable Virtual Queue

If enabled, virtual queue will be available for callers. Virtual queue allows callers to hang up the call while still maintaining their position in line. Callers will be called back when an agent is available to answer them.

vq_mode

yes, no

no

string

Virtual Queue Mode

When in DTMF mode,press 2 to trigger virtual queue. When in timeout mode, virtual queue will be triggered when the configured Virtual Queue Period has passed. 

vq_periodic

no

int

Virtual Queue Period

When vq_mode is set to timeout mode and when callers have waited the configured amount time, they will automatically be entered into virtual queue.

vq_outprefix

no

string

Virtual Queue Outbound Prefix

System will add this prefix to dialed numbers when calling back users.

announce_position

yes, no

no

string

Enable Position Announcement

If enabled, the UCM will announce to callers their position in queue.

announce_frequency

no

int

Announcement Interval

The time interval (in seconds) in which positions and estimated wait times will be announced to callers.

destination_type_t

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Timeout Destination

The destination that the call will be routed to if not answered within the configured queue wait time. 

vm_extension_t

no

string

Timeout Destination – Voicemail

Use this as reference for the other “max wait time destination options” commands below.

account_t

no

string

Max wait time-Destination-extension

vmgroup_t

no

string

Max wait time-Destination-voicemail group

ivr_t

no

string

Max wait time-Destination-IVR

ringgroup_t

no

string

Max wait time-Destination-Ring Group

queue_dest_t

no

string

Max wait time-Destination-queues

external_number_t

no

string

Max wait time-Destination-external number

destination_type_v

account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Destination Prompt Cycle-destination

The caller will be prompted to follow steps and get redirected to the configured failover destination.

vm_extension_v

no

string

Destination Prompt Cycle-destination-voicemail

account_v

no

string

Destination Prompt Cycle-destination-extension

vmgroup_v

no

string

Destination Prompt Cycle-destination-voicemail group

ivr_v

no

string

Destination Prompt Cycle-destination-IVR

ringgroup_v

no

string

Destination Prompt Cycle-destination-Ring group

queue_dest_v

no

string

Destination Prompt Cycle-destination-queues

external_number_v

no

string

Destination Prompt Cycle-destination-external number

destination_voice_enable

Yes, no

no

string

Configure whether callers will be prompted to be rerouted to the configured Destination Prompt Cycle destination.

autofill

Yes, no

no

Configures the queue’s call handling behavior. See the UCM user manual for more details.
yes: Parallel call handling

no: Serial call handling

destination_type_el

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Failover Destination

The destination that callers will be redirected to if the queue is empty or if all agents are unavailable.

vm_extension_el

no

string

Failover Destination-voicemail

account_el

no

string

Failover Destination-extension

vmgroup_el

no

string

Failover Destination-voicemail group

ivr_el

no

string

Failover Destination-IVR

ringgroup_el

no

string

Failover Destination-Ring group

queue_dest_el

no

string

Failover Destination-queues

external_number_el

no

string

Failover Destination-external number

vq_callback_enable_timeout

yes, no

no

string

Whether or not a timeout will be set for callers waiting in virtual queue. Upon timeout, callers will be disconnected from virtual queue.

vq_callback_timeout

no

int

The virtual queue timeout period.

announce_holdtime

yes, no

no

string

Enable Wait Time Announcement

If enabled, the estimated wait time for the call to get answered will periodically be announced to the caller. Note: Wait time will not be announced if less than one minute.

enable_welcome

yes, no

no

string

Enable welcome prompt

custom_welcome_prompt

no

string

Custom welcome prompt

schedule_clean_enable

once, daily, week, month

no

string

Whether or not to enable periodic agent call count clearing.

extension

no

string

Extension number

starttime

no

string

The time to reset agent call count.

pagingtype

once, daily, week, month

no

string

How often to reset agent call count.

week_date

sun, mon, tue, wed, thu, fri, sat

no

string

The weekday to reset agent call count.

custom_months

jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec

no

string

The month to reset agent call count.

custom_dates

no

string

The day of the month to reset agent call count.

members

no

string

Static agents

status

Yes

int

Successful response,status is 0

Failed response

status

0

yes

int

Please see the error code list for more details.

Table 61: getQueue

updateQueue

The “updateQueue” action allows users to update an existing call queue.

  • Request
{
    "request":{
        "action":"updateQueue",
        "cookie":"sid225627296-1574851572",
        "members":"1001,1002,1003",
        "queue":"6502",
        "queue_name":"GStest"
    }
}
  • 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.

queue

no

string

Specific queue number

Successful response

queue_name

0

yes

string

Queue name

musicclass

yes

string

The Music on Hold playlist used by the queue.

leavewhenempty

yes

string

Configures whether to disconnect callers in queue based on agent status. There are three options:

  • Yes: Callers will be disconnected from queue if all agents are paused or unavailable.

  • No: Callers will never be disconnected from queue.

  • Strict (Default): Callers will be disconnected from the queue if there are no agents or if all agents are unavailable or paused.

joinempty

yes

string

Configures whether callers can dial into a call queue with no agents. There are three options:

  • Yes: Callers can always dial into a queue even if it is empty.

  • No (Default): Callers cannot dial into a queue if all agents are unavailable or paused.

  • Strict: Callers cannot dial into a queue if there are no agents or if all agents are unavailable or paused.

pin

no

string

PIN for dynamic agent login.

The suffix for dynamic agent login can be configured on the Agent Login page. 

ringtime

yes

string

Ring time

Configure the number of seconds to ring an agent. The minimum is 5.

strategy

ringall, linear, leastrecent, fewestcalls, random, memory

yes

string

Strategy

  • Ring All: Ring all available agents simultaneously until one agent answers.

  • Linear: Ring agents in the specified order.

  • Least Recent: Ring the agent who has been called the least recently.

  • Fewest Calls: Ring the agent with the fewest completed calls.

  • Random: Ring a random agent.

  • Round Robin: Ring agents using round robin schedule with memory.

wrapuptime

yes

string

Wrap-up time

Configure the delay time (in seconds) after a completed call before a new call will ring. If set to 0, there will be no delay between call completion and a new call.

maxlen

yes

string

Max Queue Length

Configure the maximum number of calls to be queued at once. This number does not include calls that have been connected to agents, only calls that are still in queue. When this maximum value is exceeded, the caller will hear a busy tone and be forwarded to the configured failover destination. Default value is 0 (unlimited).

reportholdtime

yes, no

no

string

Report wait time

If enabled, the wait time of the caller will be shown to the agent before establishing the call.

auto_record

all, external, internal, off

yes

string

Auto Record

all: All incoming calls to this extension will be recorded.

Off: This extension's calls will not be recorded.

External: All external calls of the extension will be recorded.

Internal: All internal calls of the extension will be recorded.

queue_timeout

yes

int

Max wait time

Amount of time to keep a caller in queue before rerouting them to the timeout destination. 

enable_feature

yes, no

no

string

Enable Feature Codes

If enabled, call queue members can use feature codes to transfer, call park or disconnect calls.

alertinfo

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

no

string

Alert-info

When the extension is callee, the Alert-info header field specifies an alternative ring tone to the callee.

voice_prompt_time

no

Destination Prompt Cycle

Configures the amount of time (in seconds) to pass before repeating the audio prompt specified in the custom_promt parameter below to callers. During the prompt, users can press 1 to transfer to the queue’s configured Destination Prompt destination. Valid range is 20-200. Default is 20 seconds.

custom_prompt

no

string

Custom prompt

When playing a custom prompt, press 1 to enter the failover destination or continue waiting in queue.

retry

no

int

Retry time

Configure the number of seconds to wait before ringing the next agent. The minimum is 1.

replace_caller_id

yes, no

no

string

Replace display name

If enabled, the UCM will replace the caller CID name with Call Queue name.

queue_chairmans

no

string

Queue chairman

enable_agent_login

yes, no

no

string

Enable agent login

Allows agent logins via 3rd party services.

Warning: Enabling this will log out all dynamic agents.

vq_switch

yes, no

no

string

Enable Virtual Queue

If enabled, virtual queue will be available for callers. Virtual queue allows callers to hang up the call while still maintaining their position in line. Callers will be called back when an agent is available to answer them.

vq_mode

yes, no

no

string

Virtual Queue Mode

When in DTMF mode,press 2 to trigger virtual queue. When in timeout mode, virtual queue will be triggered when the configured Virtual Queue Period has passed. 

vq_periodic

no

int

Virtual Queue Period

When vq_mode is set to timeout mode and when callers have waited the configured amount time, they will automatically be entered into virtual queue.

vq_outprefix

no

string

Virtual Queue Outbound Prefix

System will add this prefix to dialed numbers when calling back users.

announce_position

yes, no

no

string

Enable Position Announcement

If enabled, the UCM will announce to callers their position in queue.

announce_frequency

no

int

Announcement Interval

The time interval (in seconds) in which positions and estimated wait times will be announced to callers.

destination_type_t

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Timeout Destination

The destination that the call will be routed to if not answered within the configured queue wait time. 

vm_extension_t

no

string

Timeout Destination – Voicemail

Use this as reference for the other “max wait time destination options” commands below.

account_t

no

string

Max wait time-Destination-extension

vmgroup_t

no

string

Max wait time-Destination-voicemail group

ivr_t

no

string

Max wait time-Destination-IVR

ringgroup_t

no

string

Max wait time-Destination-Ring Group

queue_dest_t

no

string

Max wait time-Destination-queues

external_number_t

no

string

Max wait time-Destination-external number

destination_type_v

account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Destination Prompt Cycle-destination

The caller will be prompted to follow steps and get redirected to the configured failover destination.

vm_extension_v

no

string

Destination Prompt Cycle-destination-voicemail

account_v

no

string

Destination Prompt Cycle-destination-extension

vmgroup_v

no

string

Destination Prompt Cycle-destination-voicemail group

ivr_v

no

string

Destination Prompt Cycle-destination-IVR

ringgroup_v

no

string

Destination Prompt Cycle-destination-Ring group

queue_dest_v

no

string

Destination Prompt Cycle-destination-queues

external_number_v

no

string

Destination Prompt Cycle-destination-external number

destination_voice_enable

Yes, no

no

string

Configure whether callers will be prompted to be rerouted to the configured Destination Prompt Cycle destination.

autofill

Yes, no

no

Configures the queue’s call handling behavior. See the UCM user manual for more details.
yes: Parallel call handling

no: Serial call handling

destination_type_el

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Failover Destination

The destination that callers will be redirected to if the queue is empty or if all agents are unavailable.

vm_extension_el

no

string

Failover Destination-voicemail

account_el

no

string

Failover Destination-extension

vmgroup_el

no

string

Failover Destination-voicemail group

ivr_el

no

string

Failover Destination-IVR

ringgroup_el

no

string

Failover Destination-Ring group

queue_dest_el

no

string

Failover Destination-queues

external_number_el

no

string

Failover Destination-external number

vq_callback_enable_timeout

yes, no

no

string

Whether or not a timeout will be set for callers waiting in virtual queue. Upon timeout, callers will be disconnected from virtual queue.

vq_callback_timeout

no

int

The virtual queue timeout period.

announce_holdtime

yes, no

no

string

Enable Wait Time Announcement

If enabled, the estimated wait time for the call to get answered will periodically be announced to the caller. Note: Wait time will not be announced if less than one minute.

enable_welcome

yes, no

no

string

Enable welcome prompt

custom_welcome_prompt

no

string

Custom welcome prompt

schedule_clean_enable

once, daily, week, month

no

string

Whether or not to enable periodic agent call count clearing.

extension

no

string

Extension number

starttime

no

string

The time to reset agent call count.

pagingtype

once, daily, week, month

no

string

How often to reset agent call count.

week_date

sun, mon, tue, wed, thu, fri, sat

no

string

The weekday to reset agent call count.

custom_months

jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec

no

string

The month to reset agent call count.

custom_dates

no

string

The day of the month to reset agent call count.

members

no

string

Static agents

Successful response

status

0

Yes

int

Successful response,status is 0

need_apply

yes, no

Yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 62: updateQueue

addQueue

The “addQueue” action will allow users to add a call queue.

  • Request
{
    "request":{
        "action":"addQueue",
        "cookie":"sid225627296-1574851572",
        "extension":"6502",
        "members":"1001,1002",
        "queue_chairmans":"1001",
        "queue_name":"test",
        "strategy":"ringall"
    }
}
  • 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.

queue_name

0

yes

string

Queue name

musicclass

yes

string

The Music on Hold playlist used by the queue.

leavewhenempty

yes

string

Configures whether to disconnect callers in queue based on agent status. There are three options:

  • Yes: Callers will be disconnected from queue if all agents are paused or unavailable.

  • No: Callers will never be disconnected from queue.

  • Strict (Default): Callers will be disconnected from the queue if there are no agents or if all agents are unavailable or paused.

joinempty

yes

string

Configures whether callers can dial into a call queue with no agents. There are three options:

  • Yes: Callers can always dial into a queue even if it is empty.

  • No (Default): Callers cannot dial into a queue if all agents are unavailable or paused.

  • Strict: Callers cannot dial into a queue if there are no agents or if all agents are unavailable or paused.

pin

no

string

PIN for dynamic agent login.

The suffix for dynamic agent login can be configured on the Agent Login page. 

ringtime

yes

string

Ring time

Configure the number of seconds to ring an agent. The minimum is 5.

strategy

ringall, linear, leastrecent, fewestcalls, random, memory

yes

string

Strategy

  • Ring All: Ring all available agents simultaneously until one agent answers.

  • Linear: Ring agents in the specified order.

  • Least Recent: Ring the agent who has been called the least recently.

  • Fewest Calls: Ring the agent with the fewest completed calls.

  • Random: Ring a random agent.

  • Round Robin: Ring agents using round robin schedule with memory.

wrapuptime

yes

string

Wrap-up time

Configure the delay time (in seconds) after a completed call before a new call will ring. If set to 0, there will be no delay between call completion and a new call.

maxlen

yes

string

Max Queue Length

Configure the maximum number of calls to be queued at once. This number does not include calls that have been connected to agents, only calls that are still in queue. When this maximum value is exceeded, the caller will hear a busy tone and be forwarded to the configured failover destination. Default value is 0 (unlimited).

reportholdtime

yes, no

no

string

Report wait time

If enabled, the wait time of the caller will be shown to the agent before establishing the call.

auto_record

all, external, internal, off

yes

string

Auto Record

all: All incoming calls to this extension will be recorded.

Off: This extension's calls will not be recorded.

External: All external calls of the extension will be recorded.

Internal: All internal calls of the extension will be recorded.

queue_timeout

yes

int

Max wait time

Amount of time to keep a caller in queue before rerouting them to the timeout destination. 

enable_feature

yes, no

no

string

Enable Feature Codes

If enabled, call queue members can use feature codes to transfer, call park or disconnect calls.

alertinfo

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

no

string

Alert-info

When the extension is callee, the Alert-info header field specifies an alternative ring tone to the callee.

voice_prompt_time

no

Destination Prompt Cycle

Configures the amount of time (in seconds) to pass before repeating the audio prompt specified in the custom_promt parameter below to callers. During the prompt, users can press 1 to transfer to the queue’s configured Destination Prompt destination. Valid range is 20-200. Default is 20 seconds.

custom_prompt

no

string

Custom prompt

When playing a custom prompt, press 1 to enter the failover destination or continue waiting in queue.

retry

no

int

Retry time

Configure the number of seconds to wait before ringing the next agent. The minimum is 1.

replace_caller_id

yes, no

no

string

Replace display name

If enabled, the UCM will replace the caller CID name with Call Queue name.

queue_chairmans

no

string

Queue chairman

enable_agent_login

yes, no

no

string

Enable agent login

Allows agent logins via 3rd party services.

Warning: Enabling this will log out all dynamic agents.

vq_switch

yes, no

no

string

Enable Virtual Queue

If enabled, virtual queue will be available for callers. Virtual queue allows callers to hang up the call while still maintaining their position in line. Callers will be called back when an agent is available to answer them.

vq_mode

yes, no

no

string

Virtual Queue Mode

When in DTMF mode,press 2 to trigger virtual queue. When in timeout mode, virtual queue will be triggered when the configured Virtual Queue Period has passed. 

vq_periodic

no

int

Virtual Queue Period

When vq_mode is set to timeout mode and when callers have waited the configured amount time, they will automatically be entered into virtual queue.

vq_outprefix

no

string

Virtual Queue Outbound Prefix

System will add this prefix to dialed numbers when calling back users.

announce_position

yes, no

no

string

Enable Position Announcement

If enabled, the UCM will announce to callers their position in queue.

announce_frequency

no

int

Announcement Interval

The time interval (in seconds) in which positions and estimated wait times will be announced to callers.

destination_type_t

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Timeout Destination

The destination that the call will be routed to if not answered within the configured queue wait time. 

vm_extension_t

no

string

Timeout Destination – Voicemail

Use this as reference for the other “max wait time destination options” commands below.

account_t

no

string

Max wait time-Destination-extension

vmgroup_t

no

string

Max wait time-Destination-voicemail group

ivr_t

no

string

Max wait time-Destination-IVR

ringgroup_t

no

string

Max wait time-Destination-Ring Group

queue_dest_t

no

string

Max wait time-Destination-queues

external_number_t

no

string

Max wait time-Destination-external number

destination_type_v

account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Destination Prompt Cycle-destination

The caller will be prompted to follow steps and get redirected to the configured failover destination.

vm_extension_v

no

string

Destination Prompt Cycle-destination-voicemail

account_v

no

string

Destination Prompt Cycle-destination-extension

vmgroup_v

no

string

Destination Prompt Cycle-destination-voicemail group

ivr_v

no

string

Destination Prompt Cycle-destination-IVR

ringgroup_v

no

string

Destination Prompt Cycle-destination-Ring group

queue_dest_v

no

string

Destination Prompt Cycle-destination-queues

external_number_v

no

string

Destination Prompt Cycle-destination-external number

destination_voice_enable

Yes, no

no

string

Configure whether callers will be prompted to be rerouted to the configured Destination Prompt Cycle destination.

autofill

Yes, no

no

Configures the queue’s call handling behavior. See the UCM user manual for more details.
yes: Parallel call handling

no: Serial call handling

destination_type_el

playsound, account, voicemail, queue, ringgroup, vmgroup, ivr, external_number

no

string

Failover Destination

The destination that callers will be redirected to if the queue is empty or if all agents are unavailable.

vm_extension_el

no

string

Failover Destination-voicemail

account_el

no

string

Failover Destination-extension

vmgroup_el

no

string

Failover Destination-voicemail group

ivr_el

no

string

Failover Destination-IVR

ringgroup_el

no

string

Failover Destination-Ring group

queue_dest_el

no

string

Failover Destination-queues

external_number_el

no

string

Failover Destination-external number

vq_callback_enable_timeout

yes, no

no

string

Whether or not a timeout will be set for callers waiting in virtual queue. Upon timeout, callers will be disconnected from virtual queue.

vq_callback_timeout

no

int

The virtual queue timeout period.

announce_holdtime

yes, no

no

string

Enable Wait Time Announcement

If enabled, the estimated wait time for the call to get answered will periodically be announced to the caller. Note: Wait time will not be announced if less than one minute.

enable_welcome

yes, no

no

string

Enable welcome prompt

custom_welcome_prompt

no

string

Custom welcome prompt

schedule_clean_enable

once, daily, week, month

no

string

Whether or not to enable periodic agent call count clearing.

starttime

no

string

The time to reset agent call count.

pagingtype

once, daily, week, month

no

string

How often to reset agent call count.

week_date

sun, mon, tue, wed, thu, fri, sat

no

string

The weekday to reset agent call count.

custom_months

jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec

no

string

The month to reset agent call count.

custom_dates

no

string

The day of the month to reset agent call count.

members

no

string

Static agents

Successful response

status

0

Yes

int

Successful response,status is 0

need_apply

yes, no

Yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 63: addQueue

deleteQueue

The “deleteQueue” allows users to delete an existing queue.

  • Request
{
    "request":{
        "action":"deleteQueue",
        "cookie":"sid1095249077-1574756325",
        "queue":"6502"
    }
}
  • 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.

queue

yes

int

Queue number

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

Yes, no

yes

string

Whether “Apply” is required for the configuration to take effect.

Table 64: deleteQueue

loginLogoffQueueAgent

The “loginLogoffQueueAgent” action allows users to login or logoff static agents.

  • Request
{
    "request":{
        "action":"loginLogoffQueueAgent",
        "cookie":"sid1632521748-1574853548",
        "extension":"6502",
        "interface":"1001",
        "operatetype":"logoff"
    }
}
  • Response
{
    "response":{},
    "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.

operatetype

login, logoff

yes

string

Operation type

interface

yes

string

Agent number

extension

yes

string

Queue number

Successful response

status

0

yes

int

The response is successful, status is 0.

Table 65: loginLogoffQueueAgent

pauseUnpauseQueueAgent

The “pauseUnpauseQueueAgent” action allows users to pause or unpause static agents.

  • Request
{
    "request":{
        "action":"pauseUnpauseQueueAgent",
        "cookie":"sid1632521748-1574853548",
        "interface":"1002",
        "operatetype":"pause"
    }
}
  • 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.

operatetype

pause, unpause

yes

string

Operation type

interface

yes

string

Agent number

extension

no

string

Queue number

Successful response

status

0

yes

int

The response is successful, status is 0.

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Table 66: pauseUnpauseQueueAgent

Paging/Intercom

addPaginggroup

The “addPaginggroup” will allow users to add a paging group.

  • Request
{
    "request":{
        "action":"addPaginggroup",
        "cookie":"sid1095249077-1574756325",
        "extension":"8004",
        "members":"1000,1001,1002",
        "number_allowed":"1000",
        "paginggroup_name":"8004",
        "paginggroup_type":"1way"
    }
}
  • 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.

extension

yes

string

extension

paginggroup_name

yes

string

Paging group name

paginggroup_type

3way, 2way, 1way, announcement

yes

string

Type:

  • 1way:1-way paging

  • 2way:2-way intercom

  • 3way:Multicast paging

  • announcement:announcement paging

custom_prompt

no

string

Custom Prompt

replace_caller_id

yes, no

no

string

Replace Display Name

If enabled, the UCM will replace the caller display name with Paging/Intercom name.

multicast_ip

no

string

Multicast IP Address

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

multicast_port

no

int

port

limitime

no

int

Maximum Call Duration In seconds. Default is 0 means no limit. 

custom_date

no

string

date

time

no

string

time, HH:MM

enable

yes, no

no

string

Enable. Whether to enable announcement paging.

members

no

string

Members that need paging/intercom

paginggroup

yes

string

Paging group number

old_multicast_ip

no

string

Multicast ip address set before

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

old_multicast_port

no

string

Multicast port set before

number_allowed

no

string

Paging/Intercom Whitelist

Only selected extensions will be able to initiate paging/intercom calls. If no extension is selected, all extensions will be able to initiate paging/intercom calls.

Successful response

status

yes

int

The response is successful, status is 0.

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 67: addPaginggroup

listPaginggroup

The “listPaginggroup” allows users to list the existing paging group.

  • Request
{
    "request":{
        "action":"listPaginggroup",
        "cookie":"sid1095249077-1574756325",
        "page":"1",
        "sidx":"extension",
        "sord":"asc"
    }
}
  • Response
{
    "response":{
        "page":1,
        "paginggroup":[
            {
                "custom_date":"2018-08-01",
                "custom_prompt":null,
                "enable":"yes",
                "extension":"8004",
                "holiday":null,
                "limitime":0,
                "members":"1000,1001,1002",
                "multicast_ip":"null",
                "multicast_port":"null",
                "paginggroup_name":"8004",
                "paginggroup_type":"1way",
                "replace_caller_id":"no",
                "time":"00:00",
                "tmp":"8004"
            }
        ],
        "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

Get extension list by page number.

sord

acs,desc

no

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

sidx

no

Sort according to the index.

item_num

no

Extension number on each page, which is, the maximum items of each return.

If empty, all members are returned by default.

options

paginggroup_name, paginggroup_type, extension, custom_prompt, replace_caller_id, multicast_ip, multicast_port, limitime, custom_date, time, enable, members

no

Specify obtaining options. Multiple can be set, separated by commas. If empty, all options are returned by default.

Successful response

status

0

yes

int

Total number of items on the list

total_item

yes

int

Total pages of the list

total_page

yes

int

What page is on. 

page

yes

int

Extension number.

extension

no

string

extension

paginggroup_name

no

string

Paging group name

paginggroup_type

3way, 2way, 1way, announcement

no

string

Type:

  • 1way: 1-way paging

  • 2way: 2-way intercom

  • 3way: Multicast paging

  • announcement: announcement paging

custom_prompt

no

string

Custom Prompt

replace_caller_id

yes, no

no

string

Replace Display Name

If enabled, the UCM will replace the caller display name with Paging/Intercom name.

multicast_ip

no

string

Multicast IP Address

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

multicast_port

no

int

port

limitime

no

int

Maximum Call Duration In seconds. Default is 0 means no limit. 

custom_date

no

string

date

time

no

string

Time in HH:MM format

enable

yes, no

no

string

Enable. Whether to enable announcement paging.

members

no

string

The members that will be paged.

Failed response

status

yes

int

Please see the error code list for more details.

Table 68: listPaginggroup

getPaginggroup

The “getPaginggroup” action allows users to get a specific paging group.

  • Request
{
    "request":{
        "action":"getPaginggroup",
        "cookie":"sid1095249077-1574756325",
        "paginggroup":"8004"
    }
}
  • Response
{
    "response":{
        "paginggroup":{
            "custom_date":"2018-08-01",
            "custom_prompt":null,
            "enable":"yes",
            "extension":"8004",
            "holiday":null,
            "limitime":0,
            "members":"1000,1001,1002",
            "multicast_ip":"null",
            "multicast_port":"null",
            "number_allowed":"1000",
            "paginggroup_name":"8004",
            "paginggroup_type":"1way",
            "replace_caller_id":"no",
            "time":"00:00",
            "tmp":"8004"
        }
    },
    "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.

paginggroup

yes

string

Paging/intercom group number

Successful response

status

yes

int

the response is successful, status is 0

extension

no

string

extension

paginggroup_name

no

string

Paging group name

paginggroup_type

3way, 2way, 1way, announcement

no

string

Type:

  • 1way: 1-way paging

  • 2way: 2-way intercom

  • 3way: Multicast paging

  • announcement: announcement paging

custom_prompt

no

string

Custom Prompt

replace_caller_id

yes, no

no

string

Replace Display Name

If enabled, the UCM will replace the caller display name with Paging/Intercom name.

multicast_ip

no

string

Multicast IP Address

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

multicast_port

no

int

port

limitime

no

int

Maximum Call Duration In seconds. Default is 0 means no limit. 

custom_date

no

string

date

time

no

string

Time in HH:MM format

Failed response

status

yes

int

Please see the error code list for more details.

Table 69: getPaginggroup

updatePaginggroup

The “updatePaginggroup” action allows users to update an existing paging group.

  • Request
{
    "request":{
        "action":"updatePaginggroup",
        "cookie":"sid1381890074-1574854661",
        "members":"1003",
        "paginggroup":"8005",
        "paginggroup_type":"2way"
    }
}
  • 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.

extension

yes

string

extension

paginggroup_name

yes

string

Paging group name

paginggroup_type

3way, 2way, 1way, announcement

yes

string

Type:

  • 1way:1-way paging

  • 2way:2-way intercom

  • 3way:Multicast paging

  • announcement:announcement paging

custom_prompt

no

string

Custom Prompt

replace_caller_id

yes, no

no

string

Replace Display Name

If enabled, the UCM will replace the caller display name with Paging/Intercom name.

multicast_ip

no

string

Multicast IP Address

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

multicast_port

no

int

port

limitime

no

int

Maximum Call Duration In seconds. Default is 0 means no limit. 

custom_date

no

string

date

time

no

string

time, HH:MM

enable

yes, no

no

string

Enable. Whether to enable announcement paging.

members

no

string

Members that need paging/intercom

paginggroup

yes

string

Paging group number

old_multicast_ip

no

string

Multicast ip address set before

The allowed multicast IP address range is 224.0.1.0 - 238.255.255.255.

old_multicast_port

no

string

Multicast port set before

number_allowed

no

string

Paging/Intercom Whitelist

Only selected extensions will be able to initiate paging/intercom calls. If no extension is selected, all extensions will be able to initiate paging/intercom calls.

Successful response

status

yes

int

The response is successful, status is 0.

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 70: updatePaginggroup

deletePaginggroup

The “deletePaginggroup” action allows users to delete an existing paging group.

  • Request
{
    "request":{
        "action":"deletePaginggroup",
        "cookie":"sid627603306-1574758858",
        "paginggroup":"8004"
    }
}
  • 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.

paginggroup

yes

string

Paging/intercom group number

Successful response

status

yes

int

the response is successful, status is 0

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 71: deletePaginggroup

MulticastPaging

The “MulticastPaging” action allows users to initiate a multicast paging call.

  • Request
{
    "request":{
        "action":"MulticastPaging",
        "caller":"1004",
        "cookie":"sid1381890074-1574854661",
        "pagingnum":"8005"
    }
}
  • 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.

pagingnum

yes

string

Multicast paging number

caller

yes

string

The extension used to initiate the page.

Successful response

status

yes

int

the response is successful, status is 0

need_apply

no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 72: MulticastPaging

MulticastPagingHangup

The “MulticastPagingHangup” action allows users to hangup an ongoing multicast paging call.

  • Request
{
    "request":{
        "action":"MulticastPagingHangup",
        "cookie":"sid1381890074-1574854661",
        "pagingnum":"8005"
    }
}
  • 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.

pagingnum

yes

string

Multicast paging number

Successful response

status

yes

int

the response is successful, status is 0

need_apply

no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 73: MulticastPagingHangup

IVR

addIVR

The “addIVR” action allows users to add an IVR.

  • Request
{
    "request":{
        "action":"addIVR",
        "alertinfo":"ring1",
        "cookie":"sid1682729010-1574760528",
        "dial_conference":"no",
        "dial_directory":"no",
      "dial_extension":"no",
        "dial_fax":"no",
        "dial_paginggroup":"no",
        "dial_queue":"no",
        "dial_ringgroup":"no",
        "dial_trunk":"yes",
        "dial_vmgroup":"no",
        "digit_timeout":3,
        "extension":"7000",
        "iloop":3,
        "invalid_prompt":"invalid",
        "ivr_blackwhite_list":"",
        "ivr_name":"7000",
        "ivr_out_blackwhite_list":"1000",
        "language":null,
        "members":[
            {
                "keypress":"i",
                "keypress_event":"member_prompt",
                "member_prompt":"goodbye"
            },
            {
                "keypress":"t",
                "keypress_event":"member_prompt",
                "member_prompt":"goodbye"
            }
        ],
        "permission":"internal-local",
        "replace_caller_id":"yes",
        "response_timeout":10,
        "switch":"no",
        "timeout_prompt":"ivr-create-timeout",
        "tloop":3,
        "welcome_prompt":"welcome"
    }
}
  • 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.

ivr_name

yes

string

IVR Name

extension

yes

string

IVR number, the extension number of automatic voice reply.

welcome_prompt

yes

string

Prompt


Initial tone that plays when the user enters the IVR.

response_timeout

yes

int

Response Timeout

Timeout occurs when no DTMF entry is detected for the configured number of seconds after the IVR finishes playing the prompts.

digit_timeout

yes

int

Digit timeout

After the user enters a digit, the user needs to enter the next digit within the timeout. If no digit is detected within the timeout, the PBX will consider the entries complete. The default timeout is 3 seconds.

timeout_prompt

yes

string

Response Timeout Prompt

Play the selected prompt if response timeout occurs.

invalid_prompt

yes

string

Maximum calling period.

In seconds, default is 0, which means unlimited. 

tloop

yes

int

Response Timeout Prompt Repeats

Number of times to repeat the prompt.

After the final repeat, calls will be redirected to the Timeout destination (if configured) or dropped.

iloop

yes

int

Invalid Input Prompt Repeats

Number of times to repeat the prompt.

After the final repeat, calls will be redirected to the Invalid destination (if configured) or dropped.

dial_extension

yes, no

no

string

Dial Another Extensions-extension

dial_conference

yes, no

no

string

Dial Another Extensions-conference rooms

dial_queue

yes, no

no

string

Dial Another Extensions-queues

dial_ringgroup

yes, no

no

string

Dial Another Extensions-ring group

dial_vmgroup

yes, no

no

string

Dial Another Extensions-voicemail group

dial_paginggroup

yes, no

no

string

Dial Another Extensions-paging/intercom group

dial_fax

yes, no

no

string

Dial Another Extensions-fax

dial_trunk

yes, no

no

string

Dial trunk

If enabled, users will be able to access trunks through this IVR. if using this feature, it is mandatory to configure permission.

dial_directory

yes, no

no

string

Dial Another Extensions-dial by name

permission

internal,

internal-local,

internal-local-national,

internal-local-national-international

no

string

permission

internal-internal

internal-local-local

internal-local-national-national

internal-local-national-international-international

language

no

string

language

alertinfo

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

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

no

string

Alert-info

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

replace_caller_id

no

string

Replace Display Name

switch

no

white

black

no

string

IVR Black/Whitelist

Only whitelisted numbers and numbers not blacklisted can be called from the IVR.

ivr_blackwhite_list

no

string

Internal Black/Whitelist

ivr_out_blackwhite_list

no

string

External Blacklist/Whitelist

Can be used only when Dial Trunk is enabled. Numbers will be added as follows: number1, number2, number3.

members

no

Json array

Key Pressing Events

Successful response

status

yes

int

the response is successful, status is 0

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 74: addIVR

listIVR

The “listIVR” action allows users to list the available IVR.

  • Request
{
    "request":{
        "action":"listIVR",
        "cookie":"sid1682729010-1574760528"
    }
}
  • Response
{
    "response":{
        "ivr":[
            {
                "alertinfo":"ring1",
                "dial_conference":"no",
                "dial_directory":"no",
                "dial_extension":"no",
                "dial_failed_back2menu":"no",
                "dial_fax":"no",
                "dial_multimedia_conference":"no",
                "dial_paginggroup":"no",
                "dial_queue":"no",
                "dial_ringgroup":"no",
                "dial_trunk":"yes",
                "dial_vmgroup":"no",
                "digit_timeout":3,
                "extension":"7000",
                "iloop":3,
                "invalid_prompt":"invalid",
                "ivr_id":"ivr-1",
                "ivr_name":"7000",
                "language":null,
                "permission":"internal-local",
                "replace_caller_id":"yes",
                "response_timeout":10,
                "switch":"no",
                "timeout_prompt":"ivr-create-timeout",
                "tloop":3,
                "welcome_prompt":"welcome"
            }
        ],
        "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.

sord

acs,desc

no

string

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

sidx

no

string

Sort according to the index.

item_num

no

int

Extension number on each page, which is, the maximum items of each return.

If empty, all members are returned by default.

options

ivr_id, ivr_name, extension, response_timeout, digit_timeout

no

string

Specify obtaining options. Multiple can be set, separated by commas. If empty, all options are returned by default.

Successful response

status

0

yes

int

Successful response, status is 0

total_item

yes

int

Total pages of the list

total_page

yes

int

Total pages of the list

page

yes

int

What page is on. 

ivr_id

no

string

IVR id

ivr_name

yes

string

IVR name

extension

yes

string

IVR number, the extension number of automatic voice reply.

custom_prompt

yes

string

Prompt

The welcome prompt that plays when a caller dials into the IVR.

response_timeout

yes

int

Response Timeout

The timeout that occurs when no DTMF input is detected for the configured number of seconds after an IVR prompt finishes playing.

digit_timeout

yes

int

Digit timeout

The amount of time to enter each subsequent key after the first key entry. If no input is detected within the timeout period, the UCM will consider the entry complete. Default is 3 seconds.

timeout_prompt

yes

string

Response Timeout Prompt

Play the selected prompt if response timeout occurs.

invalid_prompt

yes

string

Description doesn’t match the parameter.

Invalid Prompt

Prompt that plays when invalid input is detected.  

tloop

yes

int

Response Timeout Prompt Repeats

Amount of times to repeat the response timeout prompt before redirecting the call to the timeout destination (if configured) or disconnecting the call.

iloop

yes

int

Invalid Input Prompt Repeats

Number of times to repeat the invalid prompt before redirecting the call to the invalid destination (if configured) or disconnecting the call.

dial_extension

yes, no

no

string

Whether or not the IVR can dial regular extensions.

dial_conference

yes, no

no

string

Use previous comment as reference for the rest of the “dial_” parameters.

dial_queue

yes, no

no

string

Dial Other Extensions-queues

dial_ringgroup

yes, no

no

string

Dial Other Extensions-ring group

dial_vmgroup

yes, no

no

string

Dial Other Extensions-voicemail group

dial_paginggroup

yes, no

no

string

Dial Other Extensions-paging/intercom group

dial_fax

yes, no

no

string

Dial Other Extensions-fax

dial_trunk

yes, no

no

string

Dial trunk

Whether or not the IVR can dial to trunks. If enabled, the IVR must have permission level configured.

dial_directory

yes, no

no

string

Dial Other Extensions-dial by name

permission

internal,

internal-local,

internal-local-national,

internal-local-national-international

no

string

permission

internal-internal

internal-local-local

internal-local-national-national

internal-local-national-international-international

language

no

string

language

alertinfo

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

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

no

string

Alert-info

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

replace_caller_id

no

string

Replace Display Name

switch

no

white

black

no

string

IVR Black/Whitelist

white: Only numbers in the whitelist can access this IVR.

black: Numbers in the blacklist cannot access the IVR.

Failed response

status

yes

int

Please see the error code list for more details.

Table 75: listIVR

getIVR

The “getIVR” action allows users to get information about a specific IVR.

  • Request
{
    "request":{
        "action":"getIVR",
        "cookie":"sid1682729010-1574760528",
        "ivr":"ivr-1"
    }
}
  • Response
{
    "response":{
        "ivr":{
            "alertinfo":"ring1",
            "dial_conference":"no",
            "dial_directory":"no",
            "dial_extension":"no",
            "dial_failed_back2menu":"no",
            "dial_fax":"no",
            "dial_multimedia_conference":"no",
            "dial_paginggroup":"no",
            "dial_queue":"no",
            "dial_ringgroup":"no",
            "dial_trunk":"yes",
            "dial_vmgroup":"no",
            "digit_timeout":3,
            "extension":"7000",
            "iloop":3,
            "invalid_prompt":"invalid",
            "ivr_blackwhite_list":"",
            "ivr_id":"ivr-1",
            "ivr_name":"7000",
            "ivr_out_blackwhite_list":"1000",
            "language":null,
            "permission":"internal-local",
            "replace_caller_id":"yes",
            "response_timeout":10,
            "switch":"no",
            "timeout_prompt":"ivr-create-timeout",
            "tloop":3,
            "welcome_prompt":"welcome"
        },
        "members":[
            {
                "keypress":"i",
                "keypress_event":"member_prompt",
                "member_prompt":"goodbye"
            },
{
                "keypress":"t",
                "keypress_event":"member_prompt",
                "member_prompt":"goodbye"
            }
        ]
    },
    "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.

ivr

yes

string

IVR number

Successful response

status

0

yes

int

Successful response, status is 0

ivr_id

no

string

IVR id

ivr_name

yes

string

IVR name

extension

yes

string

IVR number, the extension number of automatic voice reply.

welcome_prompt

yes

string

Prompt

The welcome prompt that plays when a caller dials into the IVR.

response_timeout

yes

int

Response Timeout

The timeout that occurs when no DTMF input is detected for the configured number of seconds after an IVR prompt finishes playing.

digit_timeout

yes

int

Digit timeout

The amount of time to enter each subsequent key after the first key entry. If no input is detected within the timeout period, the UCM will consider the entry complete. Default is 3 seconds.

timeout_prompt

yes

string

Response Timeout Prompt

Play the selected prompt if response timeout occurs.

invalid_prompt

yes

string

Description doesn’t match the parameter.

Invalid Prompt

Prompt that plays when invalid input is detected.  

tloop

yes

int

Response Timeout Prompt Repeats

Amount of times to repeat the response timeout prompt before redirecting the call to the timeout destination (if configured) or disconnecting the call.

iloop

yes

int

Invalid Input Prompt Repeats

Number of times to repeat the invalid prompt before redirecting the call to the invalid destination (if configured) or disconnecting the call.

dial_extension

yes, no

no

string

Whether or not the IVR can dial regular extensions.

dial_conference

yes, no

no

string

Use previous comment as reference for the rest of the “dial_” parameters.

dial_queue

yes, no

no

string

Dial Other Extensions-queues

dial_ringgroup

yes, no

no

string

Dial Other Extensions-ring group

dial_vmgroup

yes, no

no

string

Dial Other Extensions-voicemail group

dial_paginggroup

yes, no

no

string

Dial Other Extensions-paging/intercom group

dial_fax

yes, no

no

string

Dial Other Extensions-fax

dial_trunk

yes, no

no

string

Dial trunk

Whether or not the IVR can dial to trunks. If enabled, the IVR must have permission level configured.

dial_directory

yes, no

no

string

Dial Other Extensions-dial by name

permission

internal,

internal-local,

internal-local-national,

internal-local-national-international

no

string

permission

internal-internal

internal-local-local

internal-local-national-national

internal-local-national-international-international

language

no

string

language

alertinfo

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

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

no

string

Alert-info

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

replace_caller_id

no

string

Replace Display Name

switch

no

white

black

no

string

IVR Black/Whitelist

white: Only numbers in the whitelist can access this IVR.

black: Numbers in the blacklist cannot access the IVR.

ivr_blackwhite_list

no

string

Internal Black/Whitelist

ivr_out_blackwhite_list

no

string

External Blacklist/Whitelist

Can be used only when Dial Trunk is enabled. Numbers will be added as follows: number1, number2, number3.

members

no

Json array

Key Pressing Events

Failed response

status

yes

int

Please see the error code list for more details.

Table 76: getIVR

updateIVR

The “updateIVR” action allows users to update a specific IVR.

  • Request
{
    "request":{
        "action":"updateIVR",
        "alertinfo":"ring2",
        "cookie":"sid1682729010-1574760528",
        "dial_conference":"no",
        "dial_directory":"no",
        "dial_extension":"no",
        "dial_failed_back2menu":"no",
        "dial_fax":"no",
        "dial_paginggroup":"no",
        "dial_queue":"no",
        "dial_ringgroup":"no",
        "dial_trunk":"yes",
        "dial_vmgroup":"no",
        "digit_timeout":"3",
        "extension":"7000",
        "iloop":"3",
        "invalid_prompt":"invalid",
        "ivr":"ivr-1",
        "ivr_name":"7000",
        "ivr_out_blackwhite_list":"1009",
        "permission":"internal-local",
        "replace_caller_id":"yes",
        "response_timeout":"10",
        "switch":"no",
        "timeout_prompt":"ivr-create-timeout",
        "tloop":"3",
        "welcome_prompt":"welcome"
    }
}
  • 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.

ivr

yes

string

IVR number

ivr_name

yes

string

IVR Name

extension

yes

string

IVR number, the extension number of automatic voice reply.

welcome_prompt

yes

string

Prompt

Initial tone that plays when the user enters the IVR.

response_timeout

yes

int

Response Timeout

Timeout occurs when no DTMF entry is detected for the configured number of seconds after the IVR finishes playing the prompts.

digit_timeout

yes

int

Digit timeout

After the user enters a digit, the user needs to enter the next digit within the timeout. If no digit is detected within the timeout, the PBX will consider the entries complete. The default timeout is 3 seconds.

timeout_prompt

yes

string

Response Timeout Prompt

Play the selected prompt if response timeout occurs.

invalid_prompt

yes

string

Maximum calling period.

In seconds, default is 0, which means unlimited. 

tloop

yes

int

Response Timeout Prompt Repeats

Number of times to repeat the prompt.

After the final repeat, calls will be redirected to the Timeout destination (if configured) or dropped.

iloop

yes

int

Invalid Input Prompt Repeats

Number of times to repeat the prompt.

After the final repeat, calls will be redirected to the Invalid destination (if configured) or dropped.

dial_extension

yes, no

no

string

Dial Another Extensions-extension

dial_conference

yes, no

no

string

Dial Another Extensions-conference rooms

dial_queue

yes, no

no

string

Dial Another Extensions-queues

dial_ringgroup

yes, no

no

string

Dial Another Extensions-ring group

dial_vmgroup

yes, no

no

string

Dial Another Extensions-voicemail group

dial_paginggroup

yes, no

no

string

Dial Another Extensions-paging/intercom group

dial_fax

yes, no

no

string

Dial Another Extensions-fax

dial_trunk

yes, no

no

string

Dial trunk

If enabled, users will be able to access trunks through this IVR. if using this feature, it is mandatory to configure permission.

dial_directory

yes, no

no

string

Dial Another Extensions-dial by name

permission

internal,

internal-local,

internal-local-national,

internal-local-national-international

no

string

permission

internal-internal

internal-local-local

internal-local-national-national

internal-local-national-international-international

language

no

string

language

alertinfo

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

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

no

string

Alert-info

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

replace_caller_id

no

string

Replace Display Name

switch

no

white

black

no

string

IVR Black/Whitelist

Only whitelisted numbers and numbers not blacklisted can be called from the IVR.

ivr_blackwhite_list

no

string

Internal Black/Whitelist

ivr_out_blackwhite_list

no

string

External Blacklist/Whitelist

Can be used only when Dial Trunk is enabled. Numbers will be added as follows: number1, number2, number3.

members

no

Json array

Key Pressing Events

Successful response

status

yes

int

the response is successful, status is 0

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 77: updateIVR

deleteIVR

The “deleteIVR” action allows users to delete an existing IVR.

  • Request
{
    "request":{
        "action":"deleteIVR",
        "cookie":"sid1682729010-1574760528",
        "ivr":"ivr-1"
    }
}
  • 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.

ivr

yes

string

Talked to development team. This is the IVR index, not extension. Will be changed to IVR extension in the future.

Successful response

status

yes

int

The response is successful, status is 0

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 78: deleteIVR

User Information

listUser

The “listUser” action allows users to get information about a user.

  • Request
{
    "request": {
           "action":"listUser",
           "item_num":"10",
           "sidx":"extension",
           "sord":"asc",
           "page":"1",
           "cookie": "sid81747798-1551856142"
      }
}
  • Response
{

    "response":{
        "user_id":[
            {
                "user_id":0,
                "user_name":"admin",
                "privilege":0,
                "department":null,
                "first_name":null,
                "last_name":null,
                "enable_multiple_extension":"no",
                "multiple_extension":null,
                "email":null,
                "language":null,
                "fax":null,
                "family_number":null,
                "phone_number":null,
                "cookie":"sid523099813-1555662509",
                "login_time":"2019-04-19 16:49:05",
                "email_to_user":"no",
                "ip":"192.168.129.55"
            },
            {
                "user_id":2,
                "user_name":"1083",
                "privilege":3,
                "department":null,
                "first_name":"aaa",
                "last_name":"aaa",
                "enable_multiple_extension":"no",
                "multiple_extension":null,
                "email":null,
                "language":null,
                "fax":null,
                "family_number":null,
                "phone_number":null,
                "cookie":null,
                "login_time":null,
                "email_to_user":"no",
                "ip":null
            },
            {
                "user_id":3,
                "user_name":"1084",
                "privilege":3,
                "department":null,
                "first_name":null,
                "last_name":null,
                "enable_multiple_extension":"no",
                "multiple_extension":null,
                "email":null,
                "language":null,
                "fax":null,
                "family_number":null,
                "phone_number":null,
                "cookie":null,
                "login_time":null,
                "email_to_user":"no",
                "ip":null
            }
        ],
        "total_item":3,
        "total_page":1,
        "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.

sord

acs,desc

no

string

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

sidx

no

string

Sort according to the index.

item_num

no

int

Extension number on each page, which is, the maximum items of each return.

If empty, all members are returned by default.

options

department, first_name, last_name, email, language, fax, family_number, phone_number, login_time, ip

no

string

Specify obtaining options. Multiple can be set, separated by commas. If empty, all options are returned by default.

Successful response

status

0

yes

int

Successful response, status is 0

total_item

yes

int

Total number of items on the list

total_page

yes

int

Total pages of the list

page

yes

int

What page is on. 

user_id

no

int

User id

user_name

yes

string

User name

privilege

yes

int

The privilege level granted to the user. 

department

yes

string

The department that the user belongs to.

first_name

yes

string

First name of the user

last_name

yes

string

Last name of the user

email

yes

string

Email address of the user. For example, "bobjones@bobjones.null".

language

yes

string

Language

The language that the user will hear voice prompts in.

“default” uses the language of global settings.

fax

yes

string

Fax number of the user.

family_number

yes

string

User family number

phone_number

yes

string

User phone number

login_time

yes

string

Last login time

ip

yes

string

IP address of the user.

Failed response

status

yes

int

Please see the error code list for more details.

Table 79: listUser

getUser

The “getUser” action allows users to obtain user’s configuration.

  • Request
{
	"request": {
		"action":"getUser",
		"user_name":"1083",
		"cookie": "sid81747798-1551856142"
	}
}
  • Response
{

    "response":{
        "user_name":{
            "login_time":null,
            "cookie":null,
            "phone_number":"18373710740",
            "family_number":"8888",
            "fax":"123",
            "language":"en",
            "email":"2453034231@gmail.com",
            "multiple_extension":null,
            "enable_multiple_extension":"no",
            "email_to_user":"yes",
            "last_name":"John",
            "first_name":"Doe",
            "department":"Documentation",
            "privilege":3,
            "user_id":2
        }
    },
    "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.

user_name

yes

string

username

Successful response

status

0

yes

int

Successful response, status is 0

phone_number

yes

string

User phone number

family_number

yes

string

User family phone number

fax

yes

string

User fax

language

yes

string

Language

Language of voice prompt.

“default” uses the language of global settings.

email

yes

string

The Email address of this user. For example, "bobjones@bobjones.null".

last_name

yes

string

The last Name of the user.

first_name

yes

string

The first Name of the user.

department

yes

string

The Department that the user belongs to

privilege

yes

int

The privilege level granted to the user. 

user_id

yes

int

User id

Failed response

status

yes

int

Please see the error code list for more details.

Table 80: getUser

updateUser

The “updateUser” action allows users to update a user.

  • Request
{

    "request":{
        "user_name":"1083",
        "department":"R&D department 2",
        "fax":"123",
        "email":"gangwang@grandstream.cn",
        "first_name":"aaa",
        "last_name":"aaa",
        "family_number":"8888",
        "phone_number":"18373710740",
        "privilege":"3",
        "action":"updateUser",
        "user_id":"2"
    }

}
  • 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.

user_name

yes

string

username

phone_number

yes

string

User phone number

family_number

yes

string

User family phone number

fax

yes

string

User fax

email

yes

string

The Email address of this user. For example, "bobjones@bobjones.null".

last_name

yes

string

The last Name of the user.

first_name

yes

string

The first Name of the user.

department

yes

string

The Department that the user belongs to

Privilege

yes

Int

The privilege level granted to the user. 

user_id

yes

int

User id

Successful response

status

yes

int

The response is successful, status is 0

need_apply

yes, no

yes

string

Whether “Apply” is required for the configuration to take effect

Failed response

status

yes

int

Please see the error code list for more details.

Table 81: updateUser

Extension Groups

listExtensionGroup

The “listExtensionGroup” action allows users to list extension group.

  • Request
{
	"request": {
		"action":"listExtensionGroup",
		"item_num":"10",
		"sidx":"group_name",
		"sord":"asc",
		"page":"1",
		"cookie": "sid81747798-1551856142"
	}
}
  • Response
{

    "response":{
        "extension_group":[
            {
                "group_id":"group-3",
                "group_name":"1083",
                "members":"1083",
                "tmp":"group-3"
            },
            {
                "group_id":"group-2",
                "group_name":"45",
                "members":"1083,1084",
                "tmp":"group-2"
            },
            {
                "group_id":"group-1",
                "group_name":"ew",
                "members":null,
                "tmp":null
            }
        ],
        "total_item":3,
        "total_page":1,
        "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

username

sord

acs,desc

no

string

User phone number

sidx

no

string

User family phone number

item_num

no

int

User fax

options

group_name, members, group_id

no

string

The Email address of this user. For example, "bobjones@bobjones.null".

Successful response

status

yes

int

The response is successful, status is 0

total_item

yes, no

yes

int

Whether “Apply” is required for the configuration to take effect

total_page

yes

int

Total pages of the list

page

yes

int

What page is on. 

group_id

no

int

Group id

group_name

yes

string

Group name

members

yes

int

Extensions in the group

Failed response

status

yes

int

Please see the error code list for more details.

Table 82: listExtensionGroup

PIN Groups

listPinSets

The “listPinSets” action allows users to list the available pin group.

  • Request
{
	"request": {
		"action":"listPinSets",
		"item_num":"10",
		"sidx":"pin_sets_id",
		"sord":"asc",
		"page":"1",
		"cookie": "sid81747798-1551856142"
	}
}
  • Response
{

    "response":{
        "pin_sets_id":[
            {
                "pin_sets_id":"1557210434090",
                "pin_sets_name":"hehe",
                "record_in_cdr":"no"
            },
            {
                "pin_sets_id":"1557210889523",
                "pin_sets_name":"kp",
                "record_in_cdr":"no"
            }
        ],
        "total_item":2,
        "total_page":1,
        "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

username

sord

acs,desc

no

string

User phone number

sidx

no

string

User family phone number

item_num

no

int

User fax

options

group_name, members, group_id

no

string

The Email address of this user. For example, "bobjones@bobjones.null".

Successful response

status

yes

int

The response is successful, status is 0

total_item

yes, no

yes

int

Whether “Apply” is required for the configuration to take effect

total_page

yes

int

Total pages of the list

page

yes

int

What page is on. 

pin_sets_id

no

int

ID of the PIN set

pin_sets_name

yes

string

Name of the PIN set

record_in_cdr

yes

string

Whether to record in CDR

Failed response

status

yes

int

Please see the error code list for more details.

Table 83: listPinSets

cdrapi

The “cdrapi” action allows users to get the CDR database.

  • Request
{
    "request":{
        "action":"cdrapi",
        "cookie":"sid1381890074-1574854661",
        "format":"json"
    }
}
  • Response
{
    "cdr_root":[
        {
            "AcctId":"1",
            "accountcode":"",
            "action_owner":"1004",
            "action_type":"PAGE[8005]",
            "amaflags":"DOCUMENTATION",
            "answer":"2019-11-27 07:17:13",
            "billsec":"1",
            "caller_name":"1004",
            "cdr":"1574857028274003-1004",
            "chanext":"",
            "channel":"PJSIP/1004-00000010",
            "channel_ext":"1004",
            "clid":"\"1004\" <1004>",
            "dcontext":"pagegroups",
            "disposition":"ANSWERED",
            "dst":"8005",
            "dst_trunk_name":"",
            "dstanswer":"8005",
            "dstchanext":"",
            "dstchannel":"MulticastRTP/0x47e2650c",
            "dstchannel_ext":"0x47e2650c",
            "duration":"6",
            "end":"2019-11-27 07:17:14",
            "lastapp":"Dial",
            "lastdata":"MulticastRTP/basic/224.0.1.2:8080,10,zA()",
            "recordfiles":"",
            "service":"p",
            "session":"1574857028274003-1004",
            "src":"1004",
            "src_trunk_name":"",
            "start":"2019-11-27 07:17:08",
            "uniqueid":"1574857028.56",
            "userfield":"Internal"
        }
    ]
}

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.

format

csv, xml, json

no

int

username

numRecords

[0,1000]

no

string

User phone number

offset

number

no

string

User family phone number

caller

Extension separated by comma, extension range, caller regular expression

no

string

The filter can find call records that match the input parameter, based on source (caller) number or destination (callee) number.

A format including wildcard (‘@’ or ‘_’) will be treated as regular expression. , ’-‘ is treated as range symbol rather than hyphen; ‘@’ represents characters of any digit(including 0); ’_’ represents one character.

Otherwise, digits including a hyphen will be recognized as an extension segment, non-numeric characters or characters including multiple hyphens will be ignored

0-0 matches all non-numeric string and null string.

For example, caller=5300,5302-5304,_4@-or-caller=5300&caller=5302-5304&caller=_4@

(matches extension 5300. 5302, 5303, 5304 and any extension of which the second digit is 4.)

callee

startTime

Date and /or time, format is as follows: YYYY-MM-DDTHH:MM

YYYY-MM-DDTHH:MM:SS

YYYY-MM-DDTHH:MM:SS.SSS

('T' is the separator of the 3 formats)

HH:MM

HH:MM:SS

HH:MM:SS.SSS

yes

int

Filter is based on value of starting time. It matches calls start time in this period, despite the time of answering or hangup.

If null, there is no limitation of minimum and maximum start time.

If date is null, the default date is 2000-01-01;

If time is null, the default time is 0:00 UTC.

String including time could also specify a time zone, use ‘%2B’ to replace the ‘+’ in timezone. (See detail in http://www.w3.org/TR/NOTE-datetime)

endTime

minDur

Number(in seconds)

no

int

Filter is based on call duration.

maxDur

answeredby

no

string

callee

timeFilterType

Start, End

no

string

callerName

no

string

delete

no

string

Delete CDR records

Successful response

Consistent with former cdrapi interface. Return corresponding content based on format.

Failed response

status

yes

int

Please see the error code list for more details.

Table 84: cdrapi

For more details regarding parameters to use in the request please refer to:

https://documentation.grandstream.com/knowledge-base/cdr-rec-api/

Recapi

Local Files

The “recapi” action allows users to download the wanted audio file.

  • Request
{
    "request":{
        "action":"recapi",
        "cookie":"sid1381890074-1574854661",
        "filedir":"monitor",
        "filename":"auto-1574857256-1003-1004.wav"
    }
}
  • Response

Once successful, it will prompt you to choose a location to save the downloaded file.

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.

filedir

monitor, emergencymeetme, queue, sca

no

string

Which type of record file to obtain. Multiple can be separated commas.

If filename and filedir are null at the same time, the supported filedir list will be returned.

If only filename is set, filedir is set to monitor as default.

filename

no

string

If only filedir is set, all csv files of the corresponding type will be returned. When multiple files are downloaded, they are separated bt commas.

Successful response

Consistent with former cdrapi interface. Return corresponding content based on format.

Failed response

Consistent with original recapi interface. Error description.

Table 85: Recapi

GDMS and NAS Files

To retrieve recording files which are store on GDMS and NAS files user the following parameters and values:

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.

Filedir

monitor, emergencymeetme, queue, sca

no

string

Which type of record file to obtain. Multiple can be separated commas.

If filename and filedir are null at the same time, the supported filedir list will be returned.

If only filename is set, filedir is set to monitor as default.

gdms_date

no

string

Enter the recording date. If the parameter is not included in the request, the value "thismonth" will be used.

gdms_item_number

no

integer

Enter the max number of recordings to view/retrieve. If the parameter is not included in the request, the value 20 will be used.

gdms_page

no

Integer

Enter the number of pages of recordings you want to view/retrieve. If the parameter is not included in the request, the value requested will be 1.

path_type

gdms, netdisk

yes

string

Enter the location of the recordings to view/retrieve information from.

"gdms" indcates gdms cloud platform.
"netdisk" indicates NAS.

  • Get Request
{
    "request":{
        "action":"recapi",
        "cookie":"sid173710538-1681394925",
        "filedir":"monitor",
        "gdms_date":"2023-04", 
        "gdms_item_number":"20", 
        "gdms_page":"1",                 
        "path_type":"gdms"
    }
}
  • Get Response
--------------------------------------------------------
Directory,Filename,uniqueCode
monitor,auto-1680780504-2015-2002.venc,18831795fad74300a949bc353fa91f65
monitor,auto-1680780501-2015-2002.venc,9c2d11eadb6c41089b16647c721ce50e
monitor,auto-1680779629-2015-2002.venc,0b38ccfcad934ae6b11503c33915d5b1
monitor,auto-1680779623-2015-2002.venc,d0dbc060a4f84c81a976c5c90fb0e778
  • Download Request
{
    "request":{
        "action":"recapi",
        "cookie":"sid2044000962-1681399117",
        "filedir":"monitor",
        "filename":"auto-1680779623-2015-2002.venc",
        "path_type":"gdms",
        "uniquecode":"d0dbc060a4f84c81a976c5c90fb0e778"
    }
}

Downloading from NAS is similar and would only require changing the path_type to “netdisk”.

  • Get Request
{
    "request":{
        "action":"recapi",
        "cookie":"sid173710538-1681394925",
        "filedir":"monitor",
        "path_type":"netdisk"
    }
}

For more details regarding parameters to use in the request please refer to:

https://documentation.grandstream.com/knowledge-base/cdr-rec-api/

Pmsapi

The “pmsapi” action allows users to configure PMS actions such us Checkin, checkout, etc.

  • Request
{
    "request":{
        "action":"pmsapi",
        "cookie":"sid992645785-1575025577",               
        "data":"<pms_data_request>
               <checkin>
               <address>1001</address>
               <room>1001</room>
         <account>1001</account>
               <firstname>John</firstname>
               <lastname>Doe</lastname>
               <language>EN</language>
               <vipcode>2</vipcode>
               <datein>2021/01/01 10:00</datein> 
               <dateout>2021/01/07 11:00</dateout>
               <credit>9999900</credit> 
               <cos>3</cos>
               </checkin>
               </pms_data_request>",
        "format":"xml",
        "token":"16c4a7b1fe890f89c8908f3f522fc18f"
    }
}
  • Response
{
    "response":{},
    "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.

token

no

string

String consists of PMS username and password after md5 encryption.

data

xml, json

yes

string

Type of data string
String in xml or json format:

---------- xml ----------

<pms_data_request>

<checkin>

<address>1000</address>

<room>100</room>

<account>123456</account>

<firstname>John</firstname>

<lastname>Doe</lastname>

<language>EN</language>

<vipcode>2</vipcode>

<datein>2010/01/01 10:00</datein>

<dateout>2010/01/07 11:00</dateout>

<credit>9999900</credit>

<cos>3</cos>

</checkin>

</pms_data_request>

---------- json ----------

{"checkin": {"address": "2345", "room": "2345", "account":"2345", "datein":"20180909","dateout":"20180910","language":"en", "firstname": "grand", "lastname":"stream", "vipcode":"1234", "cos":"1", "credit":"100"}}

address

identifier recognized by destination

room

room number, source room

account

account number

firstname

firstname of guest

lastname

lastname of guest

language

language for account

vipcode

vipcode

datein

datein format YYYY/MM/DD hh:mm

dateout

dateout format YYYY/MM/DD hh:mm

credit

credit

cos

call permission 1 < 2 < 3 < 4

d_address

Mov :destination address

r_room

Move :destination room

w_action

0,1

1 = set. 0 = cancel

w_mode

1,2

1 = single (default). 2 = daily.

w_date

YYYYMMDD

wakeup date format YYYYMMDD

w_time

HHMM

wakeup time format HHMM

Successful response

status

0

yes

int

Successful response,status is 0

Failed response

status

0

yes

int

Status is -1

error

yes

string

Error description

Table 86: Pmsapi

The following actions can also be done using pmsapi action :

  • Update
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data":"<pms_data_request>
              <update>
              <address>1000</address>
              <room>100</room>
              <account>123456</account> 
              <firstname>John</firstname> 
              <lastname>Doe</lastname> 
              <language>EN</language> 
              <vipcode>2</vipcode> 
              <datein>2010/01/01 10:00</datein> 
              <dateout>2010/01/07 11:00</dateout> 
              <credit>9999900</credit>
              <cos>3</cos> 
              </update> 
              </pms_data_request>"
	}
}
  • Mov
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request> 
               <mov> 
                     <address>1000</address> 
                     <room>100</room> 
                     <d_address>1002</d_address> 
                     <d_room>1002</d_room> 
                     </mov> 
                     </pms_data_request>"
	}
}
  • Wakeup
{
	"request": {
		"action": "pmsapi",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request>
               <wakeup> 
               <address>1000</address> 
               <room>1000</room> 
               <w_action>1</w_action> 
               <w_mode>1</w_mode> 
               <w_date>20140101</w_date> 
               <w_time>0900</w_time> 
               </wakeup> 
               </pms_data_request>",
		"cookie": "sid612583207-1551962142"
	}
}
  • Checkout
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request>
                     <checkout> 
               <address>1000</address> 
               <room>100</room> 
               </checkout> 
               </pms_data_request>"
	}
}
  • Add minibar
{
	"request": {
"action": "pmsapi",
"cookie": "sid612583207-1551962142"
"token": "63E780C3F321D13109C71BF81805476E",
"format": "xml",
"data": "<pms_data_request>
         <addminibar>
         <barcode>12450</barcode>
         <barname>winebar</barname>
         <prompt>record/sukima</prompt>
         <verifyskip></verifyskip>
 		   <listgoods></listgoods>
         </addminibar>
         </pms_data_request>"		
	}
}
  • Delete Minibar
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request>
 			   <delminibar>
  			   <barcode>1324</barcode>
 			   </delminibar>
               </pms_data_request>"
	}
}
  • Add minibar goods
{
	"request": {
		"action": "pmsapi",
		"token": "63E780C3F321D13109C71BF81805476E",
      "cookie": "sid612583207-1551962142",
		"format": "xml",
		"data": "<pms_data_request><addminibargoods>
  			   <goodscode>900</goodscode>
 		 	   <goodsname>beverage</goodsname>
 			   </addminibargoods>
               </pms_data_request>",
	}
}
  • Delete minibar goods
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request><delminibargoods>
  			   <goodscode>900</goodscode>
 			   </delminibargoods>
               </pms_data_request>"
	}
}
  • Add waiter
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request><addminibarwaiter>
  			   <maidcode>9898</maidcode>
  			   <password>1324</password>
 			   </addminibarwaiter>
               </pms_data_request>"
	}
}
  • Delete waiter
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request><delminibarwaiter>
  			   <maidcode>9898</maidcode>
 			   </delminibarwaiter>
               </pms_data_request>"
	}
}
  • Callforward unconditional
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request><cfu>
  			   <address>4000</address>
  			   <room>400</room>
  			   <cfwt>4002</cfwt>
 			   </cfu>
               </pms_data_request>"
	}
}
  • DND
{
	"request": {
		"action": "pmsapi",
		"cookie": "sid612583207-1551962142",
		"token": "63E780C3F321D13109C71BF81805476E",
		"format": "xml",
		"data": "<pms_data_request><address>4000</address>
  			   <room>400</room>
  			   <status>0</status>
 			   </dnd>
               </pms_data_request>"
	}
}

Queueapi

The “Queueapi” action allows users to get the Queue Statistics.

  • Request
{
    "request":{
        "action":"queueapi",
        "cookie":"sid1682729010-1574760528",
        "endTime":"2019-11-28",
        "startTime":"2019-11-27",
        "queue":"6500"              #If this line is not specified, results return all available queues
    }
}
  • Response
<?xml version="1.0"?>
<root_statistics>
  <total>
    <queuechairman>admin</queuechairman>
    <total_calls>2</total_calls>
    <abandoned_rate>50.0</abandoned_rate>
    <avg_wait>2</avg_wait>
    <avg_talk>7</avg_talk>
    <vq_total_calls>0</vq_total_calls>
  </total>
  <queue>
    <queuechairman>admin</queuechairman>
    <queue>6500</queue>
    <total_calls>2</total_calls>
    <answered_calls>1</answered_calls>
    <answered_rate>50.0</answered_rate>
    <avg_wait>2</avg_wait>
    <avg_talk>7</avg_talk>
    <vq_total_calls>0</vq_total_calls>
  </queue>
  <agent>
    <queuechairman>admin</queuechairman>
    <agent>1004</agent>
    <total_calls>2</total_calls>
    <answered_calls>1</answered_calls>
    <answered_rate>50.0</answered_rate>
    <avg_talk>7</avg_talk>
  </agent>
</root_statistics>  

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.

format

csv, xml, json

no

string

Define output format of matching call queue statistics. Default is xml.

queuechairman

Admin, number

no

string

Queue chairman

Default is admin

queue

Number,*

no

string

Queue number

if queue number is *(default), all call queue information will be listed.

agent

Number,*

no

string

Agent number

If agent number is *(default), all agent information will be listed.

statisticsType

overview,

calldetail,

loginhistory,

pausedhistory,

no

string

overview:overview(default)

calldetail:agent detail

loginhistory:login record

pausedhistory :pause log

numRecords

[0,1000]

no

int

Number of returned records

Default is 1000, which is also the maximum allowed.

offset

number

no

int

The number of records that need to be skipped, use together with numRecords.

Accept all records when multiple responses show up. Default is 0.

startTime

Date and/or time, format is YYYY-MM-DD

yes

int

Time range of call queue statistics, format is YYYY-MM-DD

Successful response

Consistent with former cdrapi interface. Return corresponding content based on format.

Failed response

status

yes

int

Please see the error code list for more details.

Table 87: Queueapi

applyChanges

The “applyChanges” action allows users to apply the changes made.

  • Request
{
    "request":{
        "action":"applyChanges",
        "cookie":"sid1965594381-1575027385"
    }
}
  • Response
{
    "response":{
        "settings":"0"
    },
    "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

Failed response

status

yes

int

Please see the error code list for more details.

Table 88: applyChanges

Error Return Codes

Code

Description

-0

Success

-1

Invalid parameters

-5

Need authentication

-6

Cookie error

-7

Connection closed

-8

System timeout

-9

Abnormal system error!

-15

Invalid value

-16

No such item. Please refresh the page and try again

-19

Unsupported

-24

Failed to operate data

-25

Failed to update data

-26

Failed to get data

-37

Wrong account or password!

-43

Some data in this page has been modified or deleted. Please refresh the page and try again

-44

This item has been added

-45

Operating too frequently or other users are doing the same operation. Please retry after 15 seconds.

-46

Operating too frequently or other users are doing the same operation. Please retry after 15 seconds.

-47

No permission

-50

Command contains sensitive characters

-51

Another task is running now

-57

Operating too frequently, or other users are doing the same operation. Please retry after 60 seconds

-68

Login Restriction

-69

There is currently a conference going on. Changes cannot be applied at this time

-70

Login Forbidden

-71

The username doesn't exist

-90

The conference is busy, cannot be edited or deleted

-98

There are currently digital calls. Failed to apply configuration

Table 89: Error Return Codes

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment