Wiki en construction / PBXware 7.0 - Incident concernant les services évolués en français

Suppression du dossier system32 ...

API

Temps estimé :44 minutes

Introduction

Ce document peut être utilisé comme guide de référence lors de l’utilisation de l’API PBXware. Il a pour but d’aider les développeurs à écrire des logiciels tiers pour interagir avec PBXware.

Protocole

L’API PBXware fonctionne en envoyant et en recevant des requêtes POST ou GET via le protocole HTTP.

Authentification

Une clé API unique est utilisée à des fins d’authentification.
La clé API n’est pas définie par défaut. Vous pouvez en définir une dans les paramètres d’administration > Clé API.

La taille minimale de la clé est de 10 caractères aléatoires. Il est également possible de générer une clé aléatoire dans l’interface elle-même.

Vous devez vous assurer que la clé API reste secrète car elle expose des fonctionnalités critiques à des tiers (par exemple, la fonctionnalité Supprimer).

Requêtes

Both the API key and all other necessary arguments are sent as part of HTTP GET or HTTP POST request. Sample request follows:

GET /?apikey=my.secret.apikey&action=pbxware.did.list HTTP/1.0
Host: pbxware.local
User-Agent: Mozilla/5.0

Réponses

La réponse à l’exemple de requête ci-dessus est, par défaut, au format JSON. En cliquant sur l’URL JSON, vous obtiendrez plus d’informations sur JSON et sur la manière de l’utiliser dans le cadre de votre application.

Il est possible de personnaliser la réponse en envoyant l’argument apiformat dans le cadre de la demande.

Exemple de réponse (au format JSON) :

{
    "7": {
        "number": "12345",
        "number2": "",
        "server": "7",
        "trunk": "6099",
        "type": "Extension",
        "ext": "530",
        "status": "enabled"
    },
    "8": {
        "number": "12346",
        "number2": "",
        "server": "7",
        "trunk": "6099",
        "type": "Extension",
        "ext": "100",
        "status": "enabled"
    }
}

Supported response formats

Following response formats are supported by the PBXware API:

Response formats
json

JSON

php

PHP (serialized)

Testing

To test API, you can use some of the CLI tools such as:

Example for httpie:

http -b "http://pbx.local/?apikey=my.secret.key&action=pbxware.ext.list"

Handling errors

In case response message contains error key, all further operations must be aborted on the application side. Example:

{
    "error": "Invalid API key."
}

API Actions

The main argument that controls the API is the action argument. Action argument consists of three parts separated by dots: application.object.method

Application in this case will always default to pbxware.

Action objects

The following PBXware objects can be controlled with the API:

Objects
dashboard

Dashboard

ext

Extensions

trunk

Trunks

sms

SMS

did

DIDs

didgroup

DID Groups

ivr

IVRs

ring_group

Ring Groups

cdr

CDRs

route

Routes

tenant

Tenants

server

Servers

splan

Service Plans

destination

Destinations

uads

UADs

apps

Apps

license

License

monitor

Monitor

department

Departments

Dashboard

Supported Methods
ext_online

Display number of Extensions Online

services

Display PBXware services

sip_registrations

Display information for SIP registration

calls

Calls Overview

glocom_editions

Display information on apps registered to PBXware and the editions

glocom_users

Display number of logged GloCOM users

licensing

Display the percentage usage information of PBXware license

disk_usage

Display information on current PBXware hard disk usage

cpu

Display information on CPU usage on the PBXware server

memory

Display information on PBXware memory usage

Extensions Online

Show number of Extensions Online per tenant/server

Arguments
server

Filter extensions by tenant/server

Response fields
type

Extensions Online

count

Count

Response
{
	"type": "Extensions Online",
	"count": 1,
}

Services

Show PBXware services

Response fields
PBXware

Status of main PBXware service

PBXware services

Status of PBXware services

PBXware proxy

Status of PBXware proxy

Push notification

Status of Push notification

Chat server

Status of Chat server

Memcached

Status of Memcached

Response
{
	"PBXware": "running",
	"PBXware service": "running"
	"PBXware proxy": "running"
	"Push notification": "running"
	"Chat server": "running"
	"Memcached": "running"
}

SIP Registrations

Show information of SIP registrations

Arguments
server

Filter extensions by tenant/server

Response fields
registered

Number of successful SIP registrations

failed

Number of failed SIP registrations

lagged

Number of SIP registrations in the lagged state

Response
{
 "SIP Registrations": {
		"success": 4,
		"failed": 0,
		"lagged": 0
    }
}

Calls Overview

Calls Overview

Arguments
server

Filter extensions by tenant/server

Response fields
now

A number of current calls

last hour

A number of calls in past hours

today

A number of calls for a current day

answared calls

A number of answered calls displayed

Response
{
	"now": 0,
	"last hour": 6,
	"today": 6,
	"answared calls": 6
}

GloCOM Editions

Display information on apps registered to PBXware and the editions

Arguments
server

Filter extensions by tenant/server

Response fields
office

A number of office edition

business

A number of business edition

agent

A number of agent edition

supervisor

A number of supervisor edition

ios

A number of IOS edition

android

A number of android edition

Response
{
	"office": 0,
	"business": 0,
	"agent": 0,
	"supervisor": 0,
	"ios": 0,
	"android": 0
}

GloCOM Users

Display number of logged GloCOM users

Arguments
server

Filter extensions by tenant/server

Response fields
glocom_users

A number of logged gloCOM users

Response
{
   "glocom_users": 0
}

Licensing

Display the percentage usage information of PBXware license for Extensions, IVRs, Queues, and Conferences

Arguments
server

Filter extensions by tenant/server

Response fields
ext

Display percentage usage for Extensions

ivr

Display percentage usage for IVRs

queue

Display percentage usage for Queues

conference

Display percentage usage for Conferences

Response
{
    "ext": {
        "inuse": 14,
        "max": 100
    },
    "ivr": {
        "inuse": 0,
        "max": 200
    },
    "queue": {
        "inuse": 0,
        "max": 200
    },
    "conference": {
        "inuse": 1,
        "max": 200
    }
}

Disk usage

Display information on current PBXware hard disk usage

Response fields
inuse

Display percentage for Disk usage

Response
{
    "inuse": "45%"
}

CPU

Display information on CPU usage on the PBXware server

Response fields
inuse

Display percentage for CPU usage

Response
{
    "inuse": "7%"
}

Memory

Display information on PBXware memory usage

Response fields
inuse

Display percentage for Memory usage

Response
{
    "inuse": "34%"
}

Extensions

Supported Methods
list

List Extensions

configuration

Configuration of specific extension

add

Add Extension

edit

Edit Extension

delete

Delete Extension

balance

Credit/Debit Balance

billing

Extension Billing (deprecated and will be soon replaced with call_rating)

billing_info

Extension Billing Info (deprecated and will be soon replaced with call_rating_info)

call_rating

Extension Call Rating

call_rating_info

Extension Call Rating Info

slaves

Returns all slaves extension for supplied master extension

billing_history

Billing History (deprecated and will be soon replaced with call_rating_history)

call_rating_history

Call Rating History

es

Extension Enhanced Services

reset_inclusive_minutes

Reset Inclusive Minutes

voicemail.delete

Delete Extension Voicemails

Listing Extensions

Arguments
server

Filter extensions by tenant/server

Response will consist of an array of extensions with array key being the Extension ID.

Response fields
name

Extension Name

email

E-mail

protocol

Protocol

ext

Extension

location

Location (Either local or remote)

ua_id

User-Agent ID

ua_name

User-Agent codename

ua_fullname

User-Agent human-friendly name

status

Either enabled or disabled

macaddress

MAC Address

linenum

Line Number

user_location

User Location

department

IDs of Extension Departments

Response
{
    "1": {
        "name": "User 530",
        "email": "name@provider.com",
        "protocol": "sip",
        "ext": "530",
        "location": "local",
        "ua_id": "50",
        "ua_name": "generic_sip",
        "ua_fullname": "Generic SIP",
        "status": "enabled",
        "macaddress": "",
        "linenum": "10",
		"user_location": "Location",
		"department": "4,6"
    },
    "53": {
        "name": "User 100",
        "email": "name1@provider.com",
        "protocol": "iax",
        "ext": "100",
        "location": "local",
        "ua_id": "52",
        "ua_name": "custom_generic_iax",
        "ua_fullname": "Generic IAX",
        "status": "enabled",
        "macaddress": "123456789abc",
        "linenum": "15",
		"user_location": "Location"
		"department": "1"
    }
}

Extension Configuration

Arguments
id

ID of an extension (Required)

ext

Extension Number

  • Note: You cannot supply id and ext at the same time!

Response fields
name

Extension Name

email

E-mail

pin

PIN number

protocol

Protocol

ext

Extension

location

Location (either local or remote)

user_language

Language

ua_id

User-Agent ID

ua_name

User-Agent codename

ua_fullname

User-Agent human-friendly name

status

Either enabled or disabled

smuser

Whether extension is linked to Sitemanager User or not

service_plan

Service plan

options

Array of configuration options

additional_macaddress

Array of additional MAC Addresses

options_raw (deprecated and will be removed and replaced with ua_autoprov soon)

UAD Auto Provisioning Template

ua_autoprov

UAD Auto Provisioning Template

additional_config

Configuration written in Additional Configuration field

uad_sipheaders

Check for UAD SIP Headers

Response
{
    "1": {
        "name": "User 530",
        "pin": "1234",
        "protocol": "sip",
        "ext": "530",
        "location": "local",
        "user_language": "en",
        "ua_id": "50",
        "ua_name": "generic_sip",
        "ua_fullname": "Generic SIP",
        "status": "enabled",
        "linenum": "10",
        "smuser": "0",
        "options": {
            "type": "friend",
            "dtmfmode": "rfc2833",
            "context": "t-344",
            "canreinvite": "0",
            "qualify": "8000",
            "host": "dynamic",
            "cid_enable": "yes",
            "callerid": "User 530 <530>",
            "voicemail": "1",
            "incominglimit": "1",
            "outgoinglimit": "2",
            "username": "344530",
            "secret": "530",
            "disallow": "all",
            "allow": [
                "ulaw",
                "alaw"
            ],
            "recordcalls": "0",
            "mac": "",
            "autoprovisiong": "0",
            "ringtime": "32",
            "incoming_dialoptions": "tr",
            "page_header": "6",
            "vmailsend": "1",
            "vmailattach": "0",
            "vmaildelete": "0",
            "uad_sipheaders": "x-TN-Mobility,P-Early-Media"
        },
        "options_raw": "",
        "ua_autoprov": "",
        "additional_macaddress": "",
        "additional_config": ""
    }
}

Adding Extensions

Arguments
server

Tenant/Server ID (Required)

title

Title

name

Full Name (Required)

email

E-mail (Required)

ext

Extension

location

Location (Local=1, Remote=2) (Required)

ua

User Agent Device ID (number only) (Required)

uad_sipheaders

Check for UAD SIP Headers

label

Label

user_location

Location

user_language

Language

status

Status (Active=1, Not Active=0) (Required)

authname

Authname

auth

Auth

pin

PIN (Required)

incominglimit

Incoming limit (Required)

outgoinglimit

Outgoing limit (Required)

voicemail

Voicemail (Yes=1, No=0) (Required)

prot

Protocol (SIP and IAX only!) (Required)

secret

Password (Required)

billing (deprecated and will be soon replaced with call_rating)

Billing (Yes=1, No=0)

call_rating

Call Rating (Yes=1, No=0)

creditlimit

Credit limit (number, 12 digits max, required if Billing=1)

reminderbalance

Reminder balance (number, 5 digits max, required if Billing=1)

service_plan

Service Plan ID (required if Billing=1)

nat

NAT (Yes=1, No=0, Never=2)

canreinvite

SIP Re-INVITE support (Yes=1, No=0)

qualify

Qualify (4 digits max)

ringtime

Ring time seconds (2 digits max)

incoming_dialoptions

Incoming Dial Options

outgoing_dialoptions

Outgoing Dial Options

autoprovisiong

Auto provisioning (Yes=1, No=0)

dhcp

DHCP (Yes=1, No=0)

staticip

Provisioning Static IP address

netmask

Provisioning netmask

gateway

Provisioning gateway

dns1

Provisioning DNS 1

dns2

Provisioning DNS 2

macaddress

User Agent device MAC address

voicemail_timezone

Voicemail timezone (Germany, USA…)

vm_greeting_message

Voicemail Greeting Message (Unavailable=0, Busy=1, None=2)

setcallerid

Set CallerID (Yes=1, No=0)

acodecs

Allowed codecs separated with :: ulaw:alaw:g723.1:g726:g729:gsm:ilbc:speex:lpc10:h261:h263:h263p

page

Speakerphone paging header, one of following values are valid:

  • (empty) – Custom Header

  • 2 – Aastra 480i 9112i 9133i

  • 4 – Polycom’s Default

  • 5 – Sipura

  • 6 – Snom phones

page_custom

Custom page header (text)

recordcalls

Record calls (Yes=1, No=0)

recordsilent

Silent recording (Yes=1, No=0)

vmailsend

Send E-mail (hints) (Yes=1, No=0)

vmailattach

Attach (hints) (Yes=1, No=0)

vmaildelete

Delete After E-mailing (hints) (Yes=1, No=0)

acc_slave

Slave (hints) (Yes=1, No=0)

slave_accountcode

Master Account Code

send_email

Send E-mail with account details (Yes=1, No=0)

service_plan_date

Service Plan Date (dd-mm-YYYY)

limitenable

Enable Limits (Yes=1, No=0)

limittype

Limit Type (Daily, Monthly)

softlimit

Soft Limit (number, 5 digits max)

hardlimit

Hard Limit (number, 5 digits max)

notification_email

Notification E-mail

pbd_pin

PIN Based Device PIN (number, 5 digits)

notification_email

Notification E-mail

cf_billing_disable (deprecated and will be soon replaced with cf_call_rating_disable)

Disable Billing for Call Forwarding

cf_call_rating_disable

Disable Call Rating for Call Forwarding

webrtc

WebRTC Enabled

defaultip

Default IP

max_contacts

Max Contacts

encryption

Encryption (yes,offer)

directrtpsetup

Direct RTP setup

callingpres

CallerID Presentation

cid_anon

Hide CallerID for Anonymous calls

ringtoneforlocalcalls

Ringtone for Local calls

ringtonefortransferredcalls

Ringtone for Transferred calls

cidmatchdid

Only Allow Trunk CallerID within DID range

dropanonymous

Drop Anonymous calls

trustrpid

Trust Remote-Party-ID

sendrpid

Send Remote-Party-ID

trust_id_outbound

Send Caller ID in RPID for Anonymous calls

rpid_connectedline

Connected Line Updates

rpid_update

RPID with SIP UPDATE

pai_header

Send PAI header

callgroup

Call Group

pickupgroup

Pickup Group

primary_trunk

Primary Trunk

secondary_trunk

Secondary Trunk

tertiary_trunk

Tertiary Trunk

primary_emerg_trunk

Primary Emergency Trunk

secondary_emerg_trunk

Secondary Emergency Trunk

tertiary_emerg_trunk

Tertiary Emergency Trunk

busylevel

Busy level

limit_notify_play_sound

Play sound on exceeded limit

limit_notify_send_email

Send e-mail on exceeded limit

busyvoicemail

Greeting-Mode

mailboxes

MWI extensions (comma separated)

vmailpager

Pager e-mail

vmailskipinst

Skip Instructions

vmailskippin

Skip PIN Prompt

vmailsaycid

Say CallerID

vmailreview

Allow Review mode

vmailoperator

Allow Operator

vmailenvelope

Play Envelope message

vmailhidefromdir

Hide from directory

videosupport

Video Support

autoframing

Auto-Framing (RTP Packetization)

vmaildelay

Voicemail Delay

vmailopext

Operator Extension

vmailnrings

Rings to answer

force_codec

Force codec on outbound trunk channel (ulaw, alaw, g722, opus, g723.1, g726, g726aal2, g729, gsm, ilbc, speex, speex16, speex32)

hd_logout_time

Automatic Logout (Hot Desking)

record_beep_ext

Play Periodic Beep

pbd_pin

Pin Based Dialing Pin (Must be enabled in license)

areacode

Area Code

busylevel_incoming

Apply Busy Level for Incoming Calls (Yes=1, No=0)

jbimpl

Jitter Buffer (inherit, disabled, fixed, adaptive)

jbmaxsize

Max length (ms)

jbresyncthreshold

Re-sync threshold

jbtargetextra

Target extra

show_in_dir

Show In Directory (Yes=1, No=0)

show_in_app

Show in Desktop/Mobile App (Yes=1, No=0)

additional_config

Additional config

ua_autoprov

UAD Auto Provisioning Template

Successful response
{
    "success": "Extension ID: 10",
    "id": 10
}

Editing Extensions

Arguments are identical to the ones in Adding Extensions section. All of them are optional, except:

server

Tenant/Server ID

id

Extension ID

Successful response
{
    "success": "Extension ID: 10",
    "id": 10
}

Deleting Extensions

Arguments

In order to delete an extension, one has to specify:

id

Extension ID

server

Server/Tenant ID

Credit/Debit Balance

Arguments

All of these arguments are required:

id

Extension ID

ext

Extension Number

  • Note: You cannot supply id and ext at the same time!

server

Server/Tenant ID

mode

Either credit or debit

amount

Amount to credit/debit onto balance

notes

Notes in regards to this update

refno

Reference Number

Successful response
{
    "success": "Updated balance for Extension ID '34923' successfully."
}

Extensions Billing

Arguments
server

Tenant/Server ID

id

Extension ID

ext

Extension number

  • Note: You cannot supply id and ext at the same time!

Response will consist of an array of extension billing data with array key being the Extension ID.

Response fields
splan

Service Plan

slave

Slave

master_code

Master Account Code

reminder_balance

Reminder Balance

credit_limit

Credit Limit

splan_date

Service Plan Date (dd-mm-YYYY)

limits

Enable Limits

limit_type

Limit Type

soft_limit

Soft Limit

hard_limit

Hard Limit

email

Notification E-mail

Response
{
    "1": {
        "splan": "1",
        "slave": "no",
        "master_code": null,
        "reminder_balance": "0.00000",
        "credit_limit": "15.00000",
        "splan_date": "01-09-2009",
        "limits": "yes",
        "limit_type": "Daily",
        "soft_limit": "100",
        "hard_limit": "200",
        "email": "john_doe@dot.com"
    }
}

Extensions Billing Info

Arguments
server

Tenant/Server ID

id

Extension ID

ext

Extension number

  • Note: You cannot supply id and ext at the same time!

Response will consist of an array of extension billing info data with array key being the Extension ID.

Response fields
account_balance

Account Balance

available_funds

Available Funds

inclusive_minutes

Inclusive Minutes Left

Response
{
    "1": {
        "account_balance": "100.00000",
        "available_funds": "15.00000",
        "inclusive_minutes": "No Inclusives spent."
    }
}

Extension Slaves

Arguments
server

Tenant/Server ID

id

Extension ID

ext

Extension Number

  • Note: You cannot supply id and ext at the same time!

Response will consist of an array of extensions info data with array key being the Extension ID.

Response fields are identical to the ones in Listing Extensions section.

Response
{
	"1": {
		"name": "User 530",
		"protocol": "sip",
		"ext": "530",
		"location": "local",
		"ua_id": "50",
		"ua_name": "generic_sip",
		"ua_fullname": "Generic SIP",
		"status": "enabled"
	},
	"53": {
		"name": "User 100",
		"protocol": "iax",
		"ext": "100",
		"location": "local",
		"ua_id": "52",
		"ua_name": "custom_generic_iax",
		"ua_fullname": "Generic IAX",
		"status": "enabled"
	}
}

Billing History

Arguments
server

Tenant/Server ID

id

Extension ID (Required)

ext

Extension number (Required)

  • Note: You cannot supply id and ext at the same time!

start

Start Date (Required)

  • Format is: mmm-dd-YYYY (eg: Feb-01-2009)

end

End Date (Required)

  • Format is: mmm-dd-YYYY (eg: Feb-28-2009)

starttime

Start Time

  • Format is: hh:mm:ss (eg:23:59:59)

  • Default value is 00:00:00

endtime

End Time

  • Format is: hh:mm:ss (eg:23:59:59)

  • Default value is 00:00:00

type

Type (eg: credit|debit)

refno

Reference Number

rrefno

Filtering Reference Number using regular expressions

sum

Summarize amount by type (Yes=1, No=0)

timezone

Time Zone to apply when searching history

  • Ex: “America/New_York”

Response will consist of an array data.

Response (sum=0)
[
{
	"entry_date": "2010-01-18",
	"refno": "111",
	"notes": "test billing update",
	"amount": "-5",
	"type": "debit"
},
{
	"entry_date": "2009-09-29",
	"refno": "111",
	"notes": "test billing update",
	"amount": "5",
	"type": "credit"
}
]
Response (sum=1)
{
	"sum_credit": "352.96000",
	"sum_debit": "-53.00000"
}

Extension Enhanced Services

Arguments

In order to access any extension enhanced service, one has to specify:

id

Extension ID

server

Server/Tenant ID

Supported methods are actually enhanced services described with list bellow.

List of methods representing enhanced services:

callerid

Caller ID

callfilters

Call Filters & Blocking

callscreening

Call Screening

dnd

Do Not Disturb

callpickup

Call Pickup

lastcaller

Last Caller

callfwd

Call Forwarding

followme

Follow Me

instrecord

Instant Recording

remoteaccess

Remote Access

phonecallback

Phone Callback

grouphunt

Group Hunt

mobilenumbers

Mobile Numbers

sppage

Speakerphone Page

blflist

BLF List

speeddial

Speed Dial

delrecordings

Delete Recordings

listenrecordings

Listen to Recordings

operationtimes

System Operation Times

extoperationtimes

Extension Operation Times

callmonitoring

Call Monitoring

wakeupcall

Wake-up Call

opwakeupcall

Operator Wake-up Call

sppagegroups

Speakerphone Page Groups

Each of this services supports at least following two methods:

set

Requires state argument. Sets state from the state argument yesno or pin

get

Get’s the current state for enhanced service.

set_osc

Requires state argument. Sets state of OSC from the state argument yes or no

get_osc

Get’s the current state of OSC for enhanced service.

Successful response
{
	"state":"yes"
}

Some of the enhanced services is required only to be enabled or disabled. Most of them requires additional configuration arguments. Methods for seating and reading configuration arguments for enhanced services are:

configuration

Read configuration attributes of enhanced service

edit

Set configuration arguments for enhanced service.

Following is enhanced services supporting this two methods configuration and edit

Caller ID

configuration

Successful response
{
	"callerid":"Mr. Smith"
}

Non tenant mode:

In non tenant mode it can be set caller id per trunks. One successful response may contain callerid:<trunk> name variables.

Successful response
{
	"callerid":"6666667",
	"emergency_callerid":"88888888",
	"callerid:TestTrunk":"111",
	"callerid:TestTrunk:privacy":"anonymous",
	"callerid:TestTrunk2":"333",
	"callerid:TestTrunk2:privacy":"anonymous_id",
	"allowed_callerids":{
		"1":{
			"callerid":"111",
			"label":"999"
		},
		"2":{
			"callerid":"222",
			"label":"888"
		}
	}
}

edit

Arguments

callerid

Specify caller ID to be set. (Required)

Non tenant mode:

trunks

Specify list of trunk names separated by colon :.

tcallerids

Specify list of caller ids for specified trunks.

tprivacies

Specify list of privacies separated by colon : (0 ⇒ anonymous, 1 ⇒ anonymous_id, 2 ⇒ anonymous_number, 3 ⇒ anonymous_number_id, 4 ⇒ none).

callerid

System / Network CallerID.

emergencycid

Emergency CallerID.

anums

Allowed list of CallerIDs.

alabels

Labels for Allowed list of CallerIDs.

acodes

Short Codes for Allowed list of CallerIDs.

trunks and tcallerids and anums and alabels must match in size or error will be returned.

Call Filters & Blocking

configuration

Successful response
{
	"telemarketer":"0",
	"callers":[
		"anonymous",
		"300"
	],
	"dtypes":[
		"voicemail",
		"busy"
	],
	"destinations":[
		"123",
		""
	]
}

edit

Arguments

callers

List of caller numbers separated with comma ,. This list must start with anonymous value for anonymous callers. (Requireddtypes Destination types list separated with comma ,. Following values are possible: call forward number|no answer|busy|voicemail|not in service (Required)

destinations

List of destinations separated with comma ,. (numbers only) (Required)

telemarketer

Telemarketer block yes or no (1 or 0)

`callers`, `dtypes` and `destinations` lists must be same size or error will be returned, cause they define list of records required.
Call Screening

configuration

Successful response
{
	"timeout":"16",
	"dopts":"tTr",
	"dtype":"",
	"replacecid":"123412341234",
	"preamble":"",
	"greeting":"",
	"pausebeforerec":"1",
	"recordlen":"11",
	"greetingwithname":"1",
	"lastd":"5435345",
	"voicemail":"1",
	"destinations":
	[
		"100",
		"101",
		"102"
	],
	"delays":
	[
		"16",
		"22",
		"33"
	],
	"suspends":
	{
		"0":"on",
		"2":"on"
	}
}

edit

Arguments

destinations

List of destinations separated with comma ,. (Required)

delays

List of delays separated with comma ,. (Required)

suspends

List of suspend values (0 or 1) separated with comma ,. (Required)

recordlen

Max recording length (sec). (Required)

timeout

Timeout in seconds.

dopts

Dial options (trT).

dtypes

Dial type, 0 or 1 (simultaneous or sequential).

replacecid

Replace Caller ID.

preamble

Preamble.

greeting

Greeting.

pausebeforerec

Pause before recording (sec).

recordlen

Max recording length (sec).

greetingwithname

Greeting with name.

lastd

Last destination.

voicemail

Last destination is voicemail.

Do Not Disturb

configuration

Successful response
{
	"dnd":"0",
	"dst":"123",
	"dsttype":"voicemail",
	"duration":"1"
}

edit

Arguments

dnd

Set dnd temporary or not active (0, 1 or 2 for Not Active, Temporary and Permanent)

dst

Destination value (numbers only)

dsttype

Destination type voicemail or call forward

duration

Duration in hours (numbers only)

Call Forwarding

configuration

Successful response
{
	"play":"1",
	"cid":"1",
	"enabled":[
		"unconditional",
		"busy"
	],
	"destinations":{
		"unconditional":[
		],
		"busy":[
			"106",
			"107"
		],
		"no answer":[
			"106",
			"107"
		],
		"line unavailable":[
		]
	},
	"timeouts":{
		"unconditional":[
		],
		"busy":[
			"",
			""
		],
		"no answer":[
			"10",
			"10"
		],
		"line unavailable":[
		]
	}
}

edit

Arguments

enabled

Comma , separated list of enabled call forward conditions, Following values are accepted: unconditional|busy|no answer|line unavailable

uncond_dests

Comma , separated list of unconditional destinations

busy_dests

Comma , separated list of busy destinations

noansw_dests

Comma , separated list of no answer destinations

unavail_dests

Comma , separated list of unavailable destinations

uncond_timeouts

Comma , separated list of unconditional timeouts

busy_timeouts

Comma , separated list of busy timeouts

noansw_timeouts

Comma , separated list of no answer timeouts

unavail_timeouts

Comma , separated list of unavailable timeouts

play

Play enable disable 1 or 0

cid

Caller ID enable disable 1 or 0

dests, timeouts and dtypes lists must mach in size or error will be returned.

Follow Me

configuration

Successful response
{
	"destinations":[
		"106",
		"107",
		"108"
	],
	"timeouts":[
		"10",
		"10",
		"10"
	],
	"dopts":"tr",
	"lastd":"102",
	"voicemail":"1",
	"confirm_calls":"1"
}

edit

Arguments

destinations

Comma separated , list of destinations (Required)

timeouts

Comma separated , list of timeouts (Required)

dopts

Dial options (trT)

lastd

Last destination

voicemail

Voicemail yes or no (1 or 0)

confirm_calls

Voicemail yes or no (1 or 0)

destinations and timeouts lists must mach in size or error will be returned.

Instant Recording

configuration

Successful response
{
	"silent":"0",
	"emailrec":"0"
}

edit

Arguments

silent

Silent (0,1) (Required)

emailrec

E-mail recording (0,1) (Required)

Remote Access

configuration

Successful response
{
	"callerids": [
		"21345678",
		"11223344",
		"55667788"
	],
	"pins": [
		"1",
		"0",
		"1"
	],
	"pid": "3",
	"require_pin": "1",
	"timeout": "12",
	"dial_opts": "rT"
}

edit

Arguments

callerids

Comma separated , list of Caller ID’s (Required)

pins

Comma separated , list of PIN’s – yes or no 1 or 0 (Required)

requirepin

Require Extension PIN 1 or 0 (Required)

timeout

Timeout in seconds (Optional)

dopts

Dial options (trT) (Optional)

Phone Callback

configuration

Successful response
{
	"callerids":[
		"12015618445",
		"12015618446"
	],
	"numbers":[
		"447441907999",
		"447441907888"
	]
}

edit

Arguments

callerids

Comma separated , list of Caller ID’s (Required)

numbers

Comma separated , list of numbers (Required)

Group Hunt

configuration

Successful response
{
	"destinations":[
		"100",
		"101",
		"102",
		"103"
	],
	"delays":[
		"1",
		"2",
		"3",
		"4"
	],
	"suspends":[
		"1",
		"0",
		"0",
		"1"
	],
	"dopts":"tT",
	"lastd":"66666666",
	"timeout":"64",
	"voicemail":"1",
	"confirmcalls":"1"
}

edit

Arguments

destinations

Comma separated , list of destinations (Required)

delays

Comma separated , list of delays (Required)

suspends

Comma separated , list of suspends (Required)

timeout

Timeout in seconds

dopts

Dial options (trT)

lastd

Last destination

voicemail

Voicemail 1 or 0

confirmcalls

Confirm calls 1 or 0

Mobile Numbers

configuration

Successful response
{
	"numbers":["12015618445","12015618444"],
	"labels":["Number one","Number two"]
}

edit

Arguments

mobiles

Comma separated , list of mobile numbers (Required)

labels

Comma separated , list of labels (Required)

Speakerphone Page

configuration

Successful response
{
	"extensions":[
		"106",
		"107",
		"108"
	]
}

edit

Arguments

extensions

Comma separated , list of extensions

quiet

Quiet mode (1 or 0)

BLF List

configuration

Successful response
{
	"exts":[
		"122",
		"123"
	],
	"labels":[
		"Test",
		"Test 1"
	],
	"blfs":[
		1,
		0
	],
    "blf_start": 1,
    "blf_cleanup": 1,
    "cart_only": 0
}

edit

Arguments

exts

Comma separated , list of extensions

labels

Comma separated , list of labels

blfs

Comma separated , list of BLFs

blf_start

BLF start (number, 2 digits max)

blf_cleanup

Clear unused (1 or 0)

cart_only

Cart Only (1 or 0)

Speed Dial

configuration

Successful response
{
	"codes":[
		"11",
		"22"
	],
	"names":[
		"test1",
		"test2"
	],
	"destinations":[
		"106",
		"107"
	]
}

edit

Arguments

codes

Comma separated , list of codes (Required)

names

Comma separated , list of names (Required)

destinations

Comma separated , list of destinations (Required)

destinations, names and codes lists must match in size otherwise error will be returned.

Instant Recording

configuration

Successful response
{
	"silent":"0"
}

edit

Arguments

silent

Silent yes or no 1 or 0

Reset Inclusive Minutes

Arguments
id

Extension ID

ext

Extension Number

  • Note: You cannot supply id and ext at the same time!

Successful response
{
    "success": "Inclusive Minutes for Extension ID '5259' resetted successfully."
}

Delete Extension Voicemails

WARNING
This API call will delete ALL voicemails for the given extension!
Arguments
server

Tenant ID (Required)

  • If PBXware is not running in Tenant Mode, Tenant ID should be set to 1.

ext

Extension number (Required)

Successful Response
{
    "success": "Voicemails for extension 100 deleted successfuly!"
}

Trunks

Supported Methods
list

List Trunks

configuration

Trunk Configuration

add

Add new Trunk

edit

Edit existing Trunk

providers

List Trunk Providers

Listing Trunks

Arguments
server

Filter trunks by server (does not apply in Tenant Mode)

Response will consist of an array of trunks with array key being the Trunk ID.

Response fields
name

Trunk Name

protocol

Protocol

provider_id

Provider ID

provider_name

Provider Name

status

Either enabled or disabled

Response
{
    "6099": {
        "name": "test",
        "protocol": "zaptel",
        "provider_id": "12",
        "provider_name": "Generic Analog",
        "status": "disabled"
    }
}

Adding Trunks

Arguments
server

Tenant/Server ID (Required)

name

Full Name (Required)

provider_id

Provider ID (SIP only) (Required)

type

Trunk type (user, friend, peer) (Required)

dtmfmode

DTMF mode (auto, inband, rfc2833, info, shortinfo) (Required)

status

Status (active, not active, suspended) (Required)

qualify

Qualify

country

Country code (Required)

national

National (Required)

international

International (Required)

passthru_mode

Pass-thru mode

national_leave

Leave national

area_code

Area code

emerg_trunk

Emergency trunk (Required)

e164a

E164 Accepted

prefix

Prefix

testnum

Test number

host

Host (Required)

username

Username (Required)

secret

Secret (Required)

peer_host

Peer host (Required)

peer_username

Peer username (Required)

peer_secret

Peer secret (Required)

authname

Authname

auth

Auth

register

Register

register_suffix

Register suffix

register_expiration

Register expiration time

insecure

Insecure (port|invite|port,invite|very) (Required)

fromuser

From user

fromdomain

From domain

phoneinuri

User=phone in URI

outboundproxy

Outbound proxy

looserouting

Loose routing (yes|no|1|0) (Required)

from_ipaddr

Incoming IP addresses separated by comma (,)

transport

Transport (udp, tcp, tls)

encryption

Encryption

direct_media

Direct media (no|yes|nonat|update|nonat,update)

directrtpsetup

Direct RTP setup (yes, no)

defaultip

Default IP

trustrpid

Trust RPID

sendrpid

Send RPID

trust_id_outbound

Send Caller ID in RPID for Anonymous calls

rpid_connectedline

Connected Line Updates

rpid_update

RPID with SIP UPDATE

sendpai

Send PAI header

privacy

Specify privacy (none, anonymous, anonymous_id, anonymous_number, anonymous_number_id)

callerid

Caller ID

dialed_num_minimum_length

Dialed number minimum length

allow_es_callerid

Allow enhanced services callerid

incominglimit

Incoming limit (Required)

outgoinglimit

Outgoing limit (Required)

busylevel

Busy level (Required)

email_on_limit

Email on limit

outgoing_dialoptions

Outgoing dial options

videosupport

Video support

autoframing

Autoframing

codecs

Allowed codecs separated with ,: ulaw:alaw:g723.1:g726:g729:gsm:ilbc:speex:lpc10:h261:h263:h263p (Required)

codecs_ptime

Ptime (10, 20, 30 … 300) (Required)

Successful response
{
    "success": "Trunk ID: 10",
    "id": 10
}

Editing Trunks

Arguments are identical to the ones in Adding Trunks section. All of them are optional, except:

server

Server ID

id

Trunk ID

Successful response
{
    "success": "Trunk ID: 10",
    "id": 10
}

Trunk Configuration

Arguments
trunkid

ID of a trunk (Required)

server

ID of a tenant (Required)

Response fields
name

Extension Name

provider_id

Provider ID

provider_name

Provider Name

status

Either enabled or disabled

protocol

Protocol

options

Array of configuration options

Response
{
    "2316": {
        "name":"TestSIP",
        "provider_id":"19",
        "provider_name":"SIP-Provider",
        "status":"1",
        "protocol":"sip",
        "options": {
            "type":"user",
            "dtmfmode":"rfc2833",
            "context":"TestSIP",
            "transport":"udp",
            "canreinvite":"0",
            "qualify":"0",
            "host":"test",
            "incominglimit":"1",
            "outgoinglimit":"1",
            "username":"TestSip",
            "secret":"test",
            "insecure":"port,invite",
            "allow":["ulaw,10","opus,20"],
            "addconfig_sipheader":"TestHeader: 123",
            "register":"0",
            "register_suffix":"1",
            "register_expiration":"5",
            "country":"135",
            "national":"0",
            "international":"00",
            "e164a":"0",
            "fromuser":"101",
            "fromdomain":"123",
            "allow_es_callerid":"1",
            "additional_config":"test",
            "prefix":"1",
            "testnum":"1",
            "callerid":"677",
            "sendpai":"test"
        }
}

Listing Providers

Arguments
server

Listing trunk providers

Response will consist of an array of providers with Name and ID, with array key being Provider Name.

Successful response
{
  "Generic Analog": "12",
  "Generic T1": "13",
  "Generic E1": "14",
  "Sangoma": "17",
  "SIP-Provider": "19",
  "Xorcom": "20",
  "Generic SIP": "22",
  "TestDAHDI": "23"
}

SMS

Supported Methods
trunks

SMS Trunks management

trunks.tenants

SMS Trunks & Tenants management

SMS Trunks

Supported Methods
list

List SMS Trunks

configuration

Configuration of specific SMS Trunk

add

Add SMS Trunk

edit

Edit SMS Trunk

delete

Delete SMS Trunk

Listing SMS Trunks

Response will consist of an array of SMS trunks with array key being the Trunk ID.

Response fields
name

SMS Trunk Name

provider

SMS Provider

Response
{
	"1": {
		"name": "SMS Trunk 1",
		"provider": "telnyx"
	},
	"3": {
		"name": "SMS Trunk 3",
		"provider": "bandwidth"
	}
}

SMS Trunk Configuration

Arguments
id

ID of an SMS Trunk (Required)

Response fields
id

SMS Trunk ID

enabled

Enabled (1/0)

name

SMS Trunk Name

provider

SMS Trunk Provider

description

SMS Trunk description

The rest of the response fields depend on the Trunk Provider. The request will return the same trunk information that is sent via the Add/Edit request.

Response
{
	"id": 3,
	"enabled": 1,
	"conn_name": "SMS Trunk 1",
	"provider": "telnyx",
	"description": "Test SMS Trunk for API",
	"api_key": "ThisIsApiKey",
	"public_key": "ThisIsPublicKey",
	"messaging_profile_id": "ThisIsMessagingProfileId"
}

Adding SMS Trunk

Arguments
enabled

Enabled (On=1, Off=0) (Required)

name

SMS Trunk Name (Required)

provider

SMS Trunk Provider (telnyx, bandwidth, twilio, vi) (Required)

description

SMS Trunk Description

Based on provider, one needs to enter additional arguments.

Telnyx
api_key

Telnyx API Key (Required for Telnyx)

public_key

Telnyx Public Key (Required for Telnyx)

messaging_profile_id

Telnyx Messaging Profile ID (Required for Telnyx)

Bandwidth
username

Bandwidth Username (Required for Bandwidth)

password

Bandwidth Password (Required for Bandwidth)

user_id

Bandwidth User ID (Required for Bandwidth)

app_id

Bandwidth APP ID (Required for Bandwidth)

Twilio
account_sid

Twilio Account SID (Required for Twilio)

auth_token

Twilio authorization token (Required for Twilio)

Voip Innovations
secret

Voip Innovations secret (Required for Voip Innovations)

login

Voip Innovations login (Required for Voip Innovations)

Successful response
{
	"success": "SMS Trunk ID: 10",
	"id": 10
}

Editing SMS Trunk

Arguments are identical to the ones in Adding SMS Trunk section. All of them are optional, except:

id

SMS Trunk ID

In case when value for parameter provider is changed, required fields are all fields for newly selected provider

Successful response
{
	"success": "Extension ID: 10",
	"id": 10
}

Deleting SMS Trunk

Arguments

In order to delete an SMS Trunk, one has to specify:

id

SMS Trunk ID

Successful response
{
	"success": "Deleted SMS Trunk ID '10' successfully."
}

SMS Trunks & Tenants

Supported Methods
list

List SMS Trunks & Tenants

get

Get Tenant’s SMS Trunk

set

Set Tenant’s SMS Trunk

Listing SMS Trunks & Tenants

Successful Response
{
	"2": {
		"id": null,
		"enabled": null,
		"name": null,
		"provider": null
	},
	"5": {
		"id": "3",
		"enabled": "1",
		"name": "Bandwidth",
		"provider": "bandwidth"
	}
}

Get Tenant’s SMS Trunk

Arguments
tenant

Tenant ID (Required)

Succesful Response
{
	"id": "3",
	"enabled": "1",
	"name": "Bandwidth",
	"provider": "bandwidth"
}

Set Tenant’s SMS Trunk

Arguments
tenant

Tenant ID (Required)

id

SMS Trunk ID

Succesful Response
{
	"success": "Success."
}

DIDs

Supported Methods
list

List DIDs

add

Add new DID

edit

Edit existing DID

delete

Delete existing DID

Listing DIDs

Listing of DIDs, by default, will include all DIDs.

Arguments
server

Filter DID list by Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

ext

Filter DID list by Destination Number

Response will consist of an array of DIDs with array key being the DID ID.

Response fields
number

DID number

number2

DID end number (if in range)

server

ID of Server/Tenant

trunk

ID of Trunk

type

Destination type

ext

List of Destination numbers (separated by ,)

e164

E.164 number (start)

e164_2

E.164 number (end)

status

Either enabled or disabled

sms_enabled

Either 1 (enabled) or 0 (disabled)

Response
{
    "7": {
        "number": "1212400700",
        "number2": "",
        "server": "7",
        "trunk": "6099",
        "type": "Extension",
        "e164": "",
        "e164_2": "",
        "ext": "530",
        "status": "enabled",
        "sms_enabled": "1",
    }
}

Adding DIDs

Arguments
server

Tenant or Server ID (Required)

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

trunk

Trunk ID to which DID is mapped. (Required)

did

Actual DID number. (Required)

did_2

DID number (end)

groupid

DID Group ID

dest_type

Destination Type for DID. (Required)

  • 0: Extension

  • 1: Forward DID to Extension (Multi User)

  • 2: Ring Group

  • 3: IVR

  • 4: Queues

  • 5: External Number

  • 6: IVR tree

destination

DID destination. (Required)

e164

E.164 Number (start)

e164_2

E.164 Number (end)

disabled

Disable DID by default (Required)

  • 1: Disabled

  • 0: Enabled

callerid

Replace Caller ID.

splan

Service Plan

billingext (deprecated and will be soon replaced with call_rating_ext)

Billing Extension

call_rating_ext

Call Rating Extension

greeting

Greeting

stripn

Strip N digits

qprio

Queue Priority

codec

Force Codec

ringtone

Custom Ringtone

recordcall

Record Call

state_text

County

city

City

areacode

Area Code

sms_enabled

Use DID as SMS number

If adding of DID is successful a success message will be thrown, together with the DID ID.

Successful response
{
    "sucess": "DID ID: 1",
    "id": 1
}

Editing DIDs

Arguments are identical to the ones in Adding DIDs section. All of them are optional, except:

server

Tenant/Server ID

id

DID ID

Deleting DIDs

In order to delete a DID, one has to specify:

id

DID ID

server

Server/Tenant ID

  • If running in Tenant Mode make sure this is always set to 1.

Adding CLI Routing

Arguments
id

DID ID (Required)

server

Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • Server ID 1 is always assigned to Master tenant and cannot be used.

callerid

Caller ID (Required)

dest_type

Destination type (Required)

  • 0: Extension

  • 1: Multi User

  • 2: Ring Group

  • 3: IVR

  • 4: Queues

  • 5: Voicemail

  • 6: Remote Access

  • 7: Conferences

  • 8: Trunk

  • 9: Fax to E-mail

  • 10: Deny Access (No value)

  • 11: CRM Routing

destination

Destination value (Required)

  • If Destination type is Trunk, enter ID of Trunk for Destination value

  • If Destination type is CRM Routing, enter ID of CRM Routing rule for Destination value

matchexplicitly

Match explicitly (0 or 1) (Required)

Successful Response
{
    "success":"CLI Routing ID: 3.",
    "id":"3"
}

Editing CLI Routing

Arguments

Arguments are identical to the ones in Adding CLI Routing section. All of them are optional, except:

id

DID ID

server

Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • Server ID 1 is always assigned to Master tenant and cannot be used.

cliroutingid

CLI Routing ID

Successful Response
{
    "success":"CLI Routing ID: 3.",
    "id":"3"
}

Listing CLI Routing

Arguments
id

DID ID

server

Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • Server ID 1 is always assigned to Master tenant and cannot be used.

Successful Response
{
    "25":
    {
        "callerid":"12334455",
        "ext":"9999966",
        "type":"network user (Forward DID)",
        "matchtype":"1"
    },
    "52":
    {
        "callerid":"1234%",
        "ext":"100",
        "type":"network user",
        "matchtype":"0"
    }
}

Deleting CLI Routing

Arguments
id

DID ID

server

Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • Server ID 1 is always assigned to Master tenant and cannot be used.

cliroutingid

CLI Routing ID

Successful Response
{
    "success":"CLI Routing successfully deleted!"
}

DID Groups

Supported Methods
list

List DID Groups

add

Add new DID Group

edit

Edit existing DID Group

delete

Delete existing DID Group

Listing DID groups

Listing of DID groups, by default, will include all DID groups.

Response
{
   "1": {
        "group_name": "Group 1",
        "max_did": "2000",
        "min_did": "1000",
        "tenant": "2"
    }
}

Adding DID Groups

Arguments
server

Always must be set to 1. (Required)

group_name

DID Group Name (Required)

tenantid

Tenant ID that DID group is mapped to. (Required)

min_did

DID Group range start (Required)

max_did

DID Group range end (Required)

If adding of DID Group is successful a success message will be thrown, together with the DID Group ID.

Successful response
{
    "sucess": "DID Group ID: 1",
    "id": 1
}

Editing DID Groups

Arguments are identical to the ones in Adding DID Groups section. All of them are optional, except:

server

Always must be set to 1.

id

DID Group ID

Deleting DID Groups

In order to delete a DID, one has to specify:

id

DID Group ID

server

Always must be set to 1.

IVRs

Supported Methods
list

List IVRs

add

Add new IVR

edit

Edit existing IVR

delete

Delete existing IVR

Listing IVRs

Listing of IVRs, by default, will include all IVRs.

If you wish to filter by server/tenant, you have to specify correct server argument. List of Tenant IDs, you can fetch from tenant object.

Arguments
server

Filter IVR list by Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

Response will consist of an array of IVRs with array key being the IVR ID.

Response fields
name

IVR name

type

IVR type

  • 0: Standard IVR

  • 1: PIN-based IVR

  • 2: Multi-digit IVR

ext

IVR extension

keymap

IVR keymaps

status

Either enabled or disabled

operator

IVR operator

Response
{
    "280": {
        "name": "TestIVR",
        "type":	"0",
        "ext": "103",
        "keymap": {
        	"type": "Extension",
        	"value": "100"
        },
        "status": "enabled",
        "operator": ""
    }
}

Adding IVRs

Arguments
server

Tenant or Server ID (Required)

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

name

IVR name. (Required)

  • No spaces are allowed at the moment.

ext

IVR extension. (Required)

greeting

IVR Greeting (Required)

  • All greetings must begin with greeting-.

keymap

Array of IVR keymaps (At least one keymap is required)

  • This argument is to be sent as keymap[key][field]=value

  • Supported keys:

    • 0-9

    • \*

  • Supported fields:

    • type: Destination Type

    • destination: Destination (can be any valid extension)

  • Supported Destination Types:

    • aa: IVR

    • qu: Queue

    • cf: Conference

    • ex: Extension

    • vm: Voicemail

    • aatree: IVR tree

  • Example:

    • keymap[\*][type]=aa&keymap[\*][destination]=103

status

IVR status

  • 1: Enabled

  • 0: Disabled

operator

Operator extension

disablecid

Disable CallerID (PIN-based IVR only)

tresponse

Response timeout (in seconds)

  • Default is 4.

rtpdelay

RTP Delay (in seconds)

tdigit

Digit timeout (in seconds)

  • Default is 1.

rings

Rings to Answer

  • Default is 1.

faxemail

FAX Email

customring

Custom ring tone

local2fax

FAX dialing

rangelimit

Enable range limit

rangestart

Start at

rangeend

End at

ringtype

Ringing Type

  • ring: Generate Ringing

  • moh: Music on Hold

  • none: None

  • Default is ring.

moh

Music on Hold class

  • Applies only if ringtype is set to moh.

loops

Number of loops before timoeut

  • Default is 3.

timeoutext

Timeout Extension

timeoutextvm

Timeout Extension Is Voicemail

localdial

Local/Remote dialing

  • 1: Enabled

  • 0: Disabled

  • It is disabled by default.

If adding of IVR is successful a success message will be thrown, together with the IVR ID.

Successful response
{
    "sucess": "IVR ID: 100",
    "id": 100
}

Editing IVRs

Arguments are identical to the ones in Adding IVRs section. All of them are optional, except:

server

Tenant/Server ID

id

IVR ID

Deleting IVRs

In order to delete an IVR, one has to specify:

id

IVR ID

server

Server/Tenant ID

  • If running in Tenant Mode, make sure this is always greater than 1.

Ring Groups

Supported Methods
list

List Ring Groups

add

Add new Ring Group

edit

Edit existing Ring Group

delete

Delete existing Ring Group

Listing Ring Groups

Listing of Ring Groups, by default, will include all Ring Groups.

Arguments
server

Filter Ring Group list by Server/Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

Response will consist of an array of Ring Groups with array key being the Ring Group ID.

Response fields
name

Ring Group name

ext

Ring Group extension

destinations

Ring Group destinations

last_dest

Ring Group last destination

last_dest_vm

Ring Group last destination is voicemail

Response
{
    "100": {
        "name": "TestRing Group",
        "ext": "103",
        "destinations": "100,101",
        "last_dest": "108",
        "last_dest_vm": "no"
    }
}

Adding Ring Groups

Arguments
server

Tenant or Server ID (Required)

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

name

Ring Group name. (Required)

ext

Ring Group extension. (Required)

extensions

List of all ring group extensions separated by ,

max_limit

Number of concurrent calls allowed into Ring Group (default is 1)

greeting

Ring Group Greeting

  • All greetings must begin with greeting-.

ganswer

Perform Answer on undefined greeting (Specify yes or no)

timeout_msg

Timeout message

  • All timeout messages begin with announce-.

loops

Number of Ring loops (default is 1)

timeout

Timeout for Ring Group (default is 30 seconds)

overwrite_timeout

Force Ring Group Timeout (Specify yes or no)

dial_options

Dial options (default is r)

store_cdr

Store Unanswered CDRs (Specify yes or no)

last_dest

Last Destination

last_dest_vm

Last Destination is Voicemail (Specify yes or no)

ring_strategy

Ring Strategy

  • List of available strategies:

    • all (Default)

    • leastrecent

    • round

    • round_memory

custom_ringtone

Custom Ringtone for SIP devices

callerid

Replace Caller ID

record

Record calls (Specify yes or no)

record_silent

Silent Recordings (Specify yes or no)

exit_digit

Exit Digit

exit_ext

Exit Extension

confirm_calls

Confirm Calls

confirm_msg

Confirmation Message

  • All confirmation messages begin with rg-announce-.

confirm_answered_msg

Call Answered Message

  • All call answered messages begin with rg-late-announce-.

call_rating_ext

Call Rating Extension

If adding of Ring Group is successful a success message will be thrown, together with the Ring Group ID.

Successful response
{
    "sucess": "Ring Group ID: 100",
    "id": 100
}

Editing Ring Groups

Arguments are identical to the ones in Adding Ring Groups section. All of them are optional, except:

server

Tenant/Server ID

id

Ring Group ID

Deleting Ring Groups

In order to delete an Ring Group, one has to specify:

id

Ring Group ID

server

Server/Tenant ID

  • If running in Tenant Mode, make sure this is always greater than 1.

Enhanced Ring Groups

Supported Methods
list

List Enhanced Ring Groups

members

Adding members to an Enhanced Ring Group

Listing Enhanced Ring Groups

Arguments
server

Filter Enhanced Ring Groups by tenant/server

Response will consist of an array of Enhanced Ring Groups with array key being the ERG ID.

Response fields
name

Enhanced Ring Group Name

number

Enhanced Ring Group Number

strategy

Strategy

members

List of members

Response
{
    "2377": {
        "name":"erg205",
        "number":"205",
        "strategy":"ringall",
        "members":[
            {
                "ext":"300",
                "penalty":"5"
            },
            {
                "ext":"303",
                "penalty":"10"
            }
        ]
    },
    "2378": {
        "name":"erg206",
        "number":"206",
        "strategy":"ringall",
        "members":[
            {
                "ext":"308",
                "penalty":"5"
            },
            {
                "ext":"307",
                "penalty":"10"
            }
        ]
    },
}

Adding Members

Arguments
server

Tenant/Server ID (Required)

id

ID of an Enhanced Ring Group (Required)

numbers

List of extension numbers separated with , (Required)

penalties

List of penalties separated with , (Required)

Successful response
{
    "success": "ERG ID: 2378",
    "id": 2378
}

CDRs

Supported Methods
download

Download CDRs

billamount

Returns sum of billing amounts

Downloading CDRs

CDRs are filtered by the required arguments.

Arguments
start

Start Date (Required)

  • Format is: mmm-dd-YYYY (eg: Feb-01-2009)

starttime

Start Time

  • Format is: hh:mm:ss (eg:23:59:59)

  • Default value is 00:00:00

end

End Date (Required)

  • Format is: mmm-dd-YYYY (eg: Feb-28-2009)

endtime

End Time

  • Format is: hh:mm:ss (eg:23:59:59)

  • Default value is 23:59:59

ext

Source extension

  • You can filter by multiple destinations separated by comma (100,120)

  • Defaults to all extensions/numbers

extdst

Destination extension

  • You can filter by multiple extensions separated by comma (100,120)

  • Defaults to all extensions/numbers

trunk

Source Trunk ID

  • Note: You cannot supply trunk and ext at the same time!

  • Defaults to all trunks, unless otherwise specified

trunkdst

Destination Trunk ID

  • Note: You cannot supply trunkdst and extdst at the same time!

  • Defaults to all trunks, unless otherwise specified

page

CDR page

  • Download CDRs from relevant page (depends on limit argument)

  • Default is to download first page

  • Total number of pages is not available, look for next_page in response

limit

Limiting records per page

  • You can limit number of CDRs to download (per page, default page is 1)

  • Default value is 16

  • Maximum value you can set is: 1000

server

Filtering records per server

  • You can filter CDRs by Server ID

status

Filtering records by call status

  • You can filter CDRs by call status

  • Status values (8 ⇒ “Answered”, 4 ⇒ “Unanswered”, 2 ⇒ “Busy”, 1 ⇒ “Failed”)

cdrtype

Filtering records by CDR type

  • Type values (1 ⇒ “Incoming”, 2 ⇒ “Outgoing”, 3 ⇒ “All”)

timezone

Time Zone to apply when searching CDRs

  • Ex: “America/New_York”

Response will consist of an array of CDRs.

Response fields
next_page

Lets you know if there is next page of records available

limit

Current limit of records per page

records

Total number of records in csv array

csv

Records array

  • Fields are sorted in the following order:

    • From

    • To

    • Start Date [Unix timestamp]

    • Duration [Number of seconds]

    • Billing duration [Number of seconds] (Only in Billing mode)

    • Cost of the call (Only in Billing mode)

    • Status

    • UniqueID

Response
{
    "success": "Sucess.",
    "next_page": false,
    "limit": 16,
    "records": 2,
    "csv": [
        [
            "Test (1000)",
            "Test (1002)",
            "1246462678",
            "6",
            "6",
            "1.00000",
            "Answered",
            "1368458822.12"
        ],
        [
            "107",
            "Test (1000)",
            "1246439020",
            "6",
            "1",
            "1.00000",
            "Answered",
            "1368458765.9"
        ]
    ]
}

CDR Billamount

Arguments are identical to the ones in Downloading CDRs section.

Response fields
billamount

Billing amount

Response
{
    "billamount": 8
}

Routes

Supported Methods
list

List Routes

Listing Routes

Response will consist of an array of routes.

Response
{
    "1": "Afghanistan",
    "3": "Albania (Republic of)",
    "6": "Algeria (People's Democratic Republic of)",
    "9": "American Samoa",
    "13": "Andorra (Principality of)",
    "15": "Angola (Republic of)",
    "17": "Anguilla",
    "67": "Antarctica",
    "875": "Antigua & Barbuda",
    "71": "Argentina",
    "85": "Armenia (Republic of)",
    "88": "Aruba",
    "90": "Ascension Island",
    "91": "Australia",
    "94": "Austria"
}

Operation Times

Operation Times exist for the following: DIDs, IVRs, Dial Groups, Server/Tenants, Routes, Queues and Enhanced Ring Groups.

Actions
action=pbxware.otimes.did

Operation Times action URL for DIDs

action=pbxware.otimes.ivr

Operation Times action URL for IVRs

action=pbxware.otimes.dial_group

Operation Times action URL for Dial Groups

action=pbxware.otimes.servers

Operation Times action URL for Server/Tenants

action=pbxware.otimes.routes

Operation Times action URL for Routes

action=pbxware.otimes.queues

Operation Times action URL for Queues

action=pbxware.otimes.erg

Operation Times action URL for Enhanced Ring Groups

Each of those destinations Operation Times are a state, which means that you can list the current state of the destinations or set the entire state of the destination Operation Times.

Supported Methods
list

Listing the state of Operation Times

set

Set the state of Operation Times

Listing Operation Times state

Example request:

http://pbxware.lan/?apikey=yf2gV1sTzWmhUwI6V5quzKBv9FA0VbzW&action=pbxware.otimes.erg.list&id=12451
Request fields
id

Request the Operation Times state by destination ID (most of destionation supports this)

number

Request the Operation Times state by destination number (used for example with Queues)

ext

Request the Operation Times state by destination extension (used for DIDs)

server

Request the Operation Times state by destination server ID (used with MT systems in combination with other fields)

Depending on what object OT is being requested and whether the instance is Multi tenant one, one or two request fields might be used.

Response fields
status

Status of the Operation Times, can be: On, Off, Inherit

greeting

Greeting sound file being played during Closed Dates

default_dest_ext

Default extension to which all calls will be redirected in case the call comes outside the working hours

default_dest_is_vm

Default extension is Voicemail or not

closed_dates

Contains list of Closed Dates settings

description

Description of the closed date setting

destination

Extension to which all calls to this destination will go when this closed date is effective

date_from

Date from

date_to

Date to

time_from

Time from

time_to

Time to

custom_destinations

Contains list of Custom Destinations settings

destination

Destination of the custom destination setting

is_open_range

Whether the custom destination is Open range

days

Days in the week during which this custom destination applies

time_from

Time from

time_to

Time to

open_days

Contains list of Open Days settings

description

Description of the open days setting

days

Days in the week during which Open days setting applies

time_from

Time from

time_to

Time to

Response
{
    "12451":
    {
        "status":"on",
        "greeting":"greeting-Mar-27-2013-15-15-44",
        "default_dest_ext":"103",
        "default_dest_is_vm":"yes",
        "closed_dates":
        [
            {
                "description":"Closed #1",
                "destination":"100",
                "date_from":"2022-05-05",
                "date_to":"2022-05-06",
                "time_from":"00:00",
                "time_to":"06:00"
            }
        ],
        "custom_destinations":
        [
            {
                "destination":"104",
                "is_open_range":"yes",
                "days":"1,2,3,4,5",
                "time_from":"08:00",
                "time_to":"17:00"
            }
        ],
        "open_days":
        [
            {
                "description":"Open1",
                "days":"1,2,6",
                "time_from":"01:01",
                "time_to":"21:56"
            }
        ]
    }
}

Setting Operation Times

Most of the arguments bellow can be used with all destination Operation Times. Some of them are destination specific.

Example request:

http://pbxware.lan/?apikey=yf2gV1sTzWmhUwI6V5quzKBv9FA0VbzW&action=pbxware.otimes.erg.set&id=174&server=3&status=on&default_dest_ext=123&greeting=greeting-Mar-27-2013-15-15-44&pin=668&open_days_desc[]=TheOpen1&open_days[]=1,2,6&open_days_time_from[]=08:00&open_days_time_to[]=16:30&open_days_desc[]=TheOpen2&open_days[]=3,4&open_days_time_from[]=08:30&open_days_time_to[]=17:00
Arguments
id

Destination ID to edit

server

Tenant ID on MT systems

status

Status of the Operation Times

greeting

Greeting sound file

pin

PIN number used for Routes Operation Times only

default_dest_ext

Default extension to which all calls will be redirected

default_dest_is_vm

Default extension is Voicemail or not

closed_dates_desc[]

Ordered descriptions of the closed dates settings

closed_dates_dest[]

Ordered extensions of the closed dates settings

closed_dates_date_from[]

Ordered From dates of the closed dates settings

closed_dates_date_to[]

Ordered To dates

closed_dates_time_from[]

Ordered From time

closed_dates_time_to[]

Ordered To time

custom_destinations_dest[]

Ordered destinations of the custom destinations settings

custom_destinations_is_open[]

Ordered opened status of the custom destinations settings

custom_destinations_days[]

Ordered days in the week of the custom destinations settings

custom_destinations_time_from[]

Ordered time from of the custom destinations settings

custom_destinations_time_to[]

Ordered time to of the custom destinations settings

open_days_desc[]

Ordered description of the open days settings

open_days[]

Ordered days in the week of the open days settings

open_days_time_from[]

Ordered time from of the open days settings

open_days_time_to[]

Ordered time to of the open days settings

Important note

When setting up Closed Dates it is important that dates follow the yyyy-mm-dd format. For example: 2023-02-20

Tenant Packages

Supported Methods
configuration

Tenant Package Configuration

list

List Tenant Packages

add

Add new Tenant Package

edit

Edit existing Tenant Package

delete

Delete existing Tenant Package

Tenant Package Configuration

Response will consist of an array of tenant package configuration.

Response fields
name

Tenant Package Name

service_plan

Default Service Plan

restrict_splans

Restrict Service Plans

allowed_service_plans

Allowed Service Plans

call_recordings

Call Recordings

monitoring

Call Monitoring

call_screening

Call Screening

ext

Extensions

cf

Conferences

hot_desking

Hot Desking

ivr

IVRs

queues

Queues

rgroups

Ring Groups

voicemail

Voicemails

Listing Tenant Packages

Response will consist of an array of tenants with array key being the Tenant Package ID.

Response fields
name

Tenant Package Name

Response
{
  "1": "Package 1",
  "2": "Package 2",
  "3": "Package 3",
}

Adding Tenant Packages

Arguments
name

Tenant Package Name (Required)

restrict_splans

Restrict Service Plans (This field is required if billing is turned on in license)

allowed_service_plans

Allowed Service Plans (Required if restrict service plan is set to yes ( 1 ))

service_plan

Default Service Plan

call_recordings

Country ID (Required)

monitoring

Area Code (Required)

call_screening

National Code (Required)

extensions

Extensions (Required)

voicemails

Voicemails (Required)

queues

Queues (Required)

cfs

Conferences (Required)

rgroups

Ring Groups (Required)

hot_desking

Hot Desking (Required)

ivrs

IVRs (Required)

Successful Response
{
    "success": "Tenant package: 6",
    "id": 6
}

Editing Tenants

Arguments

Arguments are identical to the ones in Adding Tenant Packages section. All of them are optional, except:

server

Server ID which must be set to 1

id

Tenant Package ID

Successful Response
{
    "success": "Tenant package: 6",
    "id": 6
}

Deleting Tenant Packages

Arguments
server

Server ID which must be set to 1

id

Tenant Package ID

Successful Response
{
    "success":"Tenant package ID: 6.",
    "id":"6"
}

Tenants

Supported Methods
configuration

Tenant Configuration

list

List Tenants

add

Add new Tenant

edit

Edit existing Tenant

delete

Delete existing Tenant

trunks.list

List Trunks & Tenants

trunks.set

Set Trunks & Tenants

Tenant Configuration

Response will consist of an array of tenant configuration.

Response fields
tenant_name

Tenant Name (Required)

  • Should be a valid FQDN (Fully Qualified Domain Name)

tenant_code

Unique 3-digit Tenant Code (Required)

package

Tenant Package ID (Required)

  • Can be obtained with package object

ext_length

Extensions length (Required)

  • Can be in range 2-16 ONLY

country

Country ID (Required)

  • Can be obtained with route object

area_code

Area Code (Required)

national

National Code (Required)

international

International Code (Required)

glocom_dns_srv_lookup

gloCOM Use DNS SRV Lookup

glocomproxy

gloCOM SIP Proxy

apusername

HTTP username

appassword

HTTP password

defaultserver

Default Server

announcetrunks

Announce Trunks

absolutetimeout

Absolute Timeout

cdrvoicemail

Voicemail in CDRs

faxformat

FAX page format

faxfiletype

FAX file type

enabletcalls

Enable Tenant to Tenant calls

disabletcid

Disable CallerID rewrite for tenant to tenant calls

tenantcid

Default CallerID

tenant_faxcid

Default Fax CallerID

usedefaultcid

Use Default CallerID for tenant to tenant calls

usedidcid

Use DIDs as CallerID for tenant to tenant calls

finde164

Find E.164 numbers in DIDs

recordlimit

Number of objects per page (Default: 10)

showdirosc

Show Directory in OSC

recordglobal

Record calls by default

recordsilent

Silent recording by default

mp3_auto_conv

Convert recordings to mp3 on generation.

recordbeep

Play Periodic Beep

recordformat

Recordings format

audiolang

Audio Language

cpark_timeout

Enhanced Call Parking Timeout (sec)

cpark_dial

Enhanced Call Parking Announce Extension

cpark_goto

Enhanced Call Parking Timeout Extension

limitsound

Play Sound

limitemail

International Code (Required)

notifyemail

International Code (Required)

leavenational

Leave National Code

currency

Currency symbol/ISO code

currencypos

Currency writing convention

  • left: Symbol before amount

  • right: Symbol after amount

dialed_num_minimum_length

Dialed number minimum length

pstn_mode

PSTN numbering mode

callgroups

Call groups/Pickup Groups (comma separated)

incominglimit

Local Channels

outgoinglimit

Remote Channels

conch

Conference channels

quech

Queue channels

ergch

Enhanced Ring Groups channels

aach

Auto Attendants channels

zapch

DAHDI channels

localcodecs

Local Codecs

remotecodecs

Remote Codecs

networkcodecs

Network Codecs

hdcheck

Login Attempts Check

hdlockext

Lock Extension After X Failed Attempts

hdlockdevice

Lock Phone After X Locked Extensions

hdautologout

Automatic Log Out

hdlogoutinactive

Log Out After X Hours of Inactivity

ringtonelocal

Ringtone for Local calls

hidecallerid

Hide CallerID in OSC

allowescallerid

Allow ES CallerID” for Call Forwarding

enablecnamlookup

Enable CallerID CNAM lookup

setcidforgrouphunt

Set CallerID for Group Hunt calls

cidmatchdid

Only Allow Trunk CallerID within DID range

dropanonymous

Drop Anonymous calls

didsaveupdatecid

On DID save update ES/CID/Trunks

forceunknown

Do not allow users sending any CallerID

hideextnodir

Hide Extensions with no department (gloCOM)

custompresencetime

gloCOM presence offline delay (min)

usedynfeatures

Use Dynamic Features

nobillingfwd (deprecated and will be soon replaced with cf_call_rating_disable)

Disable Billing for Call Forwarding

cf_call_rating_disable

Disable Call Rating for Call Forwarding

Listing Tenants

Response will consist of an array of tenants with array key being the Tenant ID.

Response fields
name

Tenant Name

tenantcode

Unique Tenant Code

package

Tenant Package ID

ext_length

Extensions length

country_id

Tenant Country ID

country_code

Tenant Country Code

Response
{
	"2": {
		"name": "t1.dot.com",
		"tenantcode": "344",
		"package_id": "1",
		"package": "Package 1",
		"ext_length": 3,
		"country_id": "869",
		"country_code": "1",
	},
	"7": {
		"name": "t2.dot.com",
		"tenantcode": "454",
		"package_id": "2",
		"package": "Package 2",
		"ext_length": 3,
		"country_id": "869",
		"country_code": "1",
	}
}

Adding Tenants

Arguments
tenant_name

Tenant Name (Required)

  • Should be a valid FQDN (Fully Qualified Domain Name)

tenant_code

Unique 3-digit Tenant Code (Required)

package

Tenant Package ID (Required)

  • Can be obtained with package object

ext_length

Extensions length (Required)

  • Can be in range 2-16 ONLY

country

Country ID (Required)

  • Can be obtained with route object

area_code

Area Code

national

National Code (Required)

international

International Code (Required)

glocom_dns_srv_lookup

gloCOM Use DNS SRV Lookup

glocomproxy

gloCOM SIP Proxy

apusername

HTTP username

appassword

HTTP password

defaultserver

Default Server

announcetrunks

Announce Trunks

absolutetimeout

Absolute Timeout

cdrvoicemail

Voicemail in CDRs

  • 2: As Voicemail

  • 1: As Not Answered calls

  • 0: As Answered calls

faxformat

FAX page format

  • letter

  • legal

  • A4

  • auto

faxfiletype

FAX file type

  • 1: Both PDF and TIFF

  • 2: Only PDF

  • 3: Only TIFF

default_location

Default Extension Location (Local=1, Remote=2)

enabletcalls

Enable Tenant to Tenant calls

disabletcid

Disable CallerID rewrite for tenant to tenant calls

tenantcid

Default CallerID

tenant_faxcid

Default Fax CallerID

usedefaultcid

Use Default CallerID for tenant to tenant calls

usedidcid

Use DIDs as CallerID for tenant to tenant calls

finde164

Find E.164 numbers in DIDs

recordlimit

Number of objects per page (Default: 10)

showdirosc

Show Directory in OSC

recordglobal

Record calls by default

recordsilent

Silent recording by default

mp3_auto_conv

Convert recordings to mp3 on generation.

recordbeep

Play Periodic Beep

recordformat

Recordings format

  • gsm: GSM

  • wav: WAV

  • wav49: WAV49

  • g729: G729 native → GSM

  • ogg: OGG

audiolang

Audio Language

cpark_timeout

Enhanced Call Parking Timeout (sec)

cpark_dial

Enhanced Call Parking Announce Extension

cpark_goto

Enhanced Call Parking Timeout Extension

limitsound

Play Sound

limitemail

International Code (Required)

notifyemail

International Code (Required)

leavenational

Leave National Code

currency

Currency symbol/ISO code

currencypos

Currency writing convention

  • left: Symbol before amount

  • right: Symbol after amount

dialed_num_minimum_length

Dialed number minimum length

pstn_mode

PSTN numbering mode

callgroups

Call groups/Pickup Groups (comma separated)

localcodecs

Local Codecs

remotecodecs

Remote Codecs

networkcodecs

Network Codecs

hdcheck

Login Attempts Check

hdlockext

Lock Extension After X Failed Attempts

hdlockdevice

Lock Phone After X Locked Extensions

hdautologout

Automatic Log Out

hdlogoutinactive

Log Out After X Hours of Inactivity

ringtonelocal

Ringtone for Local calls

hidecallerid

Hide CallerID in OSC

allowescallerid

Allow ES CallerID” for Call Forwarding

enablecnamlookup

Enable CallerID CNAM lookup

setcidforgrouphunt

Set CallerID for Group Hunt calls

cidmatchdid

Only Allow Trunk CallerID within DID range

dropanonymous

Drop Anonymous calls

didsaveupdatecid

On DID save update ES/CID/Trunks

forceunknown

Do not allow users sending any CallerID

hideextnodir

Hide Extensions with no department (gloCOM)

custompresencetime

gloCOM presence offline delay (min)

usedynfeatures

Use Dynamic Features

nobillingfwd (deprecated and will be soon replaced with cf_call_rating_disable)

Disable Billing for Call Forwarding

cf_call_rating_disable

Disable Call Rating for Call Forwarding

jbimpl

Jitter Buffer (inherit, disabled, fixed, adaptive)

jbmaxsize

Max length (ms)

jbresyncthreshold

Re-sync threshold

jbtargetextra

Target extra

allowextipauth

Allow IP Address Authentication for Extensions (Yes=1, No=0)

voiceskippin

Skip Voicemail PIN Prompt (Yes=1, No=0)

email_from

From E-mail

vm_email_from

Voicemail From E-mail

local_channels

Local Channels

remote_channels

Remote Channels

conferences

Conferences

queues

Queues

auto_attendants

Auto Attendants

dahdi

DAHDI

dids_notify_email

Notification E-mail

dids_notify_order

Order By

es_ambulance

Ambulance

es_fire

Fire

es_police

Police

es_notification_email

Notification E-mail

ldap_enabled

Enable LDAP (Yes=1, No=0)

ldap_local_exts

Include System Extensions:(Yes=1, No=0, Not set=”)

ldap_hotdesking

Enable LDAP For Hot Desking Devices:(Yes=1, No=0, Not set=”)

ldap_password

LDAP password

Successful Response
{
	"success": "Tenant ID: 10",
	"id": 10
}

Editing Tenants

Arguments
status

Status (Not Active=0, Active=1, Suspended=2)

The rest of the arguments are identical to the ones in Adding Tenants section, except ext_length which cannot be changed. All of them are optional, except:

server

Server ID which must be set to 1

id

Tenant ID

Successful Response
{
	"success": "Tenant ID: 10",
	"id": 10
}

Deleting Tenants

Arguments
server

Server ID which must be set to 1

id

Tenant ID

Successful Response
{
	"success":"Deleted Tenant ID 19 successfully."
}

Listing Trunks & Tenants

Arguments
tenant

Tenant ID

Successful Response
{
	"primary_trunk":"TestSIP",
	"secondary_trunk":"TestSIP2",
	"tertiary_trunk":"TestSIP3",
	"trunks":"TestSIP,TestSIP2",
	"primary_emerg_trunk":"TestSIP",
	"secondary_emerg_trunk":"TestSIP2",
	"tertiary_emerg_trunk":"TestSIP3"
}

Setting Trunks & Tenants

Arguments
tenant

Tenant ID

trunks

List of trunk ID’s (comma separated)

primary_trunk

Primary trunk

secondary_trunk

Secondary trunk

tertiary_trunk

Tertiary trunk

primary_emerg_trunk

Primary trunk

secondary_emerg_trunk

Secondary trunk

tertiary_emerg_trunk

Tertiary trunk

Successful Response
{
	"success":"Success."
}

Adding CLI Routing

Arguments
tenant

Tenant ID (Required)

  • If PBXware is not running in Tenant Mode, Tenant ID should be set to 1.

callerid

Caller ID (Required)

dest_type

Destination type (Required)

  • 0: Extension

  • 1: Multi User

  • 2: Ring Group

  • 3: IVR

  • 4: Queues

  • 5: Voicemail

  • 6: Remote Access

  • 7: Conferences

  • 8: Trunk

  • 9: Fax to E-mail

  • 10: Deny Access (No value)

  • 11: CRM Routing

destination

Destination value (Required)

  • If Destination type is Trunk, enter ID of Trunk for Destination value

  • If Destination type is CRM Routing, enter ID of CRM Routing rule for Destination value

matchexplicitly

Match explicitly (0 or 1) (Required)

Successful Response
{
	"success":"CLI Routing ID: 3.",
	"id":"3"
}

Editing CLI Routing

Arguments

Arguments are identical to the ones in Adding CLI Routing section. All of them are optional, except:

tenant

Tenant ID

  • If PBXware is not running in Tenant Mode, Tenant ID should be set to 1.

cliroutingid

CLI Routing ID

Successful Response
{
	"success":"CLI Routing ID: 3.",
	"id":"3"
}

Listing CLI Routing

Arguments
tenant

Tenant ID (Required)

  • If PBXware is not running in Tenant Mode, Tenant ID should be set to 1.

Successful Response
{
	"25":
	{
		"callerid":"12334455",
		"ext":"9999966",
		"type":"network user (Forward DID)",
		"matchtype":"1"
	},
	"52":
	{
		"callerid":"1234%",
		"ext":"100",
		"type":"network user",
		"matchtype":"0"
	}
}

Deleting CLI Routing

Arguments
tenant

Tenant ID (Required)

  • If PBXware is not running in Tenant Mode, Tenant ID should be set to 1.

cliroutingid

CLI Routing ID (Required)

Successful Response
{
	"success": "CLI Routing successfully deleted!"
}

Servers

Supported Methods
configuration

Server Configuration

Server Configuration

Response will consist of an array of data.

Response fields
server_name

Server Name

atd

Announce Trunks

absolutetimeout

Absolute Timeout

cdrvoicemail

Voicemail in CDRs

faxformat

Fax page format

recordglobal

Record calls by default

recordsilent

Silent recording by default

insrecemailtime

Email instant recording interval (min)

recordformat

Recordings format

hidecallerid

Hide CallerID in OSC

allowescallerid

Allow ES CallerID

defcallpickupgroup

Default Call/Pickup Group

setcidforgrouphunt

Set CallerID for Group Hunt calls

map_e164

Find E.164 numbers in DIDs

recordlimit

Number of objects per page (Default: 10)

country

Country

zaptel_zone

Zaptel Zone

indications

Indications

area_code

Area code

national

National dialing code

national_leave

Leave National Code

international

International dialing code

agi_port

AGI Port

ldap_usernames

Allow LDAP usernames

email_from

From E-mail

smtp_type

Send e-mails thru

smtp_host

SMTP IP/Hostname

smtp_user

SMTP Username

smtp_pass

SMTP Password

ap_lan

LAN Hostname/IP

ap_wan

WAN Hostname/IP

incominglimit

Local Channels

outgoinglimit

Remote Channels

conch

Conferences

quech

Queues

ergch

Enhanced Ring Groups

aach

Auto Attendants

zapch

Zaptel

alias_prefix

Extensions alias prefix

alias_length

Extensions alias length

mint

Monitor (mins)

rltype

Reload type

rtype

Reload (hours)

emailto

Notification e-mail

zap_sdown

Shutdown spans on ztcfg

limit_notify_email

Notification E-mail

Response
{
    "server_name": "My Server",
    "atd": "no",
    "absolutetimeout": "86400",
    "cdrvoicemail": "0",
    "faxformat": "letter",
    "recordglobal": "yes",
    "recordsilent": "no",
    "insrecemailtime": "10",
    "recordformat": "gsm",
    "hidecallerid": "yes",
    "allowescallerid": "no",
    "defcallpickupgroup": "2",
    "setcidforgrouphunt": "yes",
    "map_e164": "yes",
    "recordlimit": "10",
    "country": "1",
    "zaptel_zone": "uk",
    "indications": "uk",
    "area_code": "0",
    "national": "00",
    "national_leave": "yes",
    "international": "00",
    "agi_port": "4573",
    "ldap_usernames": "no",
    "email_from": "s1@dot.com",
    "smtp_type": "smtp",
    "smtp_host": "out.mail.dot.com",
    "smtp_user": "bit1",
    "smtp_pass": "po12mn",
    "ap_lan": "www.dot.com",
    "ap_wan": "www.dot.com",
    "incominglimit": "246",
    "outgoinglimit": "246",
    "conch": "246",
    "quech": "246",
    "ergch": "246",
    "aach": "246",
    "zapch": "246",
    "alias_prefix": "1",
    "alias_length": "2",
    "mint": "1",
    "rltype": "none",
    "rtype": "none",
    "emailto": "john_doe@dot.com",
    "zap_sdown": "yes",
    "limit_notify_email": "john_doe@dot.com"
}

Service Plans

Supported Methods
list

List Service Plans

rates

List Service Plan Rates

Listing Service Plans

Response will consist of an array of Service Plans with array key being the Trunk ID.

Response fields
name

Service Plan Name

tbd

TBD

min_charge

Minimum charge

connection_charge

Connection charge

inclusive

Total Inclusive Minutes

grace_period

Grace Period

billing (deprecated and will be soon replaced with call_rating)

Billing

call_rating

Call Rating

Response
{
	"1": {
		"name": "Test1",
		"tbd": "0",
		"min_charge": "0.15000",
		"connection_charge": "0.00000",
		"inclusive": "0",
		"grace_period": "0",
		"billing": "1\/1",
		"call_rating": "1\/1"
	},
}

Service Plans Rates

Arguments
id

Service Plan ID (Required)

route

Route ID

dgroup

Destination Group ID

  • Note: Only if route is supplied.

Response will consist of an array of Rates with array key like “splan:route:dgroup”. If TBD exists, an subarray is created with TBD value as a key.

Response fields
inbound

Inbound Price

outbound

Outbound Price

inclusive

Total Inclusive Minutes

Response
{
"2:869:297": {
		"inbound": "7.00000",
		"outbound": "7.00000",
		"inclusives": "0"
},
"1:869:834": {
		"28795": {
			"inbound": "2.00000",
			"outbound": "1.00000",
			"inclusives": "0"
		}
}
}

Destinations

Supported Methods
list

List Destinations

groups

List Destinations Groups

Listing Destinations

Arguments
route

Route ID

dgroup

Destination Group ID

  • Note: Only if route is supplied.

Response will consist of an array of Destinations with array key being the Destination ID.

Response fields
route

Route ID

destination

Destination Name

destination_group

Destination Group ID

codes

Subarray of destination codes

Response
{
"135": {
		"route": "135",
		"destination": "GSM BiH",
		"destination_group": "1",
		"codes": [
			{
				"code1": "38762",
				"code2": ""
			},
			{
				"code1": "38761",
				"code2": ""
			}
		]
	}
}

Destinations Groups

Response will consist of an array of Destination Groups with array key being the Destination Group ID.

Response fields
name

Destination Group Name

Response
{
	"1": {
		"name": "mobile"
	},
	"2": {
		"name": "proper"
	},
	"17": {
		"name": "freephone"
	}
}

UADs

Supported Methods
list

List UADs

activate

Activate UAD

deactivate

Deactivate UAD

Listing UADs

Response will consist of an array of UADs with array key being the UAD ID.

Response fields
name

UAD Name

fullname

UAD Full Name

enabled

UAD status

Response
{
  "135": {
    "name": "yealinkt41",
    "fullname": "Yealink T41",
    "enabled": true
  },
  "136": {
    "name": "yealinkt42g",
    "fullname": "Yealink T42G",
    "enabled": false
  },
  "137": {
    "name": "yealinkt46g",
    "fullname": "Yealink T46G",
    "enabled": false
  },
}

Activating UAD

Arguments
server

Server ID

id

UAD ID

Successful Response
{
  "success": "UAD: 89.",
  "id": "89"
}

Deactivating UAD

Arguments
server

Server ID

id

UAD ID

Successful Response
{
  "success": "UAD: 89.",
  "id": "89"
}

Apps

Supported Methods
list

List Apps

Listing Apps

Arguments
server

Filter DID list by Tenant ID

  • If PBXware is running in Tenant Mode this is a required field and must contain a valid Tenant ID.

  • ID 1 is always assigned to Master tenant and cannot be used.

Response will consist of an array of Editions and Modules with array key being the Edition/Module name.

Response fields
total

Total number of available edition/module slots

in_use

Number of slots that are currently used

extensions

List of extensions that have the edition/module enabled

Response
{
  "OFFICE": {
    "total": 100,
    "in_use": 2,
    "extensions": [
      100,
      102
    ]
  },
  "BUSINESS": {
    "total": 100,
    "in_use": 2,
    "extensions": [
      100,
      102
    ]
  },
  "WEB": {
    "total": 30,
    "in_use": 3,
    "extensions": [
      100,
      101,
      102
    ]
  },
  "AGENT": {
    "total": 15,
    "in_use": 2,
    "extensions": [
      100,
      101
    ]
  },
  "SUPERVISOR": {
    "total": 5,
    "in_use": 1,
    "extensions": [
      100
    ]
  },
  "MOBILE": {
    "total": 15,
    "in_use": 2,
    "extensions": [
      100,
      101
    ]
  },
  "CRM": {
    "total": 15,
    "in_use": 3,
    "extensions": [
      100,
      101,
      102
    ]
  },
  "Call Popup": {
    "total": 15,
    "in_use": 2,
    "extensions": [
      100,
      101
    ]
  }
}

License

Supported Methods
refresh

Refresh license

last_refreshed

Last time license file was modified

info

License information

License Refresh

Response is string message with status of license refresh request.

Response fields
status

Status of license refresh request

Response
{
    "status": "License refresh request processed"
}

License last refreshed

Response fields
last_refreshed

Timestamp when license file was last modified

Response
{
    "last_refreshed": "25 Jan 2022 16:53:32"
}

License information

The response includes the system edition, version number, enabled applications and limitations that are set in the license.

Example response (in JSON format)
{
    "Edition": "Multi-Tenant",
    "Version": "6.5.0.0",
    "Channels": "512",
    "DIDs": "9999",
    "Extensions": "100",
    "Hot Desking": "9999",
    "PSTN Trunks": "20",
    "Tenants": "999",
    "VOIP Trunks": "20",
    "Archiving": "1",
    "Bas": "1",
    "Call Rating": "1",
    "Crm Routing": "1",
    "Did Multi User": "1",
    "Email To Fax": "1",
    "Ext Limits": "1",
    "Max Generic Apps": "1",
    "Pin Based Dialling": "1",
    "Presence Panel": "1",
    "Sms Bandwidth": "1",
    "Sms Module": "1",
    "Touchless Provisioning": "1",
    "Wakeupcall": "1",
    "Web Callback": "1"
}

Monitor

Supported Methods
list

List Monitor extensions

live_calls

List Live calls

Monitor extensions

Show Monitor extensions

Arguments
server

Filter extensions by tenant/server

Response fields
name

Extension Name

ext

Extension

ip

Device IP address

status

Either online or offline

ua

User-Agent

dnd

Either true or false

on_call

Either true or false

Response
{
   "123": {
	  "name": "User 530",
	  "ext": "530",
	  "ip" : "192.168.1.2",
	  "status": "online",
	  "ua" : "Yealink T41",
	  "dnd" : "false",
	  "on_call" : "true",
	}
}

Live calls

Show Live calls

Arguments
server

Filter extensions by tenant/server

Response fields
from

Extension name (extension)

to

Extension name (extension)

timestamp

Timestamp

Response
{
   "1675644925.2": {
		"from": "User1 (203)",
		"to": "User2 (210)",
		"timestamp" : "12334",
	}
}

Departments

Supported Methods
list

List Destinations

Listing Departments

Arguments
server

Filter departments by tenant/server

Response will consist of an array of Departments with array key being the Department ID.

Response fields
name

Department Name

Response
{
    "1": {
        "name": "Department1"
    },
    "2": {
        "name": "Department2"
    }
}
Partager

API

Ou copiez le lien ci-dessous

CONTENU