API Version: 6.2

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.
uid Number Unique identifier.
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)
device Device The parent Device instance.
party String Call party.
  • 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.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.