Table of Contents

API : PBX : SIP phone Update

Introduction

This request will update a SIP phone.

A SIP phone handles all aspects of connecting and configuring the phone.

When a Snom or Aastra SIP phone is connected, it will configured for MAC redirection. This means that when a phone boots for the first time or after a reset it will ask the vendor for a configuration server, which will be this system. It will then fetch the configuration and auto-configure itself.

Others supported phones such as some Linksys and Cisco models can also configure themself, but need to be pointed to the provisioning server at: https://prov.telecomx.dk, or have the DHCP server on their network use OPTION 66 to point to the provisioning server.

A configured phone is not enough to make or receive calls, for that the SIP phone need to linked to an extension.

When updating as little as a single property can be updated.

Request

URL https://api.telecomx.dk/pbx/sipphone
Method POST
Access level MANAGER, OWNER, RESELLER, ADMIN.
Body pbxCluster Number Id of the PBX cluster the phone is on
1 - Production (default)
2 - Development
sipPhoneModel Id The model of SIP phone (from SipPhoneModels).
extension Id The extension the SIP phone belongs to, null if not yet assigned.
macAddress String 12-char MAC address of the SIP phone.
serial String Serial number, required for Grandstream devices.
product ObjectId Product of the SIP phone.
handsetIndex Number If the SIP phone supports multiple handsets (like a DECT base), this is the handsets position in the list of handsets. This is auto assigned when created and cannot be changed.
handsetAddress String If the SIP phone supports multiple handsets (like a DECT base) this is the handsets individual ID, similar to a MAC address - if applicable.
callWaiting Boolean True if call waiting is enabled, null if model does not support it (not used).
sidePanel String If the phone model supports side panels, this is the model that is used. Null if no side panels are used.
sidePanelCount Number If the phone model supports side panels, this is the number of panels that are attached to the phone.
softkeyConfigurationOnDevice Boolean True if soft keys are configured individual on the device, false if soft keys are configured on the user.
softkeyBlfBlindTransfer Boolean True if BLF type soft keys performs blind transfer instead of attended transfer (default).
headsetButton String If headset button is supported, this configures it:
speaker - activates the handsfree speaker
headset - activates the headset
speaker-headset - activates speaker and toggles between speaker and headset
headset-speaker - activates headset and toggles between headset and speaker.
dhsg Boolean True if the phone uses a DHSG headset.
displayBrightness Number Display brightness 0-15.
displayBrightnessIdle Number Display brightness when idle 0-15.
displayBackground String URL to fetch a picture to display in the background on supported phones.
displayFontColor String Font color on Mitel phones: LIGHT or DARK.
instanceId String Optional ID of WebRTC instance (e.g. Communicator Desktop) that this phone belongs to.
customConfig String Custom configuration data. For insertion into the generated configuration file for the phone. Do not use unless absolutely needed.
notes String Notes about the SIP phone.
Security settings
ip.mode String IP restriction mode:
OPEN - Phone can connect from any IP address. After initial connection (get config, registration or call) mode is changed to LOCKED and IP address is set.
LOCKED - Phone can only connect from the IP address in ip.address.
ROAMING - Phone can only connect from IP addresses in the countries listed in ip.countries.
ip.countries String If ip.mode is ROAMING, this is a comma list of ISO3166-2 country codes of countries where the SIP phone may connect from.
ip.address String The IP address the SIP phone may register/make calls/fetch config from, if mode is LOCKED.
Volume settings
ringer.volume Number Ringtone volume (if supported by model).
ringer.tone String Id of ringtone. If a built-in ringtone is used this is the index number of the tone. If a custom ringtone is used, this is the ID of the ringtone.
volume.handset.mic Number Handset microphone level (if supported by model).
volume.handset.speaker Number Handset speaker level (if supported by model).
volume.headset.mic Number Headset microphone level (if supported by model).
volume.headset.speaker Number Headset speaker level (if supported by model).
volume.handsfree.mic Number Handsfree microphone level (if supported by model).
volume.handsfree.speaker Number Handsfree speaker level (if supported by model).
Softkey settings
softkeys Array List of configured softkeys (if supported by model).
softkeys[].index Number Position of the softkey, 0-based.
softkeys[].function String Type of function the softkey performs:
SPEEDDIAL - Dial a number
BLF - Dial a co-worker and show busy status
LINE - Line key
DND - Enable/disable do-not-disturb
DNDOTHER - Enable/disable do-not-disturb on specific device
ADDRESSBOOK - Access the phones address book
REDIAL - Re-dials the last called number
VOICEMAIL - Calls voicemail
TRANSFER - Tranfer call
URL - Invokes a URL, possible returning an XML menu
HOLD - Puts the current call on hold
RECORD - Starts recording the call
MENU - Shows the phones menu
PICKUP - Pickup a ringing phone the group the phone belongs to
PICKUPGROUP - Pickup a ringing phone from a specific group
QUEUE - Join/leave a specific queue
SWITCH - a named on/off switch
PRESENCE - set presence state
softkeys[].value String Settings for the selected function:
SPEEDDIAL - phone number to call
BLF - id of extension to monitor/call
URL - URL to invoke (http://.…)
PICKUPGROUP - id of group to pickup call from
QUEUE - id of queue
SWITCH - name of the switch
DNDOTHER - id of device to toggle DND for
softkeys[].label String Text label to display next to the softkey (if supported by model).
Codec settings
codec.hdAudio Boolean True to allow HD audio codecs.
codec.video Boolean True to allow video codecs.
Network settings
network.dhcp Boolean True to assign IP address using DHCP (if supported by model).
network.ipAddress String IP address of SIP phone (if not using DHCP, and supported by model).
network.subnet String IP subnet mask (if not using DHCP, and supported by model).
network.gateway String IP address of default gateway (if not using DHCP, and supported by model).
network.dns1 String Primary DNS server (if not using DHCP, and supported by model).
network.dns2 String Secondary DNS server (if not using DHCP, and supported by model).
network.vlanId String Vlan ID 0-4094, default 0 (not used).
network.vlanPriority Number Vlan priority 0-7, default 0 (not used).
Purchase Info (OWNER only)
orderId String Order ID of the SIP Phone, references to external economic system
date Date Date the phone was purchased
paymentOption String How the phone is purchased or financed: NONE, BOUGHT, RENTED OR SELF_OWNED
purchaseInfo.sidePanels Array List of sidepanels, and their financial information.
purchaseInfo.sidePanels[].serial String Serial number of side panel, must be unique across all SIP phones
purchaseInfo.sidePanels[].paymentOption String How the sidepanel is purchased or financed: NONE, BOUGHT, RENTED or SELF_OWNED
purchaseInfo.sidePanels[].orderId String Date the sidepanel was bought
purchaseInfo.sidePanels[].date Date When the sidepanel was bought/rented, etc.
purchaseInfo.sidePanels[].product ObjectId Product of the side panel.

Properties that are not supported by the phone model or not needed, does not need to be specified. If network.dhcp is true, then ipAdress, subnet, gateway, dns1 and dns2 can be omitted. Likewise if default vlan settings should be used, they can be omitted as well.

Request body example

{
  macAddress: '4EE8A34B56F3',
  callWaiting: false,
  ip: {
    mode: 'OPEN'
  }
}

Response

The response will be the updated SIP phone, if no errors occurred.

Json object
_id Id Unique id of the SIP phone.
pbxCluster Number Id of the PBX cluster the phone is on
1 - Production (default)
2 - Development
sipPhoneModel Id The model of SIP phone (from SipPhoneModels).
extension Id The extension the SIP phone belongs to, null if not yet assigned.
customer Id Id of customer the phone belongs to.
macAddress String 12-char MAC address of the SIP phone (required by auto-provisioning).
handsetIndex Number If the SIP phone supports multiple handsets (like a DECT base), this is the handsets position in the list of handsets. This is auto assigned when created and cannot be changed.
handsetAddress String If the SIP phone supports multiple handsets (like a DECT base) this is the handsets individual ID, similar to a MAC address - if applicable.
callWaiting Boolean True if call waiting is enabled, null if model does not support it (not used).
sidePanel String If the phone model supports side panels, this is the model that is used. Null if no side panels are used.
sidePanelCount Number If the phone model supports side panels, this is the number of panels that are attached to the phone.
softkeyConfigurationOnDevice Boolean True if soft keys are configured individual on the device, false if soft keys are configured on the user.
softkeyBlfBlindTransfer Boolean True if BLF type soft keys performs blind transfer instead of attended transfer (default).
headsetButton String If headset button is supported, this configures it:
speaker - activates the handsfree speaker
headset - activates the headset
speaker-headset - activates speaker and toggles between speaker and headset
headset-speaker - activates headset and toggles between headset and speaker.
dhsg Boolean True if the phone uses a DHSG headset.
displayBrightness Number Display brightness 0-15.
displayBrightnessIdle Number Display brightness when idle 0-15.
displayBackground String URL to fetch a picture to display in the background on supported phones.
displayFontColor String Font color on Mitel phones: LIGHT or DARK.
customConfig String Custom configuration data. For insertion into the generated configuration file for the phone. Do not use unless absolutely needed.
notes String Notes about the SIP phone.
Security settings
ip.mode String IP restriction mode:
OPEN - Phone can connect from any IP address. After initial connection (get config, registration or call) mode is changed to LOCKED and IP address is set.
LOCKED - Phone can only connect from the IP address in ip.address.
ROAMING - Phone can only connect from IP addresses in the countries listed in ip.countries.
ip.countries String If ip.mode is ROAMING, this is a comma list of ISO3166-2 country codes of countries where the SIP phone may connect from.
ip.address String The IP address the SIP phone may register/make calls/fetch config from, if mode is LOCKED.
username String Username for SIP authentication, auto-generated 32-char string.
password String Password for SIP authentication, auto-generated 32-char string.
instanceId String Optional ID of WebRTC instance (e.g. Communicator Desktop) that this phone belongs to.
Volume settings
ringer.volume Number Ringtone volume (if supported by model).
ringer.tone String Id of ringtone. If a built-in ringtone is used this is the index number of the tone. If a custom ringtone is used, this is the ID of the ringtone.
volume.handset.mic Number Handset microphone level (if supported by model).
volume.handset.speaker Number Handset speaker level (if supported by model).
volume.headset.mic Number Headset microphone level (if supported by model).
volume.headset.speaker Number Headset speaker level (if supported by model).
volume.handsfree.mic Number Handsfree microphone level (if supported by model).
volume.handsfree.speaker Number Handsfree speaker level (if supported by model).
Softkey settings
softkeys Array List of configured softkeys (if supported by model).
softkeys[].index Number Position of the softkey, 0-based.
softkeys[].function String Type of function the softkey performs:
SPEEDDIAL - Dial a number
BLF - Dial a co-worker and show busy status
LINE - Line key
DND - Enable/disable do-not-disturb
DNDOTHER - Enable/disable do-not-disturb on specific device
ADDRESSBOOK - Access the phones address book
REDIAL - Re-dials the last called number
VOICEMAIL - Calls voicemail
TRANSFER - Tranfer call
URL - Invokes a URL, possible returning an XML menu
HOLD - Puts the current call on hold
RECORD - Starts recording the call
MENU - Shows the phones menu
PICKUP - Pickup a ringing phone the group the phone belongs to
PICKUPGROUP - Pickup a ringing phone from a specific group
QUEUE - Join/leave a specific queue
SWITCH - a named on/off switch
PRESENCE - set presence state
softkeys[].value String Settings for the selected function:
SPEEDDIAL - phone number to call
BLF - id of extension to monitor/call
URL - URL to invoke (http://.…)
PICKUPGROUP - id of group to pickup call from
QUEUE - id of queue
SWITCH - name of the switch
DNDOTHER - id of device to toggle DND for
softkeys[].label String Text label to display next to the softkey (if supported by model).
Codec settings
codec.hdAudio Boolean True to allow HD audio codecs.
codec.video Boolean True to allow video codecs.
Network settings
network.dhcp Boolean True to assign IP address using DHCP (if supported by model).
network.ipAddress String IP address of SIP phone (if not using DHCP, and supported by model).
network.subnet String IP subnet mask (if not using DHCP, and supported by model).
network.gateway String IP address of default gateway (if not using DHCP, and supported by model).
network.dns1 String Primary DNS server (if not using DHCP, and supported by model).
network.dns2 String Secondary DNS server (if not using DHCP, and supported by model).
network.vlanId String Vlan ID 0-4094, default 0 (not used).
network.vlanPriority Number Vlan priority 0-7, default 0 (not used).
Purchase Info (Min RESELLER only)
orderId String Order ID of the SIP Phone, references to external economic system
date Date Date the phone was purchased
paymentOption String How the phone is purchased or financed: NONE, BOUGHT, RENTED OR SELF_OWNED
purchaseInfo.sidePanels Array List of sidepanels, and their financial information.
purchaseInfo.sidePanels[].serial String Serial number of side panel, must be unique across all SIP phones
purchaseInfo.sidePanels[].paymentOption String How the sidepanel is purchased or financed: NONE, BOUGHT, RENTED or SELF_OWNED
purchaseInfo.sidePanels[].orderId String Date the sidepanel was bought
purchaseInfo.sidePanels[].date Date When the sidepanel was bought/rented, etc.
purchaseInfo.sidePanels[].product ObjectId Product of the sidepanel.
Status (read-only)
status.configLoaded Date Date and time the configuration was most recently fetched (if supported by model).
status.configSaved Date Date and time the configuration was last saved.
status.online Boolean True if the phone is online.
status.expires Number Number of seconds until the phones registration expires, -1 if not online.
status.localIpAddress String Local IP address that phone is currently at (if available).
status.publicIpAddress String Public IP address that the phone is currently at (if available).
status.userAgent String The user agent string as presented by the phone.

Note that properties holding no value may be omitted from the object.

Example

{
  _id: '12345678901234567890ABCD',
  pbxCluster: 1,
  sipPhoneModel: '1234567890123457890AAAA',
  extension: '123457890123457890BBBB',
  customer: '1234567890123456780CCCC',
  macAddress: '4EE8A34B56F3',
  handsetAddress: null,
  handsetIndex: null,
  callWaiting: false,
  notes: 'A note about the phone',
  softkeyConfigurationOnDevice: true,
  softkeyBlfBlindTransfer: false,
  ip: {
    mode: 'OPEN',
    countries: '',
    address: ''
  },
  username: '2yu9hjfy23iuhdwg9ewhufghuiweghui',
  password: 'g9ewhufg2yu9hjfy2whuiweghui3iuhd',
  instanceId: null,
  ringer: {
    volume: 4,
    tone: 2
  },
  volume: {
    handset: { mic: 5, speaker: 7 },
    headset: { mic: 5, speaker: 7 },
    handsfree: { mic: 3, speaker: 4 }
  },
  softkeys: [
    { index: 0, function: 'SPEEDDIAL', value: '112', label: 'Emergency' },
    { index: 1, function: 'BLF', value: '1234567890123457890FFFF', label: 'Hans Christian Anderson' }
  ],
  codec: { hdAudio: true, video: false },
  network: {
    dhcp: false,
    ipAddress: '192.168.1.10',
    subnet: '255.255.255.0',
    gateway: '192.168.1.1',
    dns1: '192.168.1.1',
    dns2: '8.8.8.8',
    vlanId: 0,
    vlanPriority: 5
  },
  status: {
    configLoaded: '2015-01-01T00:00:00Z',
    configSaved: '2015-01-01T00:00:00Z',
    online: true,
    expires: 2543,
    localIpAddress: '192.168.1.10',
    publicIpAddress: '213.83.176.134',
    userAgent: 'snom370/8.7.3.25'
  },
  purchaseInfo: {
    orderId: '729291',
    date: '2020-01-30T00:00:00Z',
    paymentOption: 'BOUGHT',
    sidePanels: [
     {
        serial: '1234',
        paymentOption: "RENTED",
        date: '2015-01-01-T00:00:00Z',
        orderId: '1234678',
        product: '1234567890ABCDEF12345678'
     }, 
     {
        serial: '2341',
        paymentOption: "RENTED",
        date: '2015-01-01-T00:00:00Z',
        orderId: '98850',
        product: '1234567890ABCDEF12345678'
     }
    ]
  }
}

Errors

Error code Message Description
422 multiple Multiple errors (the inner property holds an array of errors this request generated, which can be any of the errors below)
422 pbxCluster PBX cluster id not valid only 1 or 2 is permitted
404 sipPhoneModel SIP phone model not found or invalid
404 extension Extension not found
404 customer Customer not found or not active
422 macAddress MAC address is invalid
409 macAddress A phone with the same MAC address already exists
403 macAddress All available slots has been filled, no more SIP phones can share the MAC address
422 handsetAddress Handset address is missing
409 handsetIndex The SIP phone/device does not have any free positions
422 ip.mode Mode is invalid
422 ip.countries Country code 'XX' is not valid
409 ip.mode ROAMING mode requires countries to be specified
422 ip.address IP address is invalid
422 ringer.volume Ringer volume is invalid
422 ringer.volume Ringer volume is outside the valid range
422 ringer.tone Ringtone is outside the valid range
422 volume.handset.mic Handset microphone level is invalid
422 volume.handset.speaker Handset speaker level is invalid
422 volume.headset.mic Headset microphone level is invalid
422 volume.headset.speaker Headset speaker level is invalid
422 volume.handsfree.mic Handsfree microphone level is invalid
422 volume.handsfree.speaker Handsfree speaker level is invalid
422 softkeys[#].index Index is missing
422 softkeys[#].index Index is being used by another softkey
422 softkeys[#].function Function is missing
422 softkeys[#].function Function type is not valid for this phone model
422 softkeys[#].value Not a valid phone number
404 softkeys[#].value Extension not found
422 softkeys[#].value URL is invalid, must begin with http: or https:
404 softkeys[#].value Group not found
404 softkeys[#].value Queue not found
409 softkeys[#].value Extension does not have controller rights on group
409 purchaseInfo.sidePanels.serial Sidepanel serials need to be unique
422 purchaseInfo.sidePanels More sidepanels configured than possible for the SIP phone model.
422 network.ipAddress IP address is invalid or missing
422 network.subnet Subnet mask is invalid or missing
422 network.gateway Default gateway is invalid or missing
422 network.dns1 Primary DNS server is invalid or missing
422 network.dns2 Secondary DNS server is invalid
422 network.vlanId Vlan ID is invalid
422 network.vlanPriority Vlan priority is invalid
403 access_denied Access denied
404 not_found SIP phone not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>