/** * @module Calls */ import { Subscription } from "rxjs"; import { RBEvent } from "./event.model"; import { Conversation } from "./conversation.model"; import { User } from "./user.model"; import { Contact } from "./contact.model"; /** * Call events send to other services * Can listen to it via `Call.subscribe()` API. */ export declare enum CallEvents { /** * @eventProperty * This `RBEvent` is sent when the call capabilities have been updated.
* The new call capabilities can be retrieved via the 'capabilities' property. */ ON_CALL_CAPABILITIES_UPDATED = "ON_CALL_CAPABILITIES_UPDATED", /** * @eventProperty * This `RBEvent` is sent when the status of the call (from a telephone point of view) has changed.
* The new call status can be retrieved via the 'callStatus' property. */ ON_CALL_STATUS_CHANGE = "ON_CALL_STATUS_CHANGE", /** * @eventProperty * This `RBEvent` is sent when the status of the mute of the call (On or Off) has changed.
* The new mute status can be retrieved via the 'isMuted' property. */ ON_CALL_MUTE_CHANGE = "ON_CALL_MUTE_CHANGE", /** * @eventProperty * This `RBEvent` is sent when during a call, the network quality has changed. * * **Event Data** * - **data**: The current network quality for the call */ ON_CALL_NETWORK_QUALITY_CHANGE = "ON_CALL_NETWORK_QUALITY_CHANGE", /** * @internal * @eventProperty * This `RBEvent` is sent when a bad network quality has been detected.
* The detection is currently done by Web Client component, based on internal WebClient criteria for UI purpose. * * **Event Data** * - **data**: The current network quality for the call */ ON_CALL_NETWORK_BAD_QUALITY = "ON_CALL_NETWORK_BAD_QUALITY", /** * @eventProperty * This `RBEvent` is sent when there have been changes in the media used by the local or the remote user.
* By change we mean the addition or removal of a media (Video/Sharing) for the current call. */ ON_CALL_MEDIA_UPDATED = "ON_CALL_MEDIA_UPDATED", /** * @eventProperty * This `RBEvent` is sent when when the call has evolved and as a result some of its properties, such as its status, have been updated. */ ON_CALL_UPDATED_EVENT = "ON_CALL_UPDATED_EVENT", /** * @eventProperty * This `RBEvent` is sent when the distant party has started / stopped the recording of the call; Only available for direct P2P calls with Rainbow user */ ON_CALL_REMOTE_RECORDING_UPDATE = "ON_CALL_REMOTE_RECORDING_UPDATE", /** * @eventProperty * This `RBEvent` is sent when the call recorder state change * **Event Data** * - **callRecorderState**: The new CallRecorderState of the call */ ON_CALL_RECORDING_UPDATE = "ON_CALL_RECORDING_UPDATE" } /** * Media type available in a P2P call.
* Media can be combined within the same call, e.g. for a video call, both audio and video media will be used. */ export declare enum MediaType { /** * Audio */ AUDIO = "audio", /** * Video */ VIDEO = "video", /** * Screen Sharing */ SHARING = "sharing" } /** * Type of call managed for a P2P communication. */ export declare enum CallType { /** * Webrtc call */ WEBRTC = 1, /** * Phone call */ PHONE = 2 } /** * The possible status of the call (e.g. dialing, active, releasing...) */ export declare enum CallStatus { /** * Call Cleared */ ENDED = "ENDED", /** * In dialing */ DIALING = "DIALING", /** * In queue (user side) */ QUEUED_INCOMMING = "QUEUED_INCOMMING", /** * In queue (recipient side) */ QUEUED_OUTGOING = "QUEUED_OUTGOING", /** * Call in ringing (user side) */ RINGING_INCOMMING = "RINGING_INCOMMING", /** * Call in ringing (recipient side) */ RINGING_OUTGOING = "RINGING_OUTGOING", /** * Active call */ ACTIVE = "ACTIVE", /** * Call on hold by local party */ HOLD = "HOLD", /** * Call put on hold by the distant party */ PUT_ON_HOLD = "PUT_ON_HOLD", /** * Call is clearing */ RELEASING = "RELEASING", /** * Call is being answered */ ANSWERING = "ANSWERING", /** * Trying to connect / reconnect the call */ CONNECTING = "CONNECTING", /** * Call error */ ERROR = "ERROR" } /** * Call direction */ export declare enum CallDirection { /** * Default initial value. */ UNDEFINED = "", /** * Incoming call.
* Call in which the connected user is the call recipient. */ INCOMING = "incoming", /** * Outgoing call.
* Call in which the connected user initiates the call. */ OUTGOING = "outgoing" } /** * Call Redirection cause */ export declare enum CallRedirectionCause { /** * Default initial value. */ UNDEFINED = "", /** * The call has been forwarded. */ FORWARDED = "forwarded", /** * The call is a group call : it is redirected by the group number to the group member. */ HUNTGROUP = "hg" } /** * @internal * Media used by the local or the remote party of a WebRTC or PBX call */ export declare const CallMedia: { /** * No media */ readonly NONE: 0; /** * WebRTC audio call */ readonly AUDIO: 1; /** * WebRTC audio and video call */ readonly VIDEO: 2; /** * Telephony call (PBX) call */ readonly PHONE: 4; /** * Screen Sharing */ readonly SHARING: 8; }; /** * For a call, indicates for each managed media whether it is in use or not. */ export interface CallMedias { /** * Indicates if the audio stream is used in the call. */ audio?: boolean; /** * Indicates if the video stream is used in the call.
* This stream is active for example when using a camera. */ video?: boolean; /** * Indicates if the sharing stream is used in the call.
* This stream is used for example when sharing a browser tab, a window or the entire screen. */ sharing?: boolean; } /** * Data associated with the destination of a call. */ export interface CallDestination { /** * Peer object related to the Call destination.
* If the call destination is a Rainbow user, the object is an instance of User. */ user?: User; /** * Phone number to be used for the call destination.
* This can be a telephone number associated with the Rainbow user profile.
* Or in the case of an external destination, a public PSTN number. */ phoneNumber?: string; /** * Phone number country.
* This information is only relevant if the destination is external.
* If not indicated, the caller's country is taken into account. */ country?: string; } /** * Data associated with the initial called party */ export interface CalledParty { /** * Pbx call's initial called number * @readonly */ phoneNumber: string; /** * Pbx call's initial called display name * @readonly */ displayName: string; /** * Pbx call's initial called lastname * @readonly */ lastName: string; /** * Pbx call's initial called firstname * @readonly */ firstName: string; /** * Pbx call's initial called Jabber identifier * @readonly */ jid: string; /** * Pbx call's initial called role : "called" for forwarded calls / "called_group" for group calls * @readonly */ role: string; } /** * Call capabilities representing all the actions that could be done for the call given the state */ export interface CallCapabilities { /** * Indicates if the incoming call can be answered. * @readonly */ answer: boolean; /** * Indicates if the call can be released / ended / declined. * @readonly */ release: boolean; /** * Indicates if we can deflect the incoming call to the VoiceMail.
* Only available for HYBRID systems (for Cloud telephony, the release action will follow the system/user configuration) * @readonly */ deflectToVoicemail: boolean; /** * Indicates if we can deflect the incoming call to a phone number.
* The possible destinations numbers for call deflection are available in the 'deflectPhoneNumberDestinations' data. * @readonly */ deflectToPhoneNumber: boolean; /** * The list of phone numbers where we can deflect the call * @readonly */ deflectPhoneNumberDestinations: [{ id: string; number: string; }?]; /** * Indicates if we can mute the call * @readonly */ mute: boolean; /** * Indicates if we can unmute the call * @readonly */ unmute: boolean; /** * Indicates if we can add the audio media to the call.
* This could happen if there's no audio, for example in case of sharing only call. * @readonly */ addAudio: boolean; /** * Indicates if we can add the video media to the call. * @readonly */ addVideo: boolean; /** * Indicates if we can remove the video media from the call. * @readonly */ removeVideo: boolean; /** * Indicates if we can add the sharing media to the call. * @readonly */ addSharing: boolean; /** * Indicates if we can remove the sharing media from the call. * @readonly */ removeSharing: boolean; /** * Indicates if we can make a blind transfer of this call (transfer it to some other contact without having a call with them beforehand).
* This will remove the current call, and the other party will be transferred to the other contact / number. * @readonly */ blindTransfer: boolean; /** * Indicates if we can make a conference call from the current call and one other call in progress for the current user (can be used to merge the 2 calls).
* This will remove the 2 calls and create one single call (for hybride systems) or web conference. * @readonly */ mergeCalls: boolean; /** * Indicates if we can make a conference call from the current call by adding any other contact or number (that we dont have currently call with).
* This will remove the current call and create a web conference call instead. * @readonly */ addParticipantsToCall: boolean; /** * Indicates if we can put the call on hold. * @readonly */ hold: boolean; /** * Indicates if we can retrieve the call (if it is on hold). * @readonly */ retrieve: boolean; /** * Indicates if we can send dtmf for the call. * @readonly */ dtmf: boolean; /** * Indicates if we can transfer the current call to the other call.
* If the call is on HOLD, then the tranfer is always made towards the ACTIVE call.
* Otherwise, we can transfer this call to any other call from the transferCallDestinations list. * @readonly */ transferToOtherCall: boolean; /** * The list of calls where we can transfer this call; * @readonly */ transferCallDestinations: Call[]; /** * Indicates whether recording can be started for this call */ startRecording: boolean; /** * Indicates whether recording can be stopped for this call */ stopRecording: boolean; /** * Indicates whether recording can be paused for this call */ pauseRecording: boolean; /** * Indicates whether recording can be resumed for this call */ resumeRecording: boolean; /** * Indicates whether recording can be cancelled for this call */ cancelRecording: boolean; } export interface Call { /** * Capabilities of the call * @readonly */ capabilities: CallCapabilities; /** * Call telephone status * @readonly */ callStatus: CallStatus; /** * The type of the call (WebRTC or Telephony) * @readonly */ callType: CallType; /** * On an incoming call, contains the subject of the call if this has been specified by the caller * @readonly */ subject: string; /** * The user reference representing the other party (as caller or callee) engaged in this call * @readonly */ contact: User; /** * Call duration in seconds * @readonly */ duration: number; /** * Call direction * This information is relevant only for telephone (PBX) call. For WebRTC call it is undefined. */ direction: CallDirection; /** * The media stream used by the local user. * Typed as number BUT MUST follow the values defined by 'CallMedia' type or a combination thereof. * @readonly */ localMedias: CallMedias; /** * The media stream used by the remote user/party. * Typed as number BUT MUST follow the values defined by 'CallMedia' type or a combination thereof. * @readonly */ remoteMedias: CallMedias; /** * The current mute status of the call * @readonly */ isMuted: boolean; /** * The current network quality (0 - bad, 1 - medium, 2 - good) for the call * @readonly */ networkQuality: number; /** * The original unprocessed video stream from the camera. * This stream contains the raw video before any processing is applied, such as virtual background effects or filters. * It is used as a reference when video effects need to be applied or removed during the call. * @internal */ originalStream: MediaStream | null; /** * Subscribe to updates on the current call (all events are of RBEvent * @param callback - The callback function that will be called when events are received * @param eventNames - (optional) array of event to listen * @returns Returns RxJS Subscription */ subscribe(callback: (event: RBEvent) => any, eventNames?: CallEvents | CallEvents[]): Subscription; /** * Answer the current incoming call.
* This feature can be used only if the "answer" call capability is 'True'.
* By default, the answer is done with AUDIO only.
* If the 'withVideo' option is set to 'True' and the incoming call contains video, the answer will directly be done with audio and video. * @param withVideo - Option to answer the call directly with audio and video. Default value is 'False' */ answer(withVideo?: boolean): Promise; /** * Release the current call.
* This method allows to decline an incoming call or stop an outgoing call.
* This feature can be used only if the "release" call capability is 'True'. */ release(): Promise; /** * Put on hold the current call.
* This feature can be used only if the "hold" call capability is 'True'. */ hold(): Promise; /** * Retrieve from hold the current call.
* This feature can be used only if the "retrieve" call capability is 'True'. */ retrieve(): Promise; /** * Mute the current call.
* This feature can be used only if the "mute" call capability is 'True'. */ mute(): void; /** * Unmute the current call.
* This feature can be used only if the "unmute" call capability is 'True'. */ unmute(): void; /** * Send DTMF signal to the current call.
* This feature can be used only if the "dtmf" call capability is 'True'. * @param dialKey - The DTMF character sequences to be send * Only the following characters are authorised: the ten single digits (0..9), the letters (a,b,c,d), the asterisk (*) and the pound sign (#). */ sendDTMF(dialKey: string): void; /** * Add the AUDIO media to the current call.
* This feature can be used only if the "addAudio" call capability is 'True' and available only for WebRTC Calls. */ addAudio(): Promise; /** * Add the VIDEO media to the current call.
* This feature can be used only if the "addVideo" call capability is 'True' and available only for WebRTC Calls. */ addVideo(): Promise; /** * Add the SHARING media to the current call.
* This feature can be used only if the "addSharing" call capability is 'True' and available only for WebRTC Calls. */ addSharing(): Promise; /** * Remove the VIDEO media from the current call.
* This feature can be used only if the "removeVideo" call capability is 'True' and available only for WebRTC Calls. */ removeVideo(): Promise; /** * Remove the SHARING media from the current call.
* This feature can be used only if the "removeSharing" call capability is 'True' and available only for WebRTC Calls. */ removeSharing(): Promise; /** * Add participants to the current call.
* This feature can be used only if the "addParticipantsToCall" call capability is 'True'.
* The participants could be other Rainbow users or phone numbers (if the PBX system supports it).
* This will result in a new conversation being created with web conference inside. The active call will be "transferred" to the bubble conference; * @param participants - The list of participants to be added to the call * @returns The new bubble conversation where the web conference is active */ addParticipantsToCall(participants: CallDestination[]): Promise; /** * Create a conference from 2 calls, including the current call. * This will lead to the creation of either a web conference (managed via a Rainbow bubble) or a pure telephone conference (managed by a PBX system). * In the first case, a new conversation is created with the web conference inside. The two calls will be "transferred" to the bubble conference. * In the second case, a new 'conference' type conversation is created. This applies only with a Rainbow Hybrid (OXO or OXE) telephone system. * This feature can be used only if the "mergeCalls" call capability is 'True'. * @returns The new conversation or null depending on the type of conference created */ activateConference(): Promise; /** * Blind transfer the current call another destination which could be any rainbow user or phone number.
* A blind transfer is when you transfer a call directly to another party without consulting with the person receiving the call.
* In other words, there is no need to call the other party to make the transfer.
* This feature is available only if the connected user is behind a Rainbow Hub telephone system. * @param destination - The destination of the blind transfer */ blindTransfer(destination: CallDestination): Promise; /** * Deflect the current incoming call to the voice mail.
* This feature can be used only if the "deflectToVoicemail" call capability is 'True'.
* The 'deflect to voice mail' is only available on HYBRID telephony systems.
* For Cloud telephony systems, the release call will follow the user configuration (which could be deflect or other). */ deflectToVoicemail(): Promise; /** * Deflect (redirect) the current incoming call to the specified phone number.
* This feature can be used only if the "deflectToPhoneNumber" call capability is 'True'.
* The list of phone numbers where we can deflect the incoming call is available in the 'deflectPhoneNumberDestinations' call capability. * @param number - The phone number the call will be deflected to. */ deflectToPhoneNumber(number: string): Promise; /** * Transfer the current call to another call.
* If the destination call is not specified, then the transfer will be done towards the current active call.
* The list of destination calls to which we can deflect the call current is available in the 'transferCallDestinations' call capability. * @param destinationCall - The destination call to which we want to transfer the current call. */ transferToOtherCall(destinationCall?: Call): Promise; /** * Attach the local video stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachLocalVideoStream(HtmlElementId: string): void; /** * Attach the local sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachLocalSharingStream(HtmlElementId: string): void; /** * Attach the remote video stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachRemoteVideoStream(HtmlElementId: string): void; /** * Attach the remote sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachRemoteSharingStream(HtmlElementId: string): void; /** * @internal */ toJSON(): any; /** * This API allows the user to start the recording of the current call. */ startRecording(): Promise; /** * This API allows the user to stop the recording of the current call. */ stopRecording(): Promise; /** * This API allows the user to pause the recording of the current call. */ pauseRecording(): void; /** * This API allows the user to resume the recording of the current call. */ resumeRecording(): void; /** * This API allows the user to get the duration of the current call recording. */ getRecordingDuration(): number; /** * This API allows the user to cancel the recording of the current call, without downloading the recording file. */ cancelRecording(): void; } /** * This CallRecordingState enum lists all the states a record can be in. */ export declare enum CallRecordingState { /** * This 'RECORDING_IN_PROGRESS' state means that the recording is in progress. */ RECORDING_IN_PROGRESS = "RECORDING_IN_PROGRESS", /** * This 'RECORDING_PAUSED' state means that the recording is on pause. */ RECORDING_PAUSED = "RECORDING_PAUSED", /** * This 'RECORDING_STOPPED' state means that the recording is stopped. */ RECORDING_STOPPED = "RECORDING_STOPPED" } /** * @internal * This class represents a call.
* A call is a "short" interaction between the user and one or several contacts (Rainbow users or not) that uses either a WebRTC media (audio, video or screen sharing) or a Telephony media (PBX phone).
* No Rainbow users such as external users can only be engaged into a Telephony call.
* A call is always attached to a conversation. */ export declare class CallRB implements Call { /** * @deprecated OBSOLETE, TO BE REMOVED WHEN DESKTOP REMOVES CODE */ static Status: { UNKNOWN: { key: number; value: string; }; DIALING: { key: number; value: string; }; QUEUED_INCOMMING: { key: number; value: string; }; QUEUED_OUTGOING: { key: number; value: string; }; RINGING_INCOMMING: { key: number; value: string; }; RINGING_OUTGOING: { key: number; value: string; }; ACTIVE: { key: number; value: string; }; HOLD: { key: number; value: string; }; PUT_ON_HOLD: { key: number; value: string; }; RELEASING: { key: number; value: string; }; ANSWERING: { key: number; value: string; }; CONNECTING: { key: number; value: string; }; ERROR: { key: number; value: string; }; ENDED: { key: number; value: string; }; }; /** * NOT TO BE USED ANYMORE !!!! Use callStatus instead ! * @deprecated -- Use {@link callStatus} instead ! */ status: any; /** * @deprecated OBSOLETE, TO BE REMOVED WHEN DESKTOP REMOVES CODE */ static Type: { /** WebRTC call */ WEBRTC: { key: number; value: string; }; /** Telephony call (from PBX) */ PHONE: { key: number; value: string; }; }; /** * @deprecated OBSOLETE, TO BE REMOVED WHEN DESKTOP REMOVES CODE */ static Media: { /** WebRTC audio call */ AUDIO: number; /** WebRTC audio and video call */ VIDEO: number; /** Telephony call (from pbx) */ PHONE: number; /** WebRTC Screen sharing call */ SHARING: number; }; /** * @deprecated OBSOLETE, TO BE REMOVED WHEN DESKTOP REMOVES CODE */ get type(): { key: number; value: string; }; private conversationService; private callService; private callRecorderService?; private rxSubject; private durationTimer; id: string; conversationId: string; connectionId: string; onHold: boolean; putOnHold: boolean; networkQualityIteration: number; isInExternalWindow: boolean; externalWindowRef: any; customCommandsRequested: any; thirdPartyInfos: string; private _contact?; private _status; private _muted; private _capabilities; /** * The type of the call (WebRTC or Telephony) */ callType: CallType; /** * Call duration in seconds */ duration: number; /** * Call direction * This information is relevant only for telephone (PBX) call. For WebRTC call it is undefined. */ direction: CallDirection; /** * Media stream associated to the local party. * Typed as number BUT MUST follow the values defined by CallMedia type or a combination thereof. */ localMedia: number; /** * Media stream associated to the remote party. * Typed as number BUT MUST follow the values defined by CallMedia type or a combination thereof. */ remoteMedia: number; /** * NetworkQuality Value (0 - bad, 1 - medium, 2 - good) representing the current network quality for the call * @readonly */ networkQuality: number; /** * On an incoming call, contains the subject of the call if this has been specified by the caller (inside purpose) * @readonly */ subject: string; get localMedias(): CallMedias; get remoteMedias(): CallMedias; recorder: { state: CallRecordingState; getDuration: () => number; }; isEscalated: boolean; isError: boolean; unifiedPlanActivated: boolean; startDate: Date; isInitiator: boolean; correlatorData: string; correlatorDataHex: string; isHidden: boolean; makecallCtiExtern: boolean; isVm: boolean; participants: any; isConference: boolean; avatars: any[]; fullJid: string; mediaPillarCall: any; isSecondary: boolean; isSecondSharingCall: boolean; relevant: boolean; relevantEquipmentId: string; deviceId: any; isOwner: any; isMPAudioOwner: any; pbxConnectionDown: any; statusInfo: any; globalCallId: string; activeControl: boolean; hasRemoteControlling: boolean; sipWiseData: any; sipWiseEndPointDeviceList: any; noIncomingPopup: boolean; errorMessage: string; autoOffHookResource: string; autoOffHookInProgress: boolean; mixtWebTelSingleStepTrans: boolean; localStreams: MediaStream[]; pinnedMedia: string; dimLocalSharingScreen: boolean; statsInterval: any; originalStream: MediaStream; autoClear: any; autoAnswer: boolean; distantType: string; addVideoAfterUnhold: boolean; callLayoutSizeValues: any; _redirectionCause: CallRedirectionCause; get redirectionCause(): CallRedirectionCause; set redirectionCause(redirectionCause: CallRedirectionCause); private _isRecorded; get isRecorded(): boolean; set isRecorded(value: boolean); callerNumber: string; calledParty: CalledParty; get calledNumber(): string; get alertingNumber(): string; get remoteNumber(): string; remoteParty: { rawPhoneNumber: string; phoneNumber: string; contact: any; jid: string; }; remoteParties: { rawPhoneNumber: string; phoneNumber: string; contact: any; jid: string; direction?: CallDirection; }[]; isWebrtcMpIncomingCallPopup: boolean; webConferenceRoom: any; remoteControled: boolean; remoteControledHybride: boolean; transferInitiatorUserId: string; role: string; ccdGlobalWaitingTime: string; private _lastCause; get lastCause(): string; set lastCause(cause: string); private _PBXDisplay; get PBXDisplay(): string; set PBXDisplay(display: string); get isDoorphoneCall(): boolean; hasRemoteSharingWithAudio: boolean; constructor(status: CallStatus, id: string, type: CallType, contact: Contact); static create(status: any, id: string, type: CallType, contact?: any): CallRB; get contact(): Contact; set contact(contact: Contact); get capabilities(): CallCapabilities; /** * Update globally the capabilities of the call. * Tests are performed to check whether capabilities have been modified and whether the data needs to be updated. * This avoids sending an 'ON_CALL_CAPABILITIES_UPDATED' event if no changement has been detected. * @param capabilities - The new values of the capabilities */ set capabilities(capabilities: CallCapabilities); get isMuted(): boolean; set isMuted(muted: boolean); get callStatus(): CallStatus; set callStatus(status: CallStatus); setCallId(id: string): void; getGlobalCallId(): string; setGlobalCallId(id: string): void; setConversationId(conversationId: string): void; setStatus(status: CallStatus): void; setCorrelatorData(correlatorData: string): void; setCorrelatorDataHex(correlatorDataHex: string): void; setIsVm(isVM: boolean): void; getIsVm(): boolean; setContact(contact: any): void; setSubject(subject: string): void; getRemoteParty(): { rawPhoneNumber: string; phoneNumber: string; contact: any; jid: string; }; setRemoteParty(rawPhoneNumber: string, jid: string, contact: any, phoneNumber?: string): void; getRemoteParties(): { rawPhoneNumber: string; phoneNumber: string; contact: any; jid: string; direction?: CallDirection; }[]; setRemoteParties(remoteParties: any[]): void; getRemotePartyPhoneNumber(): string; getRemotePartyRawPhoneNumber(): string; setRemotePartyPhoneNumberAndJid(rawPhoneNumber: string, jid: string, phoneNumber?: string): void; setRemotePartyContact(contact: any, jid: string): void; setRelevantEquipmentId(relevantEquipmentId: string): void; setParticipants(participants: any[]): void; setConnectionId(connectionId: string): void; getccdGlobalWaitingTime(): string; setccdGlobalWaitingTime(waitingTime: string): void; /** * @public * @param name - the name of the event * @param data - the data to be send (an object) * CallEvents events send to other services via sendEvent() * Can listen to it via Call.subscribe() API */ sendEvent(name: string, data?: any): void; isInConversationWithMobile(): boolean; isInConversationWithDesktopApp(): boolean; toString(): string; toJSON(): any; private manageDurationTimer; private manageIncomingPopupData; startDuration(): void; stopDuration(): void; static getIdFromConnectionId(connectionId: string): string; static getCallIdFromConnectionId(connectionId: string): string; static getDeviceIdFromConnectionId(connectionId: string): string; getDeviceIdFromConnectionIdFromCall(): any; isWebRtcMediaPillar(): boolean; /** * Check if the call is linked to a media pillar context * Note: if it is a new call not already managed through webrtcGatewayService then not conclusive * (because could be linked after) */ isMediaPillarCall(): boolean; isInCallWithMediaPillar(): boolean; getMediaPillarCall(): any; setMediaPillarCall(mediaPillarCallContext: any): void; setDeviceIdSipWise(deviceId: string): void; getDeviceIdSipWise(): any; setConnectionIdSipWise(connectionId: string): void; getConnectionIdSipWise(): string; resetSipWiseData(): void; setInitCauseSipWiseData(cause: string): void; getLastCause(): string; setLastCause(cause: string): void; getInitCauseSipWiseData(): any; setTypeSipWiseData(type: string): void; getTypeSipWiseData(): any; /** * For a sipwise (cloud tel) incoming call to an user who is belong to a hunting group * We have to known if the call is for the group or privatly for the user * This methode gives this info. * @returns Return true if the call is for the hunting group false otherwise */ isHuntingGroupCallSipWise(): boolean; isHuntingGroupCallQueueSipWise(): boolean; isSipWiseSfuIncomingCall(): boolean; isSfuPbxCall(): boolean; setAssocPhoneCallId(assocPhoneCallId: any): void; getAssocPhoneCallId(): any; setEndPointDeviceListSipWise(deviceList: any): void; getEndPointDeviceListSipWise(): any; setAutoOffHookResource(resource: string): void; getAutoOffHookResource(): string; setAutoOffHookInProgress(inProgress: boolean): void; getAutoOffHookInProgress(): boolean; setMixtWebTelSingleStepTrans(flag: boolean): void; getMixtWebTelSingleStepTrans(): boolean; setDirection(direction: CallDirection): void; getDirection(): CallDirection; getRecordingDuration(): number; static StatusDisplay: { UNKNOWN: string; ENDED: string; DIALING: string; QUEUED_INCOMMING: string; QUEUED_OUTGOING: string; RINGING_INCOMMING: string; RINGING_OUTGOING: string; ACTIVE: string; HOLD: string; PUT_ON_HOLD: string; RELEASING: string; ANSWERING: string; CONNECTING: string; ERROR: string; }; getStatusForDisplay(): string; /** * Attach the local video stream to a given HTML VIDEO tag element; * @param HtmlElement - TheHTML VIDEO tag element visible on the page */ attachLocalVideoStreamToElement(HtmlElement: HTMLElement): void; /** * Attach the local sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The HTML VIDEO tag element visible on the page */ attachLocalSharingStreamToElement(HtmlElement: HTMLElement): void; /** * Attach the remote video stream to a given HTML VIDEO tag element; * @param HtmlElementId - The HTML VIDEO tag element visible on the page */ attachRemoteVideoStreamToElement(HtmlElement: HTMLElement): void; /** * Attach the remote sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The HTML VIDEO tag element visible on the page */ attachRemoteSharingStreamToElement(HtmlElement: HTMLElement): void; /** * Subscribe to updates on the current call (all events are of RBEvent * @param callback - The callback function that will be called when events are received * @param eventNames - (optional) array of event to listen * @returns Returns RxJS Subscription */ subscribe(callback: (event: RBEvent) => any, eventNames?: CallEvents | CallEvents[]): Subscription; /** * Answer the current incoming call. * This feature can be used only if the "answer" call capability is 'True'. * By default, the answer is done with AUDIO only. * If the 'withVideo' option is set to 'True' and the incoming call contains video, the answer will directly be done with audio and video. * @param withVideo - Option to answer the call directly with audio and video. Default value is 'False' */ answer(withVideo?: boolean): Promise; /** * Release the current call. * This method allows to decline an incoming call or stop an outgoing call. * This feature can be used only if the "release" call capability is 'True'. */ release(): Promise; /** * Put on hold the current call. * This feature can be used only if the "hold" call capability is 'True'. */ hold(): Promise; /** * Retrieve from hold the current call. * This feature can be used only if the "retrieve" call capability is 'True'. */ retrieve(): Promise; /** * Mute the call * This feature can be used only if the "mute" call capability is 'True'. */ mute(): void; /** * Unmute the call * This feature can be used only if the "unmute" call capability is 'True'. */ unmute(): void; /** * Send DTMF signal to the current call. * This feature can be used only if the "dtmf" call capability is 'True'. * @param dialKey - the DTMF character sequences to be send * Only the following characters are authorised: the ten single digits (0..9), the letters (a,b,c,d), the asterisk (*) and the pound sign (#). */ sendDTMF(dialKey: string): void; /** * Add the AUDIO media to the current call. * This feature can be used only if the "addAudio" call capability is 'True' and available only for WebRTC Calls. */ addAudio(): Promise; /** * Add the VIDEO media to the current call. * This feature can be used only if the "addVideo" call capability is 'True' and available only for WebRTC Calls. */ addVideo(): Promise; /** * Add the SHARING media to the current call. * This feature can be used only if the "addSharing" call capability is 'True' and available only for WebRTC Calls. */ addSharing(): Promise; /** * Remove the VIDEO media from the current call. * This feature can be used only if the "removeVideo" call capability is 'True' and available only for WebRTC Calls. */ removeVideo(): Promise; /** * Remove the SHARING media from the current call. * This feature can be used only if the "removeSharing" call capability is 'True' and available only for WebRTC Calls. */ removeSharing(): Promise; /** * Add participants to the current call. * The participants could be other Rainbow users or phone numbers (if the PBX system supports it). * This will result in a new conversation being created with web conference inside. The active call will be "transferred" to the bubble conference. * @param participants - The list of participants to be added to the call * @returns The new bubble conversation where the web conference is active */ addParticipantsToCall(participants: CallDestination[]): Promise; /** * Create a conference from 2 calls, including the current call. * This will lead to the creation of either a web conference (managed via a Rainbow bubble) or a pure telephone conference (managed by a PBX system). * In the first case, a new conversation is created with the web conference inside. The two calls will be "transferred" to the bubble conference. * In the second case, a new 'conference' type conversation is created. This applies only with a Rainbow Hybrid (OXO or OXE) telephone system. * This feature can be used only if the "mergeCalls" call capability is 'True'. * @returns The new conversation or undefined depending on the type of conference created. */ activateConference(): Promise; /** * Blind transfer the current call another destination which could be any rainbow user or phone number. * A blind transfer is when you transfer a call directly to another party without consulting with the person receiving the call. * In other words, there is no need to call the other party to make the transfer. * This feature is available only if the connected user is behind a Rainbow Hub telephone system. * @param destination - The destination of the blind transfer */ blindTransfer(destination: CallDestination): Promise; /** * Deflect the incoming call to the voice mail. * This feature can be used only if the "deflectToVoicemail" call capability is 'True'. * The 'deflect to voice mail' is only available on HYBRID telephony systems. * For Cloud telephony systems, the release call will follow the user configuration (which could be deflect or other). */ deflectToVoicemail(): Promise; /** * @public * Deflect (redirect) the current incoming call to the specified phone number. * This feature can be used only if the "deflectToPhoneNumber" call capability is 'True'. * The list of number where we can deflect the incoming call is available in the 'deflectPhoneNumberDestinations' call capability. * @param number - The phone number the call will be deflected to. */ deflectToPhoneNumber(number: string): Promise; /** * Transfer the current call to another call. * If the destination call is not specified, then the transfer will be done towards the current active call. * The list of destination calls to which we can deflect the call current is available in the 'transferCallDestinations' call capability. * @param destinationCall - The destination call to which we want to transfer the current call. */ transferToOtherCall(destinationCall?: Call): Promise; /** * Attach the local video stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachLocalVideoStream(HtmlElementId: string, HtmlElement?: HTMLElement): void; /** * Attach the local sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachLocalSharingStream(HtmlElementId: string): void; /** * Attach the remote video stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachRemoteVideoStream(HtmlElementId: string): void; /** * Attach the remote sharing stream to a given HTML VIDEO tag element; * @param HtmlElementId - The ID of the HTML VIDEO tag element visible on the page */ attachRemoteSharingStream(HtmlElementId: string): void; /** * Start the recording of a call * @returns the call updated or an error */ startRecording(): Promise; /** * Pause the recording * @returns the call updated or an error */ pauseRecording(): Promise; /** * Resume the recording * @returns the call updated or an error */ resumeRecording(): Promise; /** * Stop the recording * @returns the call updated or an error */ stopRecording(): Promise; /** * Cancel the recording * @returns the call updated or an error */ cancelRecording(): Promise; } //# sourceMappingURL=call.model.d.ts.map