XC5 JSON System Provisioning API

The XC5 JSON System API provides network operators the ability to automate provisioning of the XC5 system through JSON over HTTPS.

A note on testing the API
For API testing designcom recommends and uses Postman

/api-sys/Account

Manage Accounts

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
Nametypedefaultdescription
dump-configboolean Output flat dump of account
filterstring%A LIKE clause as a filter for GET
horizontalbooleanfalsefalse: Will show only child accounts, true: Show all descendant accounts

Fields
Nametypedefaultdescription
guidstring/uniqueidentifier Unique identifier for this account
usernamestring Username used for authorization
passwordstring Authorization password.
descriptionstring Free flow description/notes
enabledboolean Activate/Deactivate the account
parentstring If set, refers to the parent this user is a child of. Users with the same parent have collective virtual PBX features. Users also inherit Location/Registration information, SpeedDials, Extension Dials, Recording, Menus etc of their immediate parent.
parentguidstring/uniqueidentifier As per parent but optionally accessed uniqueidentifier
pin_referenceboolean Every call is asked for a call reference for billing purposes. The reference is unvalidated and stored in the CDR
dndboolean Do not disturb. The account will act as if unregistered and proceed to any diversions
privateboolean Mark all outgoing calls as private. Smart codes can be used to change this setting or override on a per call basis
block_privacyboolean Do not allow private calls to this user
calleridboolean Present caller detail for calls to this user
cfna_durationinteger The number of seconds to ring before proceeding to diversions
reg_statusstring/read-only Provides the current registered status
trunkingboolean Enable SIP trunking. Trunking devices allow an INVITE containing a varying DDI in the request line
concurrent_call_limitinteger Restricts the maximum number of concurrent calls to/from this user
pickup_groupstring Users can pickup calls from other ringing phones if they share the same pickup group name
pilotstring The DDI to present on outgoing calls when a user invites with a number outside their set of valid numbers. Use Account/*/Pilot for available pilots
api_userboolean Allows this user api access
pintext/numeric Manages singular account PIN
mohstring A SHOUTCast stream for Music on Hold
menu_activeboolean/readonly Indicates if a menu is active
numbers[] or [{}] e164 numbers to assign to this account. Numbers specifies either an array of numbers or and array of objects {"number":"",alert_info:"",account_code:""}. Requires system level access
pins[] or [{}] PIN numbers to assign to this account. PINS specifies either an array of PINS or and array of objects {"pin":"1234",pinuser:"user-data"}
child_countinteger/readonly Identifies number of child accounts

/api-sys/Account/<account>/AllNumbers

View Numbers belonging to this and all descendant accounts

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
filterstring%A LIKE clause to filter for specific numbers

Fields
Nametypedefaultdescription
guidstring/uniqueidentifier Uniqueidentifier of the number entry
assignedstring Username of the account owning the number
numberstring The phone number

/api-sys/Account/<account>/CallRule

Manage Call rules, extension dialplan, number translations, blocking, PIN features, Speedials etc

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
orderinteger Call rules are applied in sequential order. The lower order rules are processed first
early_ruleboolean Early rules are processed before smartphone features. An early rule can remap/prohibit smartphone features. Using impersonation can allow the caller to perform smartphone operations on behalf of other users
prefixstring A pattern to match against the translated dialed number
prefix_rawstring A pattern to match against the raw dialed number
called_patternstring As per prefix, but accepts inversion, I.e. !64%
locationstring Applies this rule if calling to this location. Use api-sys/Account/../Location
bypass_conditionstring Applies this rule if a previous rule has set the bypass value to something matching this condition
bypass_valuestring Sets a bypass value. The bypass value can be tested in subsequent rules using bypass_condition
destinationstring The new number to translate to
usernamestring A username to forward this call to
impersonatestring An optional user to impersonate when this rule applies
pinstring Control PIN collection. M will require validation against the accounts Multiple PIN table. A specific PIN may also be supplied here.
record_emailstring The call shall be recorded and eMailed to the specified address

/api-sys/Account/<account>/CDR

Extract Account CDR

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
rowsstring1000The maximum number of rows to fetch
calldatedatetimetodayThe date to fetch CDR from

Fields
Nametypedefaultdescription
cdridinteger Unique cdr identifier
hop_typestring from_user,diversion. Indicates the reason for this hop
calldatedatetime Date call was initiated in localtime
callerstring The E.164 phone number representing this caller
caller_areastring The calling area determined by access to local numbering plans. I.e. nad.org.nz
caller_privateboolean This call requested privacy, or privacy was imposed by the system
caller_owning_carrierstring The callers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
caller_addrstring The source IP address this call entered the system from
caller_userstring The XC5 username of the caller if available
local_userstring The XC5 entity responsible for this call. This may be the caller, or may be a diverting user
local_accountguidstring The accountguid of the XC5 entity responsible for this call.
local_numberstring The XC5 entity's number responsible for this call. This may be the diverting number
calledstring The E.164 destination
called_areastring The called area determined by access to local numbering plans. I.e. nad.org.nz
called_owning_carrierstring The called numbers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
called_accountguidstring The accountguid if available of the XC5 entity called.
called_userstring The username if available of the XC5 entity called.
duration_setupinteger The number of seconds elapsed before the call was connected
durationinteger The number of seconds the call was connected for
errorstring The calls SIP response
reasonstring Verbose error reason
cdr_pinstring Contains validated or invalidated PIN if a PIN was requested
sessionguidstring Diagnostic GUID to the paths of this call

/api-sys/Account/<account>/Child

Manage Child Accounts. Supplies ParentGUID to /api-sys/Account. Refer to /api-sys/Account for fields and usage.

Methods
[GET,PUT,DELETE,OPTIONS]
Request Parameters
None
Fields
None

/api-sys/Account/<account>/Fork

Configure secondary destinations to ring. Note the destinations are offnet.

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
destinationstring The e.164 destination to fork the call to
activeboolean Activate/deactivate this entry

/api-sys/Account/<account>/Graph

Get account graph data

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
typestring The type of graph
grapharray Array of sample magnitudes
endtsstring current UTC/epoch timestamp
lastreal The last/most recent sample value

/api-sys/Account/<account>/HoldSource

List configured MOH sources

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
namestring The name of the feed
url The URL of a SHOUTCast feed

/api-sys/Account/<account>/Location

Retrieves a subset of locationnames for self management

Methods
[GET]
Request Parameters
None
Fields
Nametypedefaultdescription
locationstring The location

/api-sys/Account/<account>/Number

Manage account phone numbers

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
guidstring Unique identifier for each entry. A PUT by GUID can move a Number (I.e. from Account/*/NumAllocate into a new account
numberstring The e.164 phone number. Numbers must be unique, or prefixed with a: if outgoing rewrite is allowed
is_pilotboolean Indicates to use this number a a default for invalid presented caller number
cfastring An e.164 destination. Creates a call-forward-all for calls to this number. This number based CFA will take place before any account CFA.
cfa_activeboolean Enables or disables the call forward all
cfa_promptstring A prompt to play on the call forward. Prompts must be loaded onto XS_Nodes. I.e. XC5_BEEP or >XC5_BEEP to play remote tone
alert_infostring Assigns a value to the sip Alert-Info header for distinctive ring
account_codestring Free for use associated data

/api-sys/Account/<account>/NumberAllocate

Allocate a number from the _unassigned.pool

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
filterstring%A LIKE clause as a filter for GET

Fields
Nametypedefaultdescription
numberstring A free number to allocate. Use the allocate link

/api-sys/Account/<account>/ParentNumber

Show Numbers owned by the parent account that may be reassigned to this account

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
numberstring A free number to allocate. Use the allocate link

/api-sys/Account/<account>/Pilot

View assignable pilot numbers

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
numberstring Username of the child account
assignedstring The username the number is currently assigned to

/api-sys/Account/<account>/PIN

Manage Account PINs

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
guidstring Uniquely identifies this record
pinstring Numeric PIN code
pinuserstring Optional associated data
secureboolean Defines the PIN as secure PIN, allowing access to the administrative IVR

/api-sys/Account/<account>/Prompt

Manage IVR Prompts

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
descriptionstring Optional description
group_accessstring/read-only Provides the access number for members of the organization to use to record the prompt for this menu
user_accessstring/read-only Provides the access number for the owning account to record the prompt for this menu
date_recordedstring/read-only The last date the prompt was recorded or uploaded
recordedboolean/read-only Is the prompt recorded
ownedboolean/read-only True if the prompt is owned by this account
ownerstring/read-only The owner of the prompt
prompt_lengthinteger length of recorded data in seconds.
prompt_database64 Prompt to upload. Can also use attached .wav or .mp3 in multipart/form-data <input type="file" id="prompt_data">. Will only be returned to client for request with ?format=file

/api-sys/Account/<account>/Reg

View registration status

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
registered_contact_liststring The registration contact information
expiry_timedatetime The date of when the registration is due to expire - in localtime
user_agentstring The user-agent named supplied on registration
whendatetime The time to registration occured - in localtime
nodestring The node that the registration was made against

/api-sys/Account/<account>/Resource

Auxilary account settings. Note: some of these settings are also controlled through other API calls. These fields are dynamic. Fields may be created or removed in accordance with features and upgrades.

Methods
[GET,PATCH,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
account_ownerstring Refers to the cloud owner of this account
alarm_asr_minstring Minimum ASR alarm threshold
api_accessstring Grants this user access to the api as System or Multi-tenant Operator
billing_carrierstring Specifies the billing carrier for this account
billing_locationstring Specifies the billing location for this account
caller_controlstring asserted,invalid_pan:nnnn,*,forced:nnnn
codec_policystring <force:alaw,mulaw> The force prefix forces the following codec list on calls to the user. Native codecs are alaw,mulaw,g729,iLBC. <expand:g729> Expanding will add the codec list to the codecs offered by the caller
concurrent_call_groupstring  
concurrent_call_limitstring  
default_resolverstring Indicates the account that will be delegated to in case the dialed number is not within the local system. The default resolver is _route.default.
discovery_methodstring Sends an OPTION probe to a non-Infrastructure endpoint addresses. Maintains AccountReg with results
endpoint_auth_passwordstring SIP connect password
endpoint_auth_usernamestring SIP connect/send username/auth for 401 from destination
endpoint_domainstring The domain to present when INVITING to this endpoint
endpoint_ip_addressstring  
endpoint_nodestring For static endpoints, the specifies the hostname that calls to the endpoint must be made from
fork_methodstring Default:parallel. When multiple registrations exist, parallel will ring all devices, sequential will ring only one device
fs_datastring alert-info=tone,no_caller_id,divert_cac,
inherit_accountstring AccountResources, CallRules and AccountRoutes are merged from inherited accounts
ivr_accountstring Indicates the subscribers unique code for ivr management
lawful_interceptstring format as: <destination>,<liid>
lmnp_destinationstring If the called number is lmnp ported to the named network, the LMNP_IS_DESTN 1 flag will be set for number translation
maintenance_redirectstring For _node entries, specifies the redirection node of all traffic. OPTIONS will not be responded to
media_latchstring Sends RTP to received address - autoaddr
media_timeoutstring Default:true. Set to false to deactivate RTP Inactivity detector. USE ONLY FOR DEVICES THAT DO NOT SUPPORT reINVITE
mohstring Specifies the music on hold for this account
nature_of_addressstring  
net_bind_listenerstring ysipchan listener to bind to
pickup_groupstring  
pin_force_localstring If a PIN is set, setting pin_force_local will ask for a PIN even on local calls
rateplan_ostring Specifies the rateplan to use when this account is originating calls
rateplan_tstring Specifies the rateplan to use when this account is terminating calls
record_localstring  
registered_statestring Indicates active/expired
response_prompt_mapstring Maps final response to prompts for ingress/no media. I.e. 404=XC5_INVALID,403=...
route_criteriastring The route_criteria value is carried through delegation and can be tested within AccountRoute:RequiredPack to provide an equivalent of class of service routing
ruri_methodstring For sip trunking, setting to called will force the called number into the registered URI
send_privacy_policystring Only set trusted for carriers that will not disclose private numbers to the end user, trusted=Privacy, trusted=Remote-Party-ID
stat_namestring  
trunk_identifierstring tgrp:xyz or x-nortel-profile:xyz or x-route-tag:xyz to present outgoing trunk
xs_node_groupstring The name of a group used to partition OPTION probes

/api-sys/Account/<account>/Route

Applies to calls targeting this account. Manage Diversion, Call forwarding, Caller blocking, IVR Menus, Hunt groups

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
descriptionstring Optional description
orderinteger Members are attempted in order. Equal orders are load shared. Negative orders are applied before calling the user, positive orders are applied after calling the user. (The user has an implied route at 0)
menu_levelinteger Optional menu this rule belongs to. 1 is the root menu.
caller_privateboolean Applies this rule if the caller's privacy condition is met
user_registeredboolean Applies this rule of the user_registered condition is met
caller_locationstring Applies this rule if the caller is from the specified location. Use api-sys/Account/../Location
called_locationstring Applies this rule if the called number is from the specified location. Use api-sys/Account/../Location
caller_numberstring Applies this rule if the call is from the specific caller_number (e.164)
called_numberstring Applies this rule if the call is to the specific called_number (e.164)
time_definitionstring Specify time-of-day rules for when this rule will apply. I.e. business hours can be defined as: !nz_holidays,Mon-Fri 08:30-17:00
response_codestring Applies if the response_code for the call attempt matches. Note: This rule must be at order greater than 0. Use response_code(486) to implement a call-forward-busy
activeboolean Activates/deactives this route
hit_weightint This weight is added everytime this route is chosen. For routes of the same order, Routes with lower hit counts are attempted first
digit_mapstring A string mapping DTMF or time values to actions. See documentation
promptguiduniqueidentifier A recorded prompt identifier from /api-sys/account/.../prompt
prompt_retry_guiduniqueidentifier A recorded prompt identifier from /api-sys/account/.../prompt
record_emailstring Specifies an eMail address to forward a call recording
usernamestring Divert to another user
ring_secondsinteger Specifies the number of seconds to attempt calling this destination
hunt_userboolean The username will be called if not busy. The routes for the called username will also not apply
queue_sizeinteger Specify the maximum number of calls that can flow past this point. Additional calls will be queued and periodically subjected to digit_map
destinationstring An e164 destination or service to divert to

/api-sys/CallVerify

Generates a call out the specified Account/Carrier. The call is made from the _service.outdial account. Use for loopback call activation testing

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
callerstring E.164 formatted calling party number / from
calledstring E.164 formatted called party number /to
accountstring An XC5 account to send the call to
maxtimeinteger Max time is milliseconds to ring destination.. Default 5000ms

/api-sys/CDR

Extract CDR

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
rowsstring1000The number of session rows to fetch. Note: each cdrid can contain multiple records. Fetching 1 row can result in multiple records returned
cdridinteger0The cdrid to start fetching rows from. A negative cdrid will seek back from the last cdr. I.e. -100 will return the last 100 records.

Fields
Nametypedefaultdescription
cdridinteger Incrementing identifier for collection. Note: This is not unique. A single call may generate multiple CDR
cdr_hopstring A diversion may cause a multi-leg call. The hop identifies the call leg within the cdrid
hop_typestring from_user,diversion. Indicates the reason for this hop
calldatedatetime Date call was initiated in localtime
calldate_utcdatetime Date call was initiated in UTC
callerstring The E.164 phone number representing this caller
caller_displaystirng The displayed caller name
caller_areastring The calling area determined by access to local numbering plans. I.e. nad.org.nz
caller_privateboolean This call requested privacy, or privacy was imposed by the system
caller_owning_carrierstring The callers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
caller_addrstring The source IP address this call entered the system from
caller_userstring The XC5 username of the caller if available
local_userstring The XC5 entity responsible for this call. This may be the caller, or may be a diverting user
local_accountguidstring The accountguid of the XC5 entity responsible for this call.
local_parent_userstring The parent account of the local_user
local_numberstring The XC5 entity's number responsible for this call. This may be the diverting number
calledstring The E.164 destination
called_areastring The called area determined by access to local numbering plans. I.e. nad.org.nz
called_owning_carrierstring The called numbers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
called_accountguidstring The accountguid if available of the XC5 entity called.
called_userstring The username if available of the XC5 entity called.
duration_setupinteger The number of seconds elapsed before the call was connected
durationinteger The number of seconds the call was connected for
errorstring The calls SIP response
reasonstring Verbose error reason
cdr_pinstring Contains validated or invalidated PIN if a PIN was requested
sessionguidstring Diagnostic GUID to the paths of this call
native_cdridinteger The native cdrid of this hop. Note: This is the cdrid used in older versions of cdr extraction
caller_called_naturestring The On or Off - network status of caller and called respectively. Use this to determine: local (OnOn), transit (OffOff), inbound (OffOn) or outbound(OnOff) call nature
update_reasonstring Contains a reason if the cdr has been manually updated in unforeseen circumstances

/api-sys/CDR_ID

Find the CDRID for a given date

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
datedateSupply the date for which the nearest CDRID will be obtained. Note: This is the date of CDR completion for the call session. Associated call legs for the given ID will return their own respective call times

Fields
Nametypedefaultdescription
cdridinteger The next CDR identifier from specified date.

/api-sys/CDR_Session

Extract CDR

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
sessioniduniqueidentifier The sessionid to fetch CDR for.

Fields
Nametypedefaultdescription
cdr_hopstring A diversion may cause a multi-leg call. The hop identifies the call leg within the cdrid
hop_typestring from_user,diversion. Indicates the reason for this hop
calldatedatetime Date call was initiated in localtime
calldate_utcdatetime Date call was initiated in UTC
callerstring The E.164 phone number representing this caller
caller_areastring The calling area determined by access to local numbering plans. I.e. nad.org.nz
caller_privateboolean This call requested privacy, or privacy was imposed by the system
caller_owning_carrierstring The callers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
caller_addrstring The source IP address this call entered the system from
caller_userstring The XC5 username of the caller if available
local_userstring The XC5 entity responsible for this call. This may be the caller, or may be a diverting user
local_accountguidstring The accountguid of the XC5 entity responsible for this call.
local_numberstring The XC5 entity's number responsible for this call. This may be the diverting number
calledstring The E.164 destination
called_areastring The called area determined by access to local numbering plans. I.e. nad.org.nz
called_owning_carrierstring The called numbers owning carrier determined by access to local carrier data. I.e. ipms-prod.tcf.org.nz
called_accountguidstring The accountguid if available of the XC5 entity called.
called_userstring The username if available of the XC5 entity called.
duration_setupinteger The number of seconds elapsed before the call was connected
durationinteger The number of seconds the call was connected for
errorstring The calls SIP response
reasonstring Verbose error reason
cdr_pinstring Contains validated or invalidated PIN if a PIN was requested
sessionguidstring Diagnostic GUID to the paths of this call
native_cdridinteger The native cdrid of this hop. Note: This is the cdrid used in older versions of cdr extraction

/api-sys/Graph

Extract Graphs for the specified element

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
elementstring The graph name
display_namestring A pretty graph name
typestring The graph type
graphobject { .... JSON Formatted Graph Samples}
timestamp_nowinteger The current timestamp
maxinteger If set, contains the known upper limit of the graph. I.e. 100 for percentage graph

/api-sys/GraphDetail

Extract Graphs for the specified element

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
elementstring The graph name
display_namestring A pretty graph name
typestring The graph type
graphobject { .... JSON Formatted Graph Samples }
timestamp_nowinteger The current timestamp
maxinteger If set, contains the known upper limit of the graph. I.e. 100 for percentage graph

/api-sys/GUID

Get a new GUID

Methods
[GET,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
guidstring a new uniqueidentifier

/api-sys/LMNPRoute

Manage LMNP ported table. Note, this is usually imported/overwritten every day.

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
Nametypedefaultdescription
filterstring%A t-sql LIKE clause to filter the returned locationnames

Fields
Nametypedefaultdescription
numberstring The E.164 formatted number, I.e. 64201000007
hocstring The new owning carrier HOC. I.e. 011647
carriernamestring The new owning carrier name GC (LMNP network name), I.e. 2DBBAND
networknamestring The new owning ServiceProvider name from IPMS - SPName / GSP, I.e. Digital Island Local

/api-sys/Location

Manage groups of numbers called 'locations'. These locations are used for routing.

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
Nametypedefaultdescription
filterstring%A t-sql LIKE clause to filter the returned locationnames

Fields
Nametypedefaultdescription
locationnamestring The name of the location / group of numbers
locationtypeinteger Routing can make use of user-defined locationtypes
areacodestring User data to describe the area this location belongs to

/api-sys/Location/<location>/Code

Manage numbers within a location.

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
locationcodestring The e.164 number

/api-sys/Number

View Numbers belonging to this and all descendant accounts

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
filterstring%A LIKE clause to filter for specific numbers

Fields
Nametypedefaultdescription
guidstring/uniqueidentifier Uniqueidentifier of the number entry
assignedstring Username of the account owning the number
numberstring The phone number

/api-sys/ProvisioningHistory

Extract CDR

Methods
[GET,OPTIONS]
Request Parameters
Nametypedefaultdescription
rowsstring1000The number of session rows to fetch. Note: each cdrid can contain multiple records. Fetching 1 row can result in multiple records returned
idinteger0The id to start fetching rows from. A negative id will seek back from the last history record. I.e. -100 will return the last 100 records.

Fields
Nametypedefaultdescription
idinteger Incrementing identifier for collection.
stmtstring An unformatted raw sql syntax
datestring Date of action
hostnamestring Source of the request

/api-sys/Query

Perform a dynamic query

Methods
[GET]
Request Parameters
Nametypedefaultdescription
qstringUser query name

Fields
Nametypedefaultdescription

/api-sys/TimeDefinition

Manage a group of time definitions

Methods
[GET,PUT,PATCH,DELETE,OPTIONS]
Request Parameters
None
Fields
Nametypedefaultdescription
descriptionstring The name of this group of time definitions