Constructor
new TelephonyController()
Members
(static) capabilities :TelephonyControllerCapabilities
List of telephony controller capabilities.
Type:
- Since:
- 11.7.0
(static) connectionState :TelephonyConnectionState
Current connection state with CUCM.
Type:
- Since:
- 11.7.0
(static) recentGroupCallPickupNumbers :Array.<String>
List of recently dialed group pickup numbers
Type:
- Array.<String>
- Since:
- 11.7.0
telephonyDevices :Array.<TelephonyDevice>
List of available telephony devices.
Type:
- Array.<TelephonyDevice>
Properties:
Name | Type | Description |
---|---|---|
telephonyDevices |
- Since:
- 11.7.0
Methods
(static) addEventHandler(eventName, handler)
Add handler function for Telephony Controller's event.
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String | Name of the event. |
handler |
function | Function that will be called when event is fired. |
- Since:
- 11.7.0
(static) callPickup(errorHandleropt)
Pick up incoming call in call pickup group in which currently connected telephony device's line is associated with.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
errorHandler |
function |
<optional> |
Called if error has occurred in add-on. |
- Since:
- 11.7.0
(static) groupCallPickup(number, errorHandleropt)
Can be used for both direct call pickup and group call pickup. Group call pickup, picks up incoming call in another
call pickup group. Group number is specified passed as parameter. Direct call pickup, picks up incoming call on the
specified directory number. Directory number is specified as parameter.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
number |
Group number if used for group call pickup. Directory number if used for direct call pick up. | ||
errorHandler |
function |
<optional> |
Called if error has occurred in add-on. |
- Since:
- 11.7.0
(static) otherGroupPickup(errorHandleropt)
Pick up incoming call, in a group that is associated with group in which currently connected telephony device's line
is associated with.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
errorHandler |
<optional> |
Called if error has occurred in add-on, passes SystemError. |
- Since:
- 11.7.0
(static) refreshTelephonyDeviceList()
Send request to client to refresh telephony device list.
- Since:
- 11.7.0
(static) removeEventHandler(eventName)
Remove handler function for TelephonyController's event.
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String | Name of the event. |
- Since:
- 11.7.0
(static) startAudioConversation(number, errorHandleropt)
Starts new audio conversation. Before calling this function it is necessary to add 'onConversationStarted' event
handler through addEventHandler in order to receive TelephonyConversation object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
number |
String | Number that will be called to start a conversation. | |
errorHandler |
function |
<optional> |
Called if error has occurred in add-on. |
- Since:
- 11.7.0
(static) startVideoConversation(number, errorHandleropt)
Starts new video conversation. Before calling this function it is necessary add to 'onConversationStarted' event
handler through addEventHandler in order to receive TelephonyConversation object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
number |
String | Number that will be called to start a conversation. | |
errorHandler |
function |
<optional> |
Called if error has occurred in add-on. |
- Since:
- 11.7.0
getConnectedTelephonyDevice() → {TelephonyDevice}
Retrieves telephony device that is currently connected with CUCM.
- Since:
- 11.7.0
Returns:
Currently connected telephony device.
- Type
- TelephonyDevice
Events
onAudioCallPickupNotification
This event is fired when there is an incoming call pickup notification that indicates if sound should be played/stopped
when notification is received.
Parameters:
Name | Type | Description |
---|---|---|
isAudioEnabled |
Boolean | If value is true sound should be playing otherwise it should stop. |
- Since:
- 11.7.0
onConnectionFailure
This event is fired when error has occurred while trying to connect to telephony device (trying to
connect to CUCM).
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error that has occurred. |
- Since:
- 11.7.0
onConnectionStateChanged
This event is fired when connection state between CWIC and CUCM has changed.
Parameters:
Name | Type | Description |
---|---|---|
state |
String | New connection state. |
- Since:
- 11.7.0
onConversationEnded
This event is fired when telephony conversation has ended.
Parameters:
Name | Type | Description |
---|---|---|
conversation |
TelephonyConversation | Conversation that has ended. |
- Since:
- 11.7.0
onConversationIncoming
This event is fired whenever there is an incoming conversation.
Parameters:
Name | Type | Description |
---|---|---|
conversation |
TelephonyConversation | Incoming conversation. |
- Since:
- 11.7.0
onConversationOutgoing
This event is fired right after startAudioConversation or startVideoConversation methods are called.
Parameters:
Name | Type | Description |
---|---|---|
conversation |
TelephonyConversation | Outgoing conversation. |
- Since:
- 11.7.0
onConversationStarted
This event is fired when conversation is in connected state and call has been established. This happens
when incoming/outgoing conversation has been answered.
Parameters:
Name | Type | Description |
---|---|---|
conversation |
TelephonyConversation | Conversation that has started. |
- Since:
- 11.7.0
onConversationUpdated
This event is fired when conversation state, call state or capabilities have changed.
Parameters:
Name | Type | Description |
---|---|---|
conversation |
TelephonyConversation | Updated conversation. |
- Since:
- 11.7.0
onTelephonyDeviceListChanged
This event is fired whenever a telephony device has been added/removed from the list or property of an
existing telephony device in the list has changed.
- Since:
- 11.7.0
onVisualCallPickupNotification
This event is fired when there is an incoming call pickup notification that holds information that should be shown
to end user.
Parameters:
Name | Type | Description |
---|---|---|
notificationInfo |
String | Information that should be shown to end user. |
- Since:
- 11.7.0