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.
|
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. |
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.
|
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
|
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.
|
ntransferto
|
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.
|
btransferto
|
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. |
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.
|
callrestriction |
String | Enable or disable outbound dialing restriction.
|
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 ExampleQuery extension 1000.
POST /api/v1.1.0/extension/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: api.yeastarcloud.com { "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: api.yeastarcloud.com
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": "" } ] }