Add an Extension
Endpoint
POST /api/v0.0.1/extension/add?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
number | Optional | Int | The extension number. |
username | Optional | String | The user’s name. |
callerid | Optional | String | Caller ID. |
registerpassword | Optional | String | The registration password.
;&”‘\<>` | are invalid for password. Neither is space valid. Maximum length is 31. Cannot be blank. |
maxregistrations | Optional | Int | Allowed maximum concurrent registrations. |
loginpassword | Optional | String | The login password. |
Optional | String | The email address. | |
mobile | Optional | String | The mobile number. |
hasvoicemail | Optional | String | Enable or disable Voicemail feature.
|
vmsecret | Optional | Int | The voicemail password. |
enablevmtoemail | Optional | String | Whether to enable Send Voicemail to Email feature or not.
|
noanswerforward | Optional | String | Enable or disable No Answer Call Forwarding feature.
|
ntransferto | Optional | String | No answer call forwarding destination.
|
ntransferext | Optional | String | The extension ID, when the forward destination is extension. |
ntransferprefix | Optional | String | The outbound calls prefix, when the forward destination is a custom number or the extension’s associated mobile number. |
ntransfernum | Optional | String | The number of the outbound call, when the forward destination is a custom number or the extension’s associated mobile number. |
busyforward | Optional | String | Enable or disable When Busy Call Forwarding feature.
|
btransferto | Optional | String | When Busy call forwarding destination.
|
btransferext | Optional | String | The extension ID, when the forward destination is extension. |
btransferprefix | Optional | String | The outbound calls prefix, when the forward destination is a custom number or the extension’s associated mobile number.
Restrictions: Numbers, up to 7 digits. |
btransfernum | Optional | String | The number of the outbound call, when the forward destination is a custom number or the extension’s associated mobile number.
Restrictions: Numbers, up to 15 digits. The forward destination Custom Number can’t be blank. |
enablemobile | Optional | String | Enable or disable Mobility Extension feature.
|
ringsimultaneous | Optional | String | Enable or disable Simultaneous Ringing of Mobility Extension.
|
mobileprefix | Optional | String | The prefix for outgoing calls from a Mobility Extension. |
allowbeingmonitored | Optional | String | Allow being monitored.
|
monitormode | Optional | String | The monitor mode.
|
ringtimeout | Optional | String | The ring timeout in seconds.
|
maxduration | Optional | String | The maximum call duration allowed in seconds.
|
dnd | Optional | String | Enable or disable DND feature.
|
Response Parameters
Name | Type | Description |
status | String | Current status of the extension.
|
Examples
Request Example
Add extension 2002.
POST /api/v0.0.1/extension/add?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“number”:”2002″,
“username”:”xiaoshao_api2″,
“callerid”:””,
“registerpassword”:”12345133333323123qW@”,
“maxregistrations”:”3″,
“loginpassword”:”12345678qW@”,
“email”:”[email protected]”,
“mobile”:”18088861612″,
“hasvoicemail”:”on”,
“vmsecret”:”888888″,
“enablevmtoemail”:”on”,
“noanswerforward”:”off”,
“ntransferto”:”Extension”,
“ntransferext”:”6000″,
“ntransferprefix”:””,
“busyforward”:”off”,
“btransferto”:”Extension”,
“btransferext”:”110″,
“btransferprefix”:””,
“btransfernum”:””,
“enablemobile”:”off”,
“ringsimultaneous”:”off”,
“mobileprefix”:””,
“allowbeingmonitored”:”off”,
“monitormode”:”Disable”,
“ringtimeout”:”15″,
“maxduration”:”Follow System”,
“dnd”:”off”
}
Response Example
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”
}
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>
</xml>