Class: TelephonyPlugin

WTAPI.TelephonyPlugin()

new TelephonyPlugin()

Constructor for Telephony plugin. Instance will be created each time when new WTAPI instance is created.
Plugin could be accessible thought WTAPI with telephony property.
Source:
Tutorials:

Extends

  • WTAPI.Observer

Classes

Call
Device

Methods

answer(device, call, callback)

Answer a specified incoming call at a specified device. Can be used only when call state in "ring".
Parameters:
Name Type Description
device WTAPI.TelephonyPlugin.Device
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

bridge(call1, call2, callback)

Performs an attendant transfer with a specified calls.
Parameters:
Name Type Description
call1 WTAPI.TelephonyPlugin.Call
call2 WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

call(device, to, callback)

Initiates a call to a specified number using specified device (phone).
Parameters:
Name Type Description
device WTAPI.TelephonyPlugin.Device A device from which initiate a call.
to string A number to call to.
callback TelephonyActionCallback
Source:

callToAllDevices(to, callback)

Initiates a call to specified number using all available devices. User who initiated a call, should respond to the call, and only then PBX will start call to destination.
Parameters:
Name Type Description
to string A number to call to.
callback TelephonyActionCallback
Source:

callToMobility(mobile, to, lang, callback)

Initiates a call to specified number using mobile device. User who initiated a call, should respond to the call, and only then PBX will start call to destination.
Parameters:
Name Type Description
mobile string A mobile number.
to string A number to call to.
lang string A user lang default en.
callback TelephonyActionCallback
Source:

forward(call, to, callback)

Performs a blind transfer or call forwarding to a specified number.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
to string
callback TelephonyActionCallback
Source:

getActiveCalls() → {Array}

Returns a list of available calls.
Source:
Returns:
Type
Array

getRegisteredDevices() → {Array}

Returns a list of available devices (phones).
Source:
Returns:
Type
Array

hangup(call, callback)

Ends a specified call.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

hold(call, callback)

Put a specified call on HOLD.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

resume(call, callback)

Resumes a specified call from HOLD.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

startRecord(call, callback)

Start recording for a specified call.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

stopRecord(call, callback)

End record of a specified call.
Parameters:
Name Type Description
call WTAPI.TelephonyPlugin.Call
callback TelephonyActionCallback
Source:

Events

call_added

Indicates that new call is added
Properties:
Name Type Description
call WTAPI.TelephonyPlugin.Call A call that was added
Source:

call_terminated

Indicates that call was terminated
Properties:
Name Type Description
call WTAPI.TelephonyPlugin.Call A call that was terminated
Source:

call_updated

Indicates that call was updated
Properties:
Name Type Description
call WTAPI.TelephonyPlugin.Call A call that was updated
Source:

devices_changed

Indicates that active devices are changed
Type:
  • object
Properties:
Name Type Description
devices Array List of supported devices that are available for current user
Source: