Query Extension Settings

Get detailed information about an individual extension or multiple extensions. For example, developers could query the advanced settings of an extension. When there are multiple requests, separate them with commas.

Endpoint

POST /api/v1.1.0/extension/query?token={token}

Request Parameters

Name Importance Type Description
extid Optional Int The extension number of the extension to be queried.
  • Query an extension: Set extid to the extension number.

    Example: "extid":"1000"

  • Query multiple extensions: Set extid to the extension number. Separate multiple extensions with ,.

    Example: "extid": "1000,1001"

  • Query all extensions: Do not send extid parameter.

Response Parameters

Name Type Description
extinfos Object Object.
extnumber Int The extension number.
username String The user name.
status String Current status of the extension.
  • Unavailable
  • Registered
  • Ringing
  • Busy
  • Hold
  • Malfunction
  • Idle
  • Fxsnoport
type String The extension type.
port String The extension port.
callerid String Caller ID.
registername String The registration name.
registerpassword String The registration password.
maxregistrations Int Allowed maximum concurrent registrations.
loginpassword String The login password.
email String The email address.
moblie String The mobile number.
language String The language of the system prompt.
hasvoicemail String Enable or disable Voicemail feature.
  • on: enable
  • off: disable
vmsecret Int The voicemail password.
enablevmtoemail String Whether to enable Send Voicemail to Email feature or not.
  • on: enable
  • off: disable
alwaysforward String Enable or disable Always Call Forwarding feature.
  • on: enable
  • off: disable
atransferto

atransferext

atransferprefix

atransfernum

String Alway Call Forwarding destination. When forwarding destination is an extension number, the designated extension number should be configured; When forwarding destination is a custom number, the custom number and the corresponding call rule should be configured.
noanswerforward String Enable or disable No Answer Call Forwarding feature.
  • on: enable
  • off: disable
ntransferto

ntransferext

ntransferprefix

ntransfernum

String No answer call forwarding destination. When forwarding destination is an extension number, the designated extension number should be configured; when the forwarding destion is a custom number, the custom number and the corresponding call rule should be configured.
busyforward String Enable or disable When Busy Call Forwarding feature.
  • on: enable
  • off: disable
btransferto

btransferext

btransferprefix

btransfernum

String When busy call forwarding destination. When the forwarding destination is an extension, the designated extension number should be configured; when the forwarding destination is a custom number, the custom number and the corresponding call rule should be configured.
enablemobile String Enable or disable Mobility Extension feature.
  • on: enable
  • off: disable
ringsimultaneous String Enable or disable Simultaneous Ringing of Mobility Extension.
  • on: enable
  • off: disable
mobileprefix String A prefix match ing the outbound route.
allowbeingmonitored String Allow being monitored.
  • on: enable
  • off: disable
monitormode String The monitor mode.
ringtimeout String The ring timeout in seconds.
maxduration String The maximum call duration allowed in seconds.
dnd String Enable or disable DND feature.
  • on: enable
  • off: disable
callrestriction String Enable or disable outbound dialing restriction.
  • on: enable
  • off: disable
agentid String The agent ID to be announced in the greeting prompt. If left null, the extension number will be announced instead. It is null by default.
inbound Object Inbound calls, external numbers dial-in.
inboundid String The inbound ID. With this parameter, operations like forwarding, query, and hangup can be performed.
from String The caller's number.
to String The callee's number.
trunk String The name of the trunk that passes the inbound call
outbound String Outbound calls: calls to external numbers..
outboundid Object The outbound ID. With this parameter, operations like forwarding, query,andhangup can be performed.
from String The caller's number.
to String The callee's number.
trunk String The name of the trunk that passes the outbound call.
ext Object The call party of an inbound call.
extid Int The extension number of the extension that is on the line with the queried extension.
unselectoutroute String The outbound routes that are not selected for the extension.
selectoutroute String The outbound routes that are available for the extension.

Examples

Request Example

Query extension 1000.

POST /api/v1.1.0/extension/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
    "extid": "1000"
}

Query all extensions.

POST /api/v1.1.0/extension/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success",
    "extinfos": [
        {
            "extnumber": "1000",
            "username": "Jayson",
            "status": "Registered",
            "type": "SIP",
            "callerid": "1000",
            "registername": "1000",
            "registerpassword": "xMn5W4Gs",
            "maxregistrations": "1",
            "loginpassword": "5e12ba8dd1083a7f946e457cf3c18779",
            "email": "",
            "moblie": "",
            "language": "System Default",
            "hasvoicemail": "on",
            "enablevmtoemail": "off",
            "vmsecret": "1000",
            "alwaysforward": "off",
            "noanswerforward": "on",
            "ntransferto": "Voicemail",
            "ntransferprefix": "",
            "busyforward": "on",
            "btransferto": "Voicemail",
            "btransferprefix": "",
            "ringsimultaneous": "off",
            "mobileprefix": "",
            "enablemobile": "off",
            "allowbeingmonitored": "off",
            "monitormode": "Disabled",
            "ringtimeout": "30",
            "maxduration": "Follow System",
            "dnd": "off",
            "callrestriction": "off",
            "agentid": ""
        }
    ]
}