CallManager (interface)
Methods
addEventListener
addEventListener(eventName: CallManagerEvent.IncomingCall, listener: (event: CallManagerIncomingCall) => void | Promise<void>, options: ListenerOptions): void
Registers a handler for the specified event.
One event can have more than one handler; handlers are executed in order of their registration.
Parameters
Returns: void
createCall
createCall(destination: string, settings?: CallSettings): Call
Creates a new call instance.
The call should be started via the Call.start method.
Parameters
Returns: Call
Throws
RequiredParameterError if the destination parameter is undefined or an empty string
getCalls
getCalls(): Map<string, Call>
Returns a map of actual calls with their ids.
Returns: Map<string, Call>
removeEventListener
removeEventListener(eventName: CallManagerEvent.IncomingCall, listener: (event: CallManagerIncomingCall) => void | Promise<void>): void
Removes a previously registered handler for the specified event.
Parameters
Returns: void
transferCall
transferCall(call1Id: string, call2Id: string): Promise<void>
Transfers a call.
Returns a promise that is resolved when the call transfer is completed successfully.
Parameters
Returns: Promise<void>
Throws
- CallNotFoundError — if there are no call(s) with the provided call ids
- CallWrongStateError — if the call(s) with the provided id is not in the CallState.Connected state
- CallTransferTimeoutError — if the operation is not completed in time
- CallTransferFailedError — if the operation has failed