API Version: Development

IPCortex.Types.Call

A Call instance represents a call on a device or in a Queue.

Permissions

IMPORTANT: There is a difference between visibility of calls and control of calls. A logged in user may only apply call control to their own calls, but may be sent details of additional calls, particularly if listening using the 'new' event.
Visibility rules are as follows:
  • The 'admin' login can see all calls on all devices.
  • A 'sys-admin' login can see all calls on all devices.
  • A 'company-admin' can see calls on all administered companies.
  • A 'user' in the 'default' company can see calls in all companies.
  • A 'user' NOT in the 'default' company can see calls in their own company.
Therefore it may be necessary to filter which calls you are interested in by checking whether call.device is a device accessible by the logged-in user. Alternatively, add call/update listeners only to specific devices.

Properties

Name Type Description
label String Friendly name or number of the other party as available. Name is prioritised.
name String Name of the other party or empty string if unavailable.
number String Number of the other party or empty string if unavailable.
id Number Unique identifier generated by Asterisk for every call. Can be reused under rare call flows. keevio phone devices may fill a dummy value when the call is first created.
uid Number Unique identifier generated by API for every call object. Will never re-occur unless API reloads.
stamp Number Start time in epoch milli-seconds.
start Number Answered time in epoch milli-seconds.
remoteMedia Array A list of attached mediaStream. (WebRTC only)
inq Number Time entered Queue in epoch seconds. (queue only)
outq Number Time exited Queue in epoch seconds. (queue only)
qcall Call Bridged call if answered by a Queue agent. Will be null if user has no access to the target call, or call not delivered by Queue. (queue only) 6.2.11+
device Device The parent Device instance.
company String The target company for an inbound call. null if undetermined. 6.2.14+
dtmfString String The last collected DTMF string, or null. 6.2.14+
extension Extension Extension this call was most recently received via. null if undetermined. This can be used to determine which identity was call was sent to. 6.2.14+
party String Call party.
  • unknown (Seen on some early stage calls)
  • caller
  • callee
features String Comma separated list of features.
  • hold
  • talk
  • answer
state String Call state.
  • down
  • dial
  • ring
  • up
  • hold
  • park
  • dead
nrState String Near-end state. This will correctly indicate 'up' if an 'up' call is transferred and starts to hear 'ring' on the line, but state will indicate 'ring'.
  • down
  • dial
  • ring
  • ringing
  • up
  • hold
  • park
  • dead

Methods

call.hold(callback)

Kind: class method of IPCortex.Types.Call
Put the call on hold.
NOTE: for keevio-phone, any remote media streams that have previously been provided become invalid, and an update with an empty list of media streams will be received.

call.talk(callback)

Kind: class method of IPCortex.Types.Call
Answer or take the call off hold.
NOTE: for keevio-phone, any remote media streams that have previously been provided will be invalid, and an update with a new list of media stream(s) will be received after the unhold or answer is complete.

call.hangup(callback)

Kind: class method of IPCortex.Types.Call
Hang up the Call.

call.send(number, callback) 6.2.14+

Kind: class method of IPCortex.Types.Call
Send the call to a number/extension. Requires administrative ownership of the call, and can be used on inbound calls to send them elsewhere.
Parameter Type Description
number String Transfer destination.

call.xfer(number, callback)

Kind: class method of IPCortex.Types.Call
Transfer the call to a number/extension.
Parameter Type Description
number String Transfer destination.

call.atxfer(call, callback)

Kind: class method of IPCortex.Types.Call
Bridge two calls together.
Parameter Type Description
call Call Bridge destination.

call.mute(mute, callback)

Kind: class method of IPCortex.Types.Call
Mute or un-mute the call. (WebRTC only)
Parameter Type Description
mute Boolean Mute or unmute.

call.dtmf(tone, callback)

Kind: class method of IPCortex.Types.Call
Send a DTMF digit/tone. (WebRTC only)
Parameter Type Description
tone String DTMF digit/tone. (0-9, *, #)

call.addListener(event, callback)

Kind: class method of IPCortex.Types.Call
Add listener method, inherited from Api base class and common to all classes.
Parameter Type Description
event String Name of event, e.g. 'update'
callback Function Callback which is passed a reference to the updated Class object

call.removeListener(event, callback)

Kind: class method of IPCortex.Types.Call
Remove listener method, inherited from Api base class and common to all classes. event and callback must be identical to those used in addListener() in order for the remove to succeed.
Parameter Type Description
event String Name of event, e.g. 'update'
callback Function Callback which is passed a reference to the updated Class object

Events

  • new - A new call is created
  • update - The call state has changed.