Skip to content

Extensions

List all extensions

This method allows you to retreive a full list of extensions within your unit.

URL

/api/v2/extensions/list

Supported Paramaters

  • sort_field - either name or exten (name sorts by the Extension name, exten sorts by the Extension number), default is name
  • order - either DESC or ASC (descending or ascending), default as ASC

Example JSON

{
    "status":"success",
    "time":0.02,
    "flags":{},
    "data":
    [
        {
            "id":2902,
            "name":"Alex",
            "exten":"100",
            "created_at":"2015-05-05T14:54:25.000Z",
            "updated_at":"2015-09-03T09:39:44.000Z",
            "username":"alex",
            "password":"sssssss",
            "noanswer_timeout":5,
            "recording_enabled":true,
            "call_limit":null,
            "paging_enabled":false,
            "compatibility_mode":false,
            "outbound_number":
                {
                    "id":3466,
                    "number":"03301222970"
                },
            "voicemail_box":
                {
                    "id":1375,
                    "number":"1000",
                    "name":"Alex"
                },
            "pickup_group":
                {
                    "id":298,
                    "name":"Test"
                },
            "noanswer_destination":
                {
                    "type":"Followme",
                    "object":
                        {
                            "id":232,
                            "name":"Test"
                        }
                }
            "unit":
               {
                   "id":982,
                   "name":"My Business",
                   "identifier":"mybusiness",
                   "type":"direct",
                   "statistics":
                       {
                           "last_call":
                               {
                                   "time":"2016-11-11T15:32:18.000Z",
                                   "duration":0
                               },
                           "extension_count":9,
                           "incoming_number_count":4,
                           "internal_number_count":5,
                           "incoming_numbers":[
                             "03301222970",
                             "03300882371",
                             "01245808278"
                           ]
                     }
              }
        }
    ]
}

Get extension properties

This method allows you to retrieve information about a specific extension in your unit

URL

/api/v2/extensions/show

Supported Paramaters

  • id - the ID of the extension you wish to view (required)

Example JSON

{
    "status":"success",
    "time":0.02,
    "flags":{},
    "data":
    [
        {
            "id":2902,
            "name":"Alex",
            "exten":"100",
            "created_at":"2015-05-05T14:54:25.000Z",
            "updated_at":"2015-09-03T09:39:44.000Z",
            "username":"alex",
            "password":"sssssss",
            "noanswer_timeout":5,
            "recording_enabled":true,
            "call_limit":null,
            "paging_enabled":false,
            "compatibility_mode":false,
            "outbound_number":
                {
                    "id":3466,
                    "number":"03301222970"
                },
            "voicemail_box":
                {
                    "id":1375,
                    "number":"1000",
                    "name":"Alex"
                },
            "pickup_group":
                {
                    "id":298,
                    "name":"Test"
                },
            "noanswer_destination":
                {
                    "type":"Followme",
                    "object":
                        {
                            "id":232,
                            "name":"Test"
                        }
                }
            "unit":
               {
                   "id":982,
                   "name":"My Business",
                   "identifier":"mybusiness",
                   "type":"direct",
                   "statistics":
                       {
                           "last_call":
                               {
                                   "time":"2016-11-11T15:32:18.000Z",
                                   "duration":0
                               },
                           "extension_count":9,
                           "incoming_number_count":4,
                           "internal_number_count":5,
                           "incoming_numbers":[
                             "03301222970",
                             "03300882371",
                             "01245808278"
                           ]
                     }
              }
        }
    ]
}

Add or update an extension

This method allows you to add or update an extension in your unit

URL

/api/v2/extensions/save

Supported Paramaters

  • id - the ID of the extension if you're updating an existing one (required)
  • name - the extension name
  • username - the extension SIP username
  • password - the extension SIP password
  • voicemail_box_id - the ID of the associated voicemail box
  • noanswer_timeout - the length of time (in seconds) to wait before the call is directed to the no answer destination
  • exten - the extension number (only available when creating a new extension)
  • outbound_caller_id - the ID of the associated outbound number (leave blank to disable outbound calling from the extension)
  • recording_enabled - whether or not outbound call recording is enabled
  • noanswer_destination_type - the type of no answer destination, such as VoicemailBox
  • noanswer_destination_id - the ID of the no answer destination
  • pickup_group_id - the ID of the associated pickup group
  • paging_enabled - whether or not paging is enabled on the extension
  • compatiblity_mode - whether or not compatibility mode is enabled

Example JSON

{
    "status":"success",
    "time":0.02,
    "flags":{},
    "data":
    [
        {
            "id":2902,
            "name":"alex",
            "exten":"100",
            "created_at":"2015-05-05T14:54:25.000Z",
            "updated_at":"2015-10-07T14:04:55.960Z",
            "username":"alex",
            "password":"sssssss",
            "noanswer_timeout":5,
            "recording_enabled":true,
            "call_limit":null,
            "paging_enabled":false,
            "compatibility_mode":false,
            "outbound_number":
                {
                    "id":3466,
                    "number":"03301222970"
                },
            "voicemail_box":
                {
                    "id":1375,
                    "number":"1000",
                    "name":"Alex"
                },
            "pickup_group":
                {
                    "id":298,
                    "name":"Test"
                },
            "noanswer_destination":
                {
                    "type":"Followme",
                    "object":
                        {
                            "id":232,
                            "name":"Test"
                        }
                }
        }
    ]
}

Delete an extension

This method allows you delete an extension in your unit.

URL

/api/v2/extensions/delete

Supported Parameters

  • id - the ID of the extension you wish to delete (required)

Example JSON

{
    "status":"success",
    "time":0.04,
    "flags":{},
    "data":true
}