Query Extension Settings
Endpoint
POST /api/v0.0.1/extension/query?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
extid | Optional | Int | The extension number of the extension to be queried.
Example: “extid”:”1000″
Example: “extid”: “1000,1001”
|
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.
|
type | String | The extension type. |
port | String | The extension port. |
callerid | String | Caller ID. |
registerpassword | String | The registration password. |
maxregistrations | Int | Allowed maximum concurrent registrations. |
loginpassword | String | The login password. |
String | The email address. | |
moblie | String | The mobile number. |
language | String | The language of the system prompt. |
hasvoicemail | String | Enable or disable Voicemail feature.
|
vmsecret | Int | The voicemail password. |
enablevmtoemail | String | Whether to enable Send Voicemail to Email feature or not.
|
alwaysforward | String | Enable or disable Always Call Forwarding feature.
|
atransferto
atransferext atransferprefix atransfernum |
String | Call Forwarding destination.
When forwarding destination is an extension number, 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. |
noanswerforward | String | Enable or disable No Answer Call Forwarding feature.
|
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 destination 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.
|
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.
|
ringsimultaneous | String | Enable or disable Simultaneous Ringing of Mobility Extension.
|
mobileprefix | String | The prefix for outgoing calls from a Mobility Extension. |
allowbeingmonitored | String | Allow being monitored.
|
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.
|
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 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 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. |
Examples
Request Example
Query extension 101.
POST /api/v1.1.0/extension/query?token=277ac400357b509b4a587ff2157f7ad5&type=json HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“extid”: “101”
}
POST /api/v1.1.0/extension/query?token=277ac400357b509b4a587ff2157f7ad5&type=xml HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<extid>101</extid>
</xml>
Query all extensions.
POST /api/v0.0.1/extension/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.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”: “101”,
“username”: “xiaoshaokun”,
“type”: “pjsip”,
“noanswerforward”: “off”,
“busyforward”: “off”,
“status”: “Unavailable”,
“callerid”: “858585”,
“userpassword”: “12345678qW@”,
“registerpassword”: “12345133333323123qW@”,
“email”: “[email protected]”,
“moblie”: “18088861612”,
“maxregistrations”: “3”,
“hasvoicemail”: “on”,
“vmsecret”: “666666”,
“enablevmtoemail”: “on”,
“language”: “cn”,
“allowbeingmonitored”: “off”,
“monitormode”: “disable”,
“maxduration”: “10800”,
“dnd”: “off”
}
]
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
<extinfos>
<item id=”0″>
<extnumber>101</extnumber>
<username>xiaoshaokun</username>
<type>pjsip</type>
<noanswerforward>off</noanswerforward>
<busyforward>off</busyforward>
<status>Unavailable</status>
<callerid>888888</callerid>
<registerpassword>12345133333323123qW@</registerpassword>
<email>[email protected]</email>
<moblie>18088861612</moblie>
<maxregistrations>3</maxregistrations>
<hasvoicemail>on</hasvoicemail>
<vmsecret>666666</vmsecret>
<userpassword>12345678qW@</userpassword>
<enablevmtoemail>on</enablevmtoemail>
<language>cn</language>
<allowbeingmonitored>off</allowbeingmonitored>
<monitormode>disable</monitormode>
<maxduration>10800</maxduration>
<dnd>off</dnd>
</item>
</extinfos>
</xml>