User Tools

Site Tools


api:pbx:sipphonemodels:create

API : PBX : SIP phone models Create

Introduction

This request will create a new SIP phone model.

The model is used for provisioning and configuration of SIP phones, and contains their set of features and a template configuration file.

Request

URL https://api.telecomx.dk/pbx/sipphonemodels
Method POST
Access level ADMIN
Body brand String Brand: SNOM, MITEL, YEALINK, LG, GIGASET, CISCO, GENERIC.
model String Name of the phone/adapter/base model.
extensions Number Number of extensions the phone supports. Normally 1. This controls how many SIP phones can share the same MAC address and thus the same physical unit/base-unit (often used for wireless phone on a DECT base).
softkeys Numbers Number of softkeys the phone supports.
softkeyLabels Boolean True if the phone has softkeys that can show text labels.
softkeyCapabilities Array Array of softkey capabilities the phone supports: SPEEDDIAL, BLF, LINE, DND, ADDRESSBOOK, REDIAL, VOICEMAIL, TRANSFER, URL, HOLD, RECORD, MENU, DELETE, SAVE.
picture Id Id of picture of the device in the GridStore, 200×200 pixels.
description String A short description of the device model and its capabilities.
configurationTemplate String Configuration template for using when generating configuration file for provisioning. The templates can contain a number of variables - see list below.
capabilities Object Subsection with device capabilities
capabilities.provision Boolean True if the device can be provisioned.
capabilities.macRedirect Boolean True if the device model support a redirect service provided by the phone maker and as such must be registered with the makers redirect service.
capabilities.customRingtones Boolean True if device supports custom ringtones via SIP URL parameter.
capabilities.multipleHandsets Boolean True if device supports multiple handsets that needs to be configured with each their handset id.
capabilities.sipConfigReload Boolean True if device supports reload of configuration via SIP NOTIFY message.
capabilities.sipReboot Boolean True if device supports reboot via SIP NOTIFY message.
capabilities.callWaiting Boolean True if device supports call waiting.
capabilities.audio Boolean True if device supports configuration of speaker, microphone and ringer levels.
capabilities.headsetButton Boolean True if device has a configurable headset button.
capabilities.dhsg Boolean True if device has DHSG feature (Mitel).
capabilities.displaySettings Boolean True if device supports display settings for brightness and background image.
audio Object Audio settings
audio.mic.min Number Min. microphone level.
audio.mic.max Number Max. microphone level.
audio.mic.default Number Default microphone level.
audio.speaker.min Number Min. speaker level.
audio.speaker.max Number Max. speaker level.
audio.speaker.default Number Default speaker level.
audio.ringer.min Number Min. ringer level.
audio.ringer.max Number Max. ringer level.
audio.ringer.default Number Default ringer level.
audio.ringtone.min Number Index of first standard ringtone.
audio.ringtone.max Number Index of last standard ringtone.
audio.ringtone.default Number Default ringtone index.
sidePanels Array Sidepanels selectable for the phone.
sidePanels[].name String Name of the panel.
sidePanels[].keys Number Number of keys on the panel.
sidePanels[].labels Boolean True if panel supports text labels.
sidePanelsMax Number Maximum number of side panels this phone supports.
requiredFirmware String Name of the firmware that the phone must be running.

All properties except for brand, model, extensions and softkeys are optional.

Configuration template

The configuration template is a text file which will be served to the phone when it requests its configuration. The template can contain a set of keywords that will be replaced with the actual value of the phone the SIP phone model template is used for.

A keyword is declared as %KEYWORD-NAME%, and is case insensitive.

See the list here.

Request body example

{
  brand: 'SNOM',
  model: '370',
  picture: '1234567890ABCDEF12345678',
  description: 'Hardphone with 12 softkeys and greytone LCD screen',
  extensions: 1,
  softkeys: 12,
  softkeyLabels: false,
  softkeyCapabilities: ['SPEEDDIAL', 'BLF', 'LINE', 'DND', 'ADDRESSBOOK', 'REDIAL', 'VOICEMAIL', 'TRANSFER', 'URL', 'HOLD', 'RECORD', 'MENU'],
  capabilities: {
    provision: true,
    macRedirect: true,
    customRingtones: true,
    multipleHandsets: false,
    sipConfigReload: true,
    sipReboot: true,
    callWaiting: true,
    audio: true,
    headsetButton: true,
    dhsg: false,
    displaySettings: false
  },
  audio: {
    mic: {
      min: 0,
      max: 15,
      default: 7
    },
    speaker: {
      min: 0,
      max: 15,
      default: 7
    },
    ringer: {
      min: 0,
      max: 15,
      default: 7
    },
    ringtone: {
      min: 1,
      max: 8,
      default: 1
    }
  },
  configurationTemplate: '...not shown here...',
  sidePanels: [
    {
      name: 'E150',
      keys: 24,
      labels: true
    },
    {
      name: E180',
      keys: 48,
      labels: true
    }
  ],
  sidepanelsMax: 3,
  requiredFirmware: 'SIP-4.643'
}

Response

The response will be the newly created SIP phone model, if no errors occurred.

Json object
_id Id Unique ID of the model
brand String Name of brand: SNOM, MITEL, LG, YEALINK, CISCO, GIGASET, GENERIC.
brandName String Brand name for humans.
model String Name of the phone/adapter/base model.
extensions Number Number of extensions the phone supports. Normally 1. This controls how many SIP phones can share the same MAC address and thus the same physical unit/base-unit (often used for wireless phone on a DECT base).
softkeys Numbers Number of softkeys the phone supports.
softkeyLabels Boolean True if the phone has softkeys that can show text labels.
softkeyCapabilities Array Array of softkey capabilities the phone supports: SPEEDDIAL, BLF, LINE, DND, ADDRESSBOOK, REDIAL, VOICEMAIL, TRANSFER, URL, HOLD, RECORD, MENU, SAVE, DELETE.
picture Id Id of picture of the device in the GridStore, 200×200 pixels.
description String A short description of the device model and its capabilities.
configurationTemplate String Configuration template for using when generating configuration file for provisioning. The templates can contain a number of variables - see list below.
capabilities Subsection with device capabilities
capabilities.provision Boolean True if the device can be provisioned.
capabilities.macRedirect Boolean True if the device model support a redirect service provided by the phone maker and as such must be registered with the makers redirect service.
capabilities.customRingtones Boolean True if device supports custom ringtones via SIP URL parameter.
capabilities.multipleHandsets Boolean True if device supports multiple handsets that needs to be configured with each their handset id.
capabilities.sipConfigReload Boolean True if device supports reload of configuration via SIP NOTIFY message.
capabilities.sipReboot Boolean True if device supports reboot via SIP NOTIFY message.
capabilities.callWaiting Boolean True if device supports call waiting.
capabilities.audio Boolean True if device supports configuration of speaker, microphone and ringer levels.
capabilities.headsetButton Boolean True if device has a configurable headset button (Mitel).
capabilities.dhsg Boolean True if device has DHSG feature (Mitel).
capabilities.displaySettings Boolean True if device supports display settings for brightness and background image.
audio Object Audio settings
audio.mic.min Number Min. microphone level.
audio.mic.max Number Max. microphone level.
audio.mic.default Number Default microphone level.
audio.speaker.min Number Min. speaker level.
audio.speaker.max Number Max. speaker level.
audio.speaker.default Number Default speaker level.
audio.ringer.min Number Min. ringer level.
audio.ringer.max Number Max. ringer level.
audio.ringer.default Number Default ringer level.
audio.ringtone.min Number Index of first standard ringtone.
audio.ringtone.max Number Index of last standard ringtone.
audio.ringtone.default Number Default ringtone index.
sidePanels Array Sidepanels selectable for the phone.
sidePanels[].name String Name of the panel.
sidePanels[].keys Number Number of keys on the panel.
sidePanels[].labels Boolean True if panel supports text labels.
sidePanelsMax Number Maximum number of side panels this phone supports.
requiredFirmware String Name of the firmware that the phone must be running.

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

Example

{
  _id: '123456789012345678901234',
  brand: 'SNOM',
  brandName: 'Snom',
  model: '370',
  picture: '1234567890ABCDEF12345678',
  description: 'Hardphone with 12 softkeys and greytone LCD screen',
  extensions: 1,
  softkeys: 12,
  softkeyLabels: false,
  softkeyCapabilities: ['SPEEDDIAL', 'BLF', 'LINE', 'DND', 'ADDRESSBOOK', 'REDIAL', 'VOICEMAIL', 'TRANSFER', 'URL', 'HOLD', 'RECORD', 'MENU'],
  capabilities: {
    provision: true,
    macRedirect: true,
    customRingtones: true,
    multipleHandsets: false,
    sipConfigReload: true,
    sipReboot: true,
    callWaiting: true,
    audio: true,
    headsetButton: true,
    dhsg: false,
    displaySettings: false
  },
  audio: {
    mic: {
      min: 0,
      max: 15,
      default: 7
    },
    speaker: {
      min: 0,
      max: 15,
      default: 7
    },
    ringer: {
      min: 0,
      max: 15,
      default: 7
    },
    ringtone: {
      min: 1,
      max: 8,
      default: 1
    }
  },
  configurationTemplate: '...not shown here...',
  sidePanels: [
    {
      name: 'E150',
      keys: 24,
      labels: true
    },
    {
      name: E180',
      keys: 48,
      labels: true
    }
  ],
  sidepanelsMax: 3,
  requiredFirmware: 'SIP-4.643'
}

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)
404 brand Brand is missing
404 model Model is missing
422 extensions Extension is invalid - 1-1000 required
422 softkeys Softkeys is invalid - 0-1000 required
500 internal_error <Unspecified>
api/pbx/sipphonemodels/create.txt · Last modified: 2020/05/18 10:03 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki