JSON API » phones » phones/update

Updates an existing telephone line.

Input parameters

Requires authentication and the administrator, residential, user, or wholesale role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameStringTelephone line to update.Yes
acrInteger1 to reject calls with unknown or withheld callerid, 0 not to.NoCurrent value.
btypeStringDestination type on busy.NoCurrent value.
bnumberStringDestination number on busy.NoCurrent value.
call_maximumDecimalMaximum spending per day. -1 for no limit.NoCurrent value.
callerid_externalStringCallerid on external calls. A number, "default", "name", "original", or "original_own_number".NoCurrent value.
callerid_internalStringCallerid on internal calls. A number, "default", "name", "original", or "original_own_number".NoCurrent value.
callerid_locationStringLocation callerid. A number or "original_own_number".NoCurrent value.
callername_externalStringCaller name on external calls.NoCurrent value.
callername_internalStringCaller name on internal calls.NoCurrent value.
codecStringPreferred codec. Empty string for any.NoCurrent value.
cosIntegerClass of service. 1 for system COS that allows all calls.NoCurrent value.
descriptionStringDescription.NoCurrent value.
deliveryString"register" to send registration as request URI, "last_number" to send last called number.NoCurrent value.
dialplanStringDial plan. Empty string for default.NoCurrent value.
directInteger1 to allow callers to enter this number in IVR menus and the auto-attendant, 0 not to.NoCurrent value.
dndInteger1 to reject all calls, 0 not to.NoCurrent value.
dtypeStringDestination type on no answer.NoCurrent value.
dnumberStringDestination number on no answer.NoCurrent value.
emergency_address1StringLine 1 of the emergency address.NoCurrent value.
emergency_address2StringLine 2 of the emergency address.NoCurrent value.
emergency_address3StringLine 3 of the emergency address.NoCurrent value.
emergency_address_cityStringCity of emergency address.NoCurrent value.
emergency_address_stateStringState of emergency address.NoCurrent value.
emergency_address_codeStringPost or zip code of emergency address.NoCurrent value.
emergency_address_otherStringOther emergency address information.NoCurrent value.
emergency_countryStringCountry of emergency address.NoCurrent value.
emergency_location_codeStringEmergency location code. Normally empty string.NoCurrent value.
expect_registeredInteger1 if this telephone line is expected to be registered, 0 if not. If not, no alerts will be sent if unregistered.NoCurrent value.
forwardingStringForward all calls to this number. Empty string for none.NoCurrent value.
hardware_addressStringHardware address, such as MAC address.NoCurrent value.
languageStringLanguage code. Empty string for default.NoCurrent value.
ltypeString"phone" if logged in as a virtual phone, empty string if not.NoCurrent value.
lnumberStringTelephone line logged in on top of as virtual phone. Empty string for none.NoCurrent value.
mailboxStringMailbox for message waiting indicator and direct mailbox access.NoCurrent value.
mediaString"voice" or "fax".NoCurrent value.
missedemailInteger1 to send owner notification of missed calls if owner set, 0 not to.NoCurrent value.
musicIntegerID of music on hold. 0 for none.NoCurrent value.
music_ringingInteger1 to play music to caller when ringing, 0 to play ringing.NoCurrent value.
ownerIntegerID of owner. 0 for none.NoCurrent value.
panelInteger1 to display in control panel, 0 not to.NoCurrent value.
passwordStringSIP password.NoCurrent value.
pinStringPIN. Empty string for none.NoCurrent value.
pingInteger1 to SIP ping handset, 0 not to.NoCurrent value.
planIntegerID of rate plan. 0 for default.NoCurrent value.
presentation_externalIntegerPresentation on external calls.NoCurrent value.
provision1StringSpecial provisioning data.NoCurrent value.
provisioningIntegerID of provisioning template. 0 for automatic or if provisioning is not enabled.NoCurrent value.
recordgroupIntegerID of record group. 0 for none.NoCurrent value.
registrarStringHostname to register to for provisioning. Empty string to use rate plan SIP domain.NoCurrent value.
ringtimeIntegerRing time in seconds.NoCurrent value.
screenInteger1 to screen calls and play callerid, 2 to ask callers to record name, 0 not to screen.NoCurrent value.
sourceStringOnly allow from this IP address. Empty string for any.NoCurrent value.
totalmaximumIntegerMaximum number of calls to allow to/from telephone. -1 for no limit.NoCurrent value.
utypeStringDestination type on unregistered.NoCurrent value.
unumberStringDestination number on unregistered.NoCurrent value.
unumber_groupInteger1 to follow the utype and unumber on group calls, 0 not to.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The telephone line does not exist, or you do not have permission to update it.

Data returned

No data is returned.

Example: Changing the description

http://enswitch.example.com/api/json/phones/update/?auth_username=user;auth_password=password;name=1234567;description=example

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.