Query Extension Settings

Query detailed settings of an extension, multiple extensions, or all extensions.

Request URL

{base_url}/{api_path}/extension/query?token={token}

Request parameters

Parameter Required Type Description
number Yes String Extension number.

Valid values:

  • An extension number: Query the specified extension.

    Example: "number":"1000"

  • Multiple extension numbers: Query multiple extensions. Separate multiple extension numbers with ,.

    Example: "number":"1000,1001"

  • all: Query all extensions.

    Example: "number": "all"

Response parameters

Parameter Type Description
status String Request result.
  • Success.
  • Failed.
extinfos Array <ExtensionInfo> Extension information.
ExtensionInfo
Parameter Type Description
number String Extension number.
username String Caller ID name.
status String Current status of the extension.
  • Unavailable
  • Registered
  • Ringing
  • Busy
  • Hold
  • Malfunction
  • Idle
  • Fxsnoport
type String Extension type.
port String Port of FXS extension.
callerid String Caller ID.
registername String Registration name.
registerpassword String Registration password.
maxregistrations Integer Maximum concurrent registrations allowed.
loginpassword String Login password.
email String Email address.
mobile Integer Mobile number.
language String The language of the system prompt.
hasvoicemail String Whether to enable Enable Voicemail feature or not.
  • on: enable
  • off: disable
enablevmtoemail String Whether to enable Send Voicemail to Email feature or not.
  • off: disable
  • on: enable. Send voicemail to extension user's email.
  • custom: Send voicemail to custom email.
vmsecret Integer Voicemail password.
alwaysforward String Whether to enable Always Call Forwarding feature or not.
  • on: enable
  • off: disable
atransferto String The destination of alwaysforward .
  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number
atransferext Integer When atransferto is Extension, the extension number should be configured.
atransferprefix String When atransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
atransfernum Integer When atransferto is Custom Number, phone number must be configured.
noanswerforward String Whether to enable No Answer Call Forwarding feature or not.
  • on: enable
  • off: disable
ntransferto String The destination of noanswerforward.
  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number
ntransferext Integer When ntransferto is Extension, the extension number should be configured.
ntransferprefix String When ntransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
ntransfernum Integer When ntransferto is Custom Number, phone number must be configured.
busyforward String Whether to enable When Busy Call Forwarding feature or not.
  • on: enable
  • off: disable
btransferto String The destination of busyforward .
  • Voicemail
  • Extension
  • Mobile Number
  • Custom Number
btransferext Integer When btransferto is Extension, the extension number should be configured.
btransferprefix String When btransferto is Mobile Number or Custom Number, prefix may need to be configured according to outbound routes.
btransfernum Integer When btransferto is Custom Number, phone number must be configured.
ringsimultaneous String Whether to enable Ring Simultaneous feature or not.
  • on: enable
  • off: disable
enablemobile String Whether to enable Enable Mobility Extension feature or not.
  • on: enable
  • off: disable
mobileprefix String When Enable Mobility Extension feature is enabled, prefix may need to be configured according to outbound routes.
allowbeingmonitored String Whether to enable Allow Being Monitored feature or not.
  • on: enable
  • off: disable
monitormode String Monitor mode.
  • Disabled
  • Extensive
  • Listen
  • Whisper
  • Barge-in
ringtimeout String Ring timeout in seconds.
maxduration String The maximum call duration allowed in seconds.
dnd String Whether to enable DND feature or not.
  • on: enable
  • off: disable
callrestriction String Whether to enable Outbound Restriction feature or not.
  • on: enable
  • off: disable
agentid String The agent ID to be announced in the greeting prompt when users call to a queue. By default, the parameter is null, which means that the extension number will be announced.
Tip: Call extension/update to edit the extension agentid.
unselectoutroute String The outbound routes that are unavailable to the extension.
selectoutroute String The outbound routes that are available to the extension.

Examples

Request example

Query detailed settings of extension 1001.

POST /api/v2.0.0/extension/query?token=309bcf2d729fc93e20eafc803a23b76d
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
    "number": "1001" 
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
	"status": "Success",
	"extinfos": [
		{
			"number": "1001",
			"username": "1001",
			"status": "Registered",
			"type": "SIP",
			"callerid": "1001",
			"registername": "1001",
			"registerpassword": "f2844e41123368345574515f8eaf6595a0a05e50c9d7d16690622ed2ea6965f0",
			"maxregistrations": "1",
			"loginpassword": "81d3f187d07d54e2e48b217b62e8436a36d1eb75c5845d4509ac2d14bdeebd97107ab5bbd60c3d8cbfbd0f205b4b655a",
			"email": "ann@yeastar.com",
			"moblie": "18508937881",
			"language": "System Default",
			"hasvoicemail": "on",
			"enablevmtoemail": "off",
			"vmsecret": "1001",
			"alwaysforward": "off",
			"noanswerforward": "on",
			"ntransferto": "Voicemail",
			"ntransferprefix": "9",
			"busyforward": "on",
			"btransferto": "Voicemail",
			"btransferprefix": "9",
			"ringsimultaneous": "off",
			"mobileprefix": "9",
			"enablemobile": "off",
			"allowbeingmonitored": "off",
			"monitormode": "Disabled",
			"ringtimeout": "30",
			"maxduration": "Follow System",
			"dnd": "off",
			"callrestriction": "off",
			"agentid": "none",
			"unselectoutroute": "local_calls",
			"selectoutroute": "routeout"
		}
	]
}