import { Subject, Subscription } from 'rxjs'; import { CallRB, CallStatus } from '../../models/call.model'; import { Contact } from '../../models/contact.model'; import { RBEvent } from '../../models/event.model'; import { Bubble } from '../../models/bubble.model'; import { CliOption } from '../../models/cli.model'; import { Service } from '../../services/service'; import { TelephonyServiceSipWise } from "../../services/telephony/telephonySipWise.service"; import { ITelephonyEventHandler } from "../../services/telephony/telephonyHybridEventHandler"; import { SupervisionService } from "../../services/telephony/supervision.service"; import { TelephonyCCDAgentService } from './telephonyCcdAgent.service'; export declare const TELEPHONY_SVC = "TelephonyService"; export interface IOxeGroup { huntingGroupNumber: string; huntingGroupName: string; logged: boolean; } /** * Collection of call distribution group (hunt group) types. */ export declare enum HuntGroupType { /** * Hunt group. */ HUNTING_GROUP = "hunting_group", /** * Hunt group with waiting queue. */ CALL_QUEUE = "call_queue", /** * Manager/Assistant group. * * @deprecated See 'manager_assistant' subtype */ MANAGER_ASSISTANT = "manager_assistant" } /** * Collection of call distribution group (hunt group) sub-types. */ export declare enum HuntGroupSubType { /** * Regular hunt group. * * @remarks Voice attendant users cannot be part of a 'default' group. */ DEFAULT = "default", /** * Attendant hunt group. * * @remarks Only Voice attendant users can be part of a 'hg_attendant' group. */ ATTENDANT = "hg_attendant", /** * Manager/Assistant group. */ MANAGER_ASSISTANT = "manager_assistant" } /** * Collection of call queue distribution policies. */ export declare enum HuntGroupPolicy { /** * Parallel hunting. * * @remarks only 'parallel' policy for 'hg_attendant' hunting group. */ PARALLEL = "parallel", /** * Serial hunting. * * @remarks only 'serial' for 'manager_assistant' group. */ SERIAL = "serial", /** * Circular hunting (ie. the calls are distributed "round-robin"). */ CIRCULAR = "circular" } export interface HuntGroupMember { connected: string; displayName: string; memberId: string; roles: string[]; status: 'active' | 'idle'; } export interface HuntGroup { availableMembers: number; canBeJoined: boolean; connectedMembers: number; id: string; members: HuntGroupMember[]; name: string; policy: HuntGroupPolicy; roomId: string; subType: HuntGroupSubType; totalAgents: number; totalMembers: number; type: HuntGroupType; } export declare class TelephonyService extends Service { calls: Record; pendingMakeCalls: any[]; agentStatus: any; starting: boolean; started: boolean; isOxo: boolean; isOxe: boolean; isThirdParty: boolean; forwardObject: any; nomadicObject: any; voiceMailFeatureEnabled: boolean; voicemailNumber: string; /*********************************************************/ /** LIFECYCLE STUFF */ /*********************************************************/ private listeners; private subscriptions; private CALLSERVICE_NS; private sipWise; rxSubject: Subject; private mainService; private settingsService; private xmppService; private logger; private authService; private profileService; private errorHelperService; private contactService; private eventService; private webrtcP2PService?; telephonyServiceSipWise?: TelephonyServiceSipWise; supervisionService?: SupervisionService; ccdAgentService?: TelephonyCCDAgentService; private pbxId; makingCall: boolean; private mediaPillarConfigured; private mediaPillarRemoteExtension; private mediaPillarAlive; private nomadicAnswerNotTakedIntoAccount; sipWiseUserGroupsData: any; private oxeUserGroupData; isBasicCallAllowed: boolean; private isSecondCallAllowed; private isTransferAllowed; private isConferenceAllowed; private isDeflectCallAllowed; private isForwardEnabled; private isNomadicEnabled; private isAdhocConferenceAllowed; private isMixPstnWebRtcAllowed; private isOXEDeskphoneNonRinging; private isOxeSecretIdentity; private isOxeDoNotDisturb; isOXEDynamicStateReceived: boolean; private isCloudPbxRejectCall; private activeConversation; private userJidTel; private portalURL; telephonyEventHandler: ITelephonyEventHandler; private telAPIPromiseInProgress; private cliOptions; private currentCli; private offlineCallManagementTimer; autoOffHookConference: any; webConferenceInvitDeskphoneRoom: any; internalTestCallIndex: number; remoteControlledPhoneCallIds: Set; private autoAnswerCorrelatorIdResourceMap; private autoAnswerTimeout; static getInstance(): TelephonyService; static build(): TelephonyService; private constructor(); publish(event: RBEvent): void; subscribe(callback: any): Subscription; /** * Start service method * @public * @async * @instance * @function */ start(): Promise; /** * Attach the handlers : we request the event handler to start its (xmpp) handler(s) * @private * @instance * @function */ private attachHandlers; /** * Stop service method * @public * @async * @instance * @function */ stop(): Promise; /** * Handling of the telephony presence event * @private * @param {any} attr reference to the telephony service SipWise * @async * @returns {Promise} Promise resolved with true value because it is a xmpp event handler in order to continue next events handling * @instance * @function */ private onTelPresenceChange; /** * Laucnh telephony initilization with server * @private * @instance * @function */ launchTelephonyInitilization(attemp?: number): void; /** * Handling of the xmpp reconnection event * @public * @instance * @function */ reconnect(): void; /** * Handling of the telephony offline event * @private * @instance * @function * @param {boolean} xmppOffline True if xmpp is down */ private telephonyOfflineCallManagement; /** * Retrieve and Process the telephony agent status service * @private * @async * @returns {Promise} Status promise resolved when the handling is complete * @instance * @function */ private getAgentStatus; /** * Retrieve telephony config ( devices, routingInfo, groups, emergency data ), used by sipwise * @private * @async * @returns {Promise} Status promise resolved when the handling is complete * @instance * @function */ private getTelephonyConfig; /** * Retrieve and Process the telephony connections snapshot service (implemented by iq request for hybrid system) * @private * @param {boolean} secondary True for a secondary call * @async * @returns {Promise} Status promise resolved when the handling is complete * @instance * @function */ snapshotCalls(secondary: boolean): Promise; deleteCallsNotInList(calls: CallRB[]): void; checkCallWithLostAudio(call: CallRB): Promise; /** * Retrieve the telephony connections snapshot service, implemented by REST api request, * used by gatewayservice in case od parallel oxe hunting groups * @public * @param {boolean} secondary True for a secondary call * @async * @returns {Promise} Promise resolved with the snaphot result data * @instance * @function */ snapshotDevice(secondary: boolean): Promise; /** * Retrieve the telephony call snapshot service * Note: Not Used currently * @public * @param {string} callId Call Identfier * @async * @returns {Promise} Promise resolved with the handling is complete * @instance * @function */ /** * Call creation for one connection element extracted from the snapshot result * @private * @param {any} connectionElemObj Connection element of the snapshost data * @param {boolean} secondary True for a secondary call * @param serverSecondary * @async * @returns {Promise} Promise resolved with the created call * @instance * @function */ private createCallFromConnectionElem; setCalledPartyFromEvent(event: any, call: CallRB, endpointPhoneNumber?: string, endpointJid?: string): Promise; setCalledParty(call: CallRB, phoneNumber: string, jid: string, displayName: string, firstName: string, lastName: string, role: string): boolean; /** * Calculate the DisplayName * @private * @param {string} firstname Contact firstname * @param {string} lastname Contact lastname * @returns {string} Computed displayName * @instance * @function */ private computeDisplayName; /** * Contact list creation for participant elements extracted from the snapshot result * @private * @param {any} participants Participant elements of the snapshost data * @async * @returns {Promise} Promise resolved with the list of contacts * @instance * @function */ private getParticipantsFromParticipantsElem; /** * Retrieve an existing call or create a new call with the given status, connectionId and contact * @public * @param {any} status Call status * @param {string} connectionId Call connection identifier * @param {Contact} [contact] Contact identifying the other party of the call * @returns {Call} Found call or created call * @instance * @function */ getOrCreateCall(status: CallStatus, connectionId: string, contact?: Contact): CallRB; /** * Retrieve an existing sipwise call or create a new sipwise call with the given status, callId * @public * @param {any} status Call status * @param {string} callId Call identifier * @returns {Call} Found call or created call * @instance * @function */ createCallSipWise(status: CallStatus, callId: string): CallRB; /** * Retrieve an existing sipwise call or create a new sipwise call with the given status, callId, legId, deviceId and contact * @public * @param {CallStatus} status Call status * @param {string} callId Call identifier * @param {string} legId Leg identifier * @param {string} [deviceId] Device identifier * @param {Contact} [contact] Contact identifying the other party of the call * @returns {Call} Found call or created call * @instance * @function */ getOrCreateCallSipWise(status: CallStatus, callId: string, legId: string, deviceId?: string, contact?: Contact): CallRB; /*********************************************************/ /** CALL HANDLERS */ /*********************************************************/ /** * Retrieve the active call (if one exists) * @public * @returns {Call} Found active call (or null if not found) * @instance * @function */ getActiveCall(): CallRB; /** * Retrieve the call with the given searched status (if one exists) * @public * @param {any} searchedCallStatus Status of call to search * @returns {Call} Found call with searched status (or null if not found) * @instance * @function */ getCall(searchedCallStatus: any): CallRB; /** * Retrieve the ongoing outgoing call (if one exists) * @public * @returns {Call} Found ongoing outgoing call (or null if not found) * @instance * @function */ getOngoingOutgoingCall(): CallRB; /** * Retrieve the ongoing outgoing call with the given contact (if one exists) * @public * @param {Contact} contact Contact identifying the other party of the call * @returns {Call} Found ongoing outgoing call with given contact (or null if not found) * @instance * @function */ getOngoingOutgoingCallForContact(contact: Contact): CallRB; /** * Retrieve the list of ringing incoming calls (if some exist) * @public * @returns {CallRB[]} Found ringing incoming call array (or empty array if no calls found) * @instance * @function */ getRingingIncomingCalls(): CallRB[]; /** * Retrieve the list of queued incoming calls (if some exist) * @public * @returns {CallRB[]} Found queued incoming call array (or empty array if no calls found) * @instance * @function */ getQueuedIncomingCalls(): CallRB[]; /** * Retrieve the list of hold (put on hold by the user) calls (if some exist) * @public * @returns {CallRB[]} Found hold call array (or empty array if no calls found) * @instance * @function */ getCallsOnHold(): CallRB[]; /** * Retrieve the list of calls with a status equal to a given status (or a list of given status) (if some exist) * @public * @param {any} [searchedCallStatus] Status (or array of status) of calls to search. If not passed, it returns all calls except incoming/queued ringing calls * @returns {CallRB[]} List of calls matching the searched status (or empty array if no calls found) * @instance * @function */ getCalls(searchedCallStatus?: CallStatus[] | CallStatus): CallRB[]; /** * Retrieve the list of calls which are not idle (not in UNKNOWN status). Note that this method also returns the ringing/queued incoming calls * @public * @returns {CallRB[]} List of calls not idle (not in ENDED status) * @instance * @function */ getNotIdleCalls(): CallRB[]; /** * Is the user in idle telephony state (no current telephony calls) * @public * @returns {boolean} true if the user is idle (no current telephony calls) * @instance * @function */ isUserIdle(): boolean; /** * Retrieve the list of active calls linked to a given contact (other party). * Active calls means calls that are not idle and not in ringing/queued incoming status * @public * @param {Contact} contact Contact to search in the call contact * @returns {CallRB[]} List of calls linked to the given contact * @instance * @function */ getActiveCallsForContact(contact: Contact): CallRB[]; /** * Retrieve the list of calls linked to a given contact (other party), whatever the call status is (if any) * @public * @param {Contact} contact Contact to search in the call contact * @returns {CallRB[]} List of calls linked to the given contact; empty array if no calls found * @instance * @function */ getCallsForContact(contact: Contact): CallRB[]; /** * Retrieve the conference call linked to a given contact (if one exists) * @public * @param {Contact} contact Contact for which we search a call * @returns {Call} Found conference call linked to the given contact (or null if not found) * @instance * @function */ getConferenceCallForContact(contact: Contact): CallRB; /** * Retrieve another call with same global call id * @public * @param {Call} sourceCall Source call with the globalCallId to search for * @returns {Call} Found call with same global call id as source call (or null if not found) * @instance * @function */ getOtherCallWithSameGlobalCallId(sourceCall: CallRB): CallRB; /** * Log the makecall request service data * @private * @param {any} reqData Data body of makecall request * @param {Contact} contact Contact for which we search a call * @instance * @function */ logMakecallReqData(reqData: any, contact: Contact): void; /*************************************************************/ /*************************************************************/ /** * Makecall service * @public * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @param {string} [callSubject] Call subject * @param {any} [correlatorData] Call correlator data * @param {any} [correlatorDataHex] Call correlator data hexa * @param {string} [calledNumber] Called number * @async * @returns {Promise} Promise resolved with the created call identifier (callId) * @instance * @function */ makeCall(contact: Contact, phoneNumber: string, callSubject?: string, correlatorData?: any, correlatorDataHex?: any, calledNumber?: string, bubble?: Bubble): Promise; /** * Display a notification during 5 seconds in case of makecall service failures * @private * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @instance * @function */ private displayNotAllowedNotification; /** * Make a call while no current call is in progress * @private * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @param {string} callSubject Call subject * @param {any} correlatorData Call correlator data * @param {any} correlatorDataHex Call correlator data hexa * @param {string} calledNumber Called number * @async * @returns {Promise} Promise resolved with the created call identifier (callId) * @instance * @function */ private makeSimpleCall; /** * Make a consultation call while there is one existing active call * @private * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @param {string} callId Call identifier of the existing active call * @param {any} correlatorData Call correlator data * @param {any} correlatorDataHex Call correlator data hexa * @param hidden * @async * @returns {Promise} Promise resolved with the created call identifier (callId) * @instance * @function */ private makeConsultationCall; /** * Send the makecall or consultation call service request to the server * @private * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @param {string} reqUrl Request url * @param {any} reqData Service request data * @param hidden * @async * @returns {Promise} Promise resolved with the created call identifier (callId) * @instance * @function */ private doRequestMakecall; /** * Makecall by phone number: this method is used to make a call to a given phone number * (where as the makecall service is used when the called destination is identified by a contact object) * Used by SDK (public) * Warning when modifying this method * @public * @param {string} phoneNumber The phone number to call * @param {string} [callSubject] Call subject * @param {any} [correlatorData] Call correlator data * @param {any} [correlatorDataHex] Call correlator data hexa * @async * @returns {Promise} Promise resolved with the created call identifier (callId) * @instance * @function */ makeCallByPhoneNumber(phoneNumber: string, callSubject?: string, correlatorData?: any, correlatorDataHex?: any): Promise; /** * Extract phone info from given called contact and called number * @public * @param {Contact} contact The contact to call * @param {string} phoneNumber The phone number to call * @param {any} [correlatorData] Call correlator data * @param {any} [correlatorDataHex] Call correlator data hexa * @returns {any} The object with computed numbers * @instance * @function */ getPhoneInfo(contact: Contact, phoneNumber: string, correlatorData?: any, correlatorDataHex?: any): any; /** * Build an error message, used by connections snapshot service * @private * @param {any} data Connections snapshot service response data * @param {string} actionLabel context label * @returns {string} The built error message * @instance * @function */ private getErrorMessage; /** * Send the release call service to server * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call Call to relesae * @instance * @function */ releaseCall(call: CallRB): Promise; /** * Send the release call service to server * Warning when modifying this method * @private * @param {Call} call Call to relesae * @returns {Call} The relesaed call * @instance * @function */ innerReleaseCall(call: CallRB): Promise; /** * release call service to server and notify event to stop ringing/popup, used to decline ringing incoming calls * @private * @param {Call} call Call to relesae * @returns {Promise} Status promise resolved when the call is released * @instance * @function */ private releaseCallAndNotify; /** * Decline ringing incoming call service * @public * @param {Call} call Call to decline * @returns {Promise} Status promise resolved when the call is declined * @instance * @function */ declineCall(call: CallRB): Promise; /** * Delete the call in web client if it doesn't exist on server (after an service error returned by server) * @private * @param {Error} error received error from the server * @param {Call} call Call to check * @instance * @function */ private deleteCallIfInvalid; /** * Send the answer Call service request to the server * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The call to answer * @async * @returns {Promise} Promise resolved with the answered call * @instance * @function */ answerCall(call: CallRB): Promise; /** * Send the answer Call service request to the server * @private * @param {Call} call The call to answer * @async * @returns {Promise} Promise resolved with the answered call * @instance * @function */ private doRequestAnswerCall; /** * Send the hold Call service request to the server * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The call to put on hold * @async * @returns {Promise} Promise resolved with the held call * @instance * @function holdCall */ holdCall(call: CallRB): Promise; /** * Send the retrieve Call service request to the server * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The held call to retrieve * @async * @returns {Promise} Promise resolved with the held call * @instance * @function retrieveCall */ retrieveCall(call: CallRB): Promise; /** * Send the alternate Call service request to the server * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} activeCall The active call to alternate * @param {Call} heldCall The held call to alternate * @async * @returns {Promise} Status promise resolved when the alternate service is done * @instance * @function alternateCall */ alternateCall(activeCall: CallRB, heldCall: CallRB): Promise; /** * Deflect Call to voicemail service : request to the server with a voicemail destination (and stop ringing if MP call) * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The incoming call to deflect * @async * @returns {Promise} Status promise resolved when the call is deflected to the voicemail * @instance * @function deflectCallToVM */ deflectCallToVM(call: CallRB): Promise; /** * Send the deflect Call service request to the server with a voicemail destination * @private * @param {Call} call The incoming call to deflect * @async * @returns {Promise} Status promise resolved when the call is deflected to the voicemail * @instance * @function innerDeflectCallToVM */ private innerDeflectCallToVM; /** * Send the deflect Call service request to the server with a phone number as destination * SipWise only * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The active call to deflect * @param {string} number phone number of the deflect destination * @async * @returns {Promise} Status promise resolved when the call is deflected * @instance * @function deflectCallToNumber */ deflectCallToNumber(call: CallRB, number: string): Promise; deflectCallToContact(call: CallRB, contact: Contact): Promise; /** * Send the deflect Call service request to the server according the forward busy rule * SipWise only * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} call The active call to deflect * @async * @returns {Promise} Status promise resolved when the call is deflected * @instance * @function deflectCallFollowBusyRule */ deflectCallFollowBusyRule(call: any): Promise; /** * Send the transfer Call service request (transfer between 2 existing calls) * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} activeCall The active call to transfer: this call may have a status ACTIVE or RINGING_OUTGOING * @param {string} heldCall The held call to transfer * @async * @returns {Promise} Status promise resolved when the calls are transferred * @instance * @function transfertCall */ transfertCall(activeCall: CallRB, heldCall: CallRB): Promise; /** * Send the blind transfer Call service request (transfer 1 existing active call to a destination number) * SipWise only * Used by SDK (public) * Warning when modifying this method * @public * @param {Call} activeCall The active call to transfer: this call must have a status ACTIVE * @param {string} calleeNumber The destination number of the transfer * @param {any} [destionationObject] Destination object containing the properties "userId" and "resource", * which identify the destination user identifier and xmpp client resource * @param {Contact} [contact] destination contact (used for hybrid systems) * @async * @returns {Promise} Status promise resolved when the active call is transferred * @instance * @function blindTransfertCall */ blindTransfertCall(activeCall: CallRB, calleeNumber: string, destionationObject?: any, contact?: Contact): Promise; /** * Send the conference Call service request to the server (conferencing 2 existing calls of the current user: * this is a 3 parties conference with the current user and the 2 other call parties) * In case of RB Hub, the active call can also be a WEBRTC call (or PSTN), and the held can also be a WEBRTC call (or PSTN); One of both calls should be PSTN ! * NB ! In case of RB Hub, we need to have the Web Conference Service and the Room / Bubble service included the project * @public * @param {Call} activeCall The active call to conference: this call must have a status ACTIVE * @param {Call} heldCall The held call to conference * @async * @returns {Promise} Status promise resolved when the calls are conferenced; In case of RB Hub confrence call, the promise will return the bubble where the conference is started * @instance * @function conferenceCall */ conferenceCall(activeCall: CallRB, heldCall: CallRB): Promise; /** * Make an adhoc conference call with 3 participants (for RB Hub case) * The call could be 2 PSTN calls, or 1 PSTN and 1 WEBRTC call * @private * @param {Call} activeCall The active call to conference: this call must have a status ACTIVE (it could be a PSTN call or WebRTC call) * @param {Call} heldCall The held call to conference (it could be a PSTN call or WebRTC call) * @async * @returns {Promise} The room / bubble where the conference is started * @instance * @function conferenceCallSipWise */ private conferenceCallSipWise; /** * Configure the sipwise forward to a device * @public * @param {string} phoneNumber phonenumber on which the call will be forwarded * @param {string} destType Type of destination (internalNumber, externalNumber) * @param {string} forwardType Type of forward (immediate, busy, noreply) * @param {string} destId destination Id (if available, a contact or a HG Id) to manage the forward to welcome case * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function sipWiseForwardToDevice */ sipWiseForwardToDevice(phoneNumber: string, destType: string, forwardType: string, destId?: string): Promise; /** * Cancel the sipwise forward to a device * @public * @param {string} forwardType Type of forward (immediate, busy, noreply) * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function sipWiseCancelForward */ sipWiseCancelForward(forwardType: string): Promise; /** * Configure forward to a device * @public * @param {string} phoneNumber phonenumber on which the call will be forwarded * @param {string} forwardType type of forward (immediate, busy, noreply) * @param {string} destId the (optional) dest Id (a contact Id or HG id) in order to manage welcome forward * @param {Contact} [user] user (optional) for which the forward is modified (used by supervisors only). If not set, the user modified is the logged user * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function forwardToDevice */ forwardToDevice(phoneNumber: string, forwardType: string, destId?: string, user?: Contact): Promise; /** * Configure the forward to the Voicemail * @public * @param {string} [forwardType] Type of forward (immediate, busy, noreply) * @param {Contact} [user] user for which the forward is modified (used by supervisors only). If not set, the user modified is the logged user * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function forwardToVoicemail */ forwardToVoicemail(forwardType?: string, user?: Contact): Promise; /** * Cancel the forward * @public * @param {Contact} [user] user for which the forward is cancelled (used by supervisors only). If not set, the user modified is the logged user * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function cancelForward */ cancelForward(user?: Contact): Promise; /** * Cancel the forwardOnCloudIssue * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function cancelForwardOnCloudIssue */ cancelForwardOnCloudIssue(): Promise; /** * To know the forward Status * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function getForwardStatus */ getForwardStatus(): Promise; /** * Configure the sipwise Forward to a device * @public * @returns {any} return the forward object which defines the forward status * @instance * @function getForwardObject */ getForwardObject(): any; isImmediateForwardActivated(): boolean; /** * For sipwise only * return the welcome Id associated to the targetId (a contact or HG) * @param targetId * @public * @async * @returns {Promise} return the welcomeId or null * @instance * @function getSipWiseWelcomeInfo */ getSipWiseWelcomeInfo(targetId: string): Promise; /** * return if the overflow is activated to the voicemail * @public * @async * @returns {Promise} return if the overflow is activated * @instance * @function isOverFlowStatusActivated */ isOverFlowStatusActivated(): Promise; /** * Configure the nomadic mode * @public * @param {string} phoneNumber phonenumber which will be monitored * @param {boolean} isUnchangeableNumber allow to define the phonenumber like a rainbowNumber * @param {boolean} NotTakeIntoAccount the result won't be taken in account (above used un graphical interface) * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function nomadicLogin */ nomadicLogin(phoneNumber: string, isUnchangeableNumber?: boolean, NotTakeIntoAccount?: boolean): Promise; /** * Configure the nomadic mode on the office phone * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function nomadicLoginOnOfficePhone */ nomadicLoginOnOfficePhone(): Promise; /** * Remove the nomadic mode * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function nomadicLogout */ nomadicLogout(): Promise; /** * To know the nomadic Status * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function getNomadicStatus */ getNomadicStatus(): Promise; /** * this method is no more used * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function setNomadicState */ setNomadicState(): Promise; /** * Update the Nomadic Object with new data received * @public * @param {any} response new data received * @async * @returns {Promise} return if the main device is nomadic configured * @instance * @function updateNomadicData */ updateNomadicData(response: any): Promise; /** * Return the nomadic object * @public * @returns {any} nomadic object returned * @instance * @function getNomadicObject */ getNomadicObject(): any; /** * Return the nomadic destination * @public * @returns {string} nomadic destination returned * @instance * @function getNomadicDestination */ getNomadicDestination(): string; /** * Indicates wether the user is in Office mode * @public * @returns {boolean} true if the nomadic mode of the user is Office * @instance * @function isOfficeMode */ isOfficeMode(): boolean; /** * Method isMediaPillarConfigured * @public * @returns {boolean} true if media pillar is configured for this user (configuration + rights) * @instance * @function isMediaPillarConfigured */ isMediaPillarConfigured(): boolean; /** * Method getMyMediaPillarRemoteExtensionRefreshed * @public * @returns {string} my mediaPillar remote extension ("" if not already obtained from server ) * @instance * @function getMyMediaPillarRemoteExtensionRefreshed */ getMyMediaPillarRemoteExtensionRefreshed(): Promise; /** * Method getMyMediaPillarRemoteExtension * @public * @returns {string} my mediaPillar remote extension ("" if not already obtained from server ) * @instance * @function getMyMediaPillarRemoteExtension */ getMyMediaPillarRemoteExtension(): string; /** * Method isMediaPillarAvailable * @public * @returns {boolean} true if media pillar is available for this user (configuration + infra Up) * @instance * @function isMediaPillarAvailable */ isMediaPillarAvailable(): boolean; /** * Method isMediaPillarUserSelected * @public * @returns {boolean} true if media pillar (Computer mode) is selected for this user * @instance * @function isMediaPillarUserSelected */ isMediaPillarUserSelected(): boolean; /** * Send DTMF to a call * @public * @param {Call} call callto send a DTMF * @param {string} dtmf dtmf to send * @async * @returns {Promise} Promise return the dtmf status * @instance * @function sendDtmf */ sendDtmf(call: CallRB, dtmf: string): Promise; clearCall(call: CallRB, nobroadcast?: boolean): void; startAsPhoneNumber(phoneNumber: string): boolean; updateContactFromOutlookInfos(__contact: Contact, __phoneNumber: string, __reload?: any, __mode?: any): any; /*********************************************************/ /** SIPWISE STUFF */ /*********************************************************/ isSipWiseRoot(): boolean; setSipWise(condition: boolean): void; isSipWise(): boolean; isSipWiseEmulatedRingBackTone(): boolean; /************************* DEVICE STUFF *************************/ /** * getSipWiseRoutingInfo * get from server the main device * (result update with event) */ getSipWiseRoutingInfo(): void; /** * setSipWiseCurrentDevice * set on server the current device * currentDeviceId : the deviceId use as main/current * @param {string} currentDeviceId current device identifier */ setSipWiseCurrentDevice(currentDeviceId: string): void; /****************************************************************************************/ /************************* CLI (Call Line identification) STUFF *************************/ /****************************************************************************************/ /** * Method returns the CLI current option (only for SipWise user) * @param {boolean} [forceUpdate] whether the local data is updated * @returns {Promise} Current CLI option of user * @instance * @function getSipWiseCurrentCli */ getSipWiseCurrentCli(forceUpdate?: boolean): Promise; /** * Method returns the CLI options available (only for SipWise user) * @param {boolean} [forceUpdate] whether the local data is updated * @returns {Promise} All CLI options of user * @instance * @function getSipWiseAllCli */ getSipWiseAllCli(forceUpdate?: boolean): Promise; /** * Method returns the CLI current option if editable (only for SipWise user) * @returns {Promise} Current CLI option of user * @instance * @function getSipWiseCurrentCliIfEditable */ getSipWiseCurrentCliIfEditable(): Promise; setSipWiseCliOption(cliOption: CliOption): Promise; /** * Method returns the current CLIR option (only for SipWise user) * @returns {Promise} Current CLIR option of user * @instance * @function */ getSipWiseClir(): Promise; /** * Method used to change the value of CLIR * @param {boolean} clirActivation whether CLIR should be activated * @returns {Promise} resolve when option is set * @instance * @function */ setSipWiseClirOption(clirActivation: boolean): Promise; /** * @public * @function isMonolineIncomingModeActivated * @instance * @description * Returns TRUE if the monoline settings is activated for user or PBX system used by the user. * In that case, all second incoming calls should be ignored by the device that is currently in a call * @returns {boolean} resolve when option is set */ isMonolineIncomingModeActivated(): boolean; /** * @public * @function getTelephonyLinePolicy * @instance * @description * Returns the telephonyline policy of the current user (used for hub systems only) * Possible values are "mono_line" / "multi_lines" / "multi_lines_plus" * @returns {boolean} resolve when data is set */ getTelephonyLinePolicy(): string; /************************* GROUPS STUFF *************************/ /** * Retrieve the user's hunt groups * @public * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function getUserHuntGroupsConfig */ getUserHuntGroupsConfig(): Promise; /** * Retrieve the Dynamic State * @public * @async * @param {string} userJidTel Telephony jid identifier of the user for which we request the ringing state * (this param is optional : not used to get the logged user's ringing state; it is used * by an attendant to get the ringing state of a supervised user) * @returns {Promise} Status promise resolved when the process is complete * @instance * @function getOxeDynamicState */ getOxeDynamicState(userJidTel?: string): Promise; handleOxeUserGroupData(inHuntingGroupAttr: boolean): Promise; /** * getOxeUserGroupData * @returns {IOxeGroup} Oxe hunt group data of the logged user: * it returns undefined if the user does not belong to an Oxe hunting group */ getOxeUserGroupData(): IOxeGroup; /** * setOxeUserGroupLogged * Modify the internal logged state in the oxeUserGroupData structure * @param {boolean} logged true if the user is looged in the group */ setOxeUserGroupLogged(logged: boolean): void; /** * setOxeDeskPhoneNonRinging * Modify the OXE set Deskphone in non Ringing state * @param {boolean} activated true if Deskphone in non Ringing state * @param activated */ setOxeDeskPhoneNonRinging(activated: boolean): void; /** * getOxeDeskPhoneNonRinging * @returns boolean OXE set Deskphone in non Ringing state: */ getOxeDeskPhoneNonRinging(): boolean; /** * setOxeDynamicStateReceived * Modify the OXE dynamic state with true if received */ setOxeDynamicStateReceived(): void; /** * getOxeDynamicStateReceived * @returns boolean Dynamic State Oxe is received */ getOxeDynamicStateReceived(): boolean; /** * Set the oxe user's hunt group logged state (login / logout) * @public * @param {boolean} logged true for group login, false for group logout * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function setOxeUserHuntGroupLogin */ setOxeUserHuntGroupLogin(logged: boolean): Promise; /** * Set the oxe user Deskphone in non ringing state * @public * @param {boolean} activated true for silence, false for ringing * @param {string} userJidTel Telephony jid identifier of the user for which the ringing state must be changed * (this param is optional : not used to change the logged user's ringing state: it is used * to change the ringing state of a supervised user by an attendant) * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function setOxeDeskphoneRingingState */ setOxeDeskphoneRingingState(activated: boolean, userJidTel?: string): Promise; /** * Set on server the oxe user's secret identity mode * @public * @param {boolean} secretIdentityActivated true if activated * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function fetchOxeSecretIdentity */ fetchOxeSecretIdentity(secretIdentityActivated: boolean): Promise; /** * setOxeSecretIdentity * Modify the local var for oxe secret identity state * @param {boolean} oxeSecretIdentity true if secret identity activated * @param activated */ setOxeSecretIdentity(oxeSecretIdentity: boolean): void; /** * getOxeSecretIdentity * @returns boolean OXE secret identity local state: */ getOxeSecretIdentity(): boolean; /** * Set the oxe user Do Not Disturb * @public * @param {boolean} activated true if activated * @async * @returns {Promise} Status promise resolved when the process is complete * @instance * @function setOxeDoNotDisturbState */ setOxeDoNotDisturbState(DoNotDisturbActivated: boolean): Promise; /** * setOxeDoNotDisturb * Modify the local var for oxe Do Not Disturb * @param {boolean} oxeDoNotDisturb true if Do Not DIsturb activated * @param activated */ setOxeDoNotDisturb(oxeDoNotDisturb: boolean): void; /** * getOxeDoNotDisturb * @returns boolean OXE Do Not Disturb: */ getOxeDoNotDisturb(): boolean; /** * sipWiseUserGroupsDataClear * clear user's groups data * */ sipWiseUserGroupsDataClear(): void; /** * sipWiseGetFormerManagerAssistGrId * @returns {string} the former only one (1:1) mng-assist group (Deprecated but for compatibility) */ sipWiseGetFormerManagerAssistGrId(): string; /** * sipWiseUserGroupsDataIsManagerAssistant * @returns {boolean} true if manager / assistant group */ sipWiseUserGroupsDataIsManagerAssistant(): boolean; /** * sipWiseManAssistGetMyRole * @returns {string} my role */ sipWiseManAssistGetMyRole(): string; /** * sipWiseManAssistIamManagerForwarded * @returns {boolean} true if i'am a manager forwarded on assistant */ sipWiseManAssistIamManagerForwarded(): boolean; /** * getSipWiseUsersGroupData * @returns {any} group data */ getSipWiseUserGroupsData(): any; /** * getSipWiseUserGroups * get on server the user's groups * */ getSipWiseUserGroups(): Promise; sipWiseGetMyHuntGroups(): HuntGroup[]; sipWiseGetMyBasicCallCenterGroups(): HuntGroup[]; /** * setSipWiseJoinGroup * @param {string} groupId group identifier */ setSipWiseJoinGroup(groupId: string): Promise; /** * setSipWiseLeaveGroup *@param {string} groupId group identifier */ setSipWiseLeaveGroup(groupId: string): Promise; /** * setSipWiseJoinAllGroups * */ setSipWiseJoinAllGroups(): Promise; /** * setSipWiseLeaveAllGroups * */ setSipWiseLeaveAllGroups(): Promise; /** * getSipWiseUserGroupsForwards * @param {string} groupId group identifier */ getSipWiseUserGroupsForwards(groupId: string): Promise; /** * setSipWiseUserGroupsForwards * @param {string} groupId group identifier * @param {string} callForwardType forward type * @param {any} forwardData forward data */ setSipWiseUserGroupsForwards(groupId: string, callForwardType: string, forwardData: any): Promise; /** * sipWiseManAssistActivat * @param {boolean} active true to activate the manager forward to assistant * @param {string} groupName Name of manager assistant group * @description Deprecated / former mng Assist way to activate manager forward * for new manager-Assistant as hunting group use instead */ sipWiseManAssistActivate(active: boolean, groupName?: string): void; /************************* Manager-Assistant as Hunting Group STUFF *************************/ /** * sipWiseManAssistAsHGJoinLeave * @param {string} action from {"join" or "leave"} * @param {string} groupId manager-assistant group id (optional) * @param {string} leaderId manager-assistant leader id from assistant point of view (optional) * @description */ sipWiseManAssistAsHGJoinLeave(action?: string, groupId?: string, leaderId?: string): Promise; /** * sipWiseUserGroupsDataIsMngAssistAsHG * @returns {boolean} true if manager / assistant group as hunting group */ sipWiseUserGroupsDataIsMngAssistAsHG(): boolean; private onUpdateHuntingGroupsData; /************************* MISC STUFF *************************/ oxoMultiCallMode(): boolean; sipWiseMode(): string; resetAllSipWiseCall(): Promise; /******************************************************* */ /******************************************************* */ oxopbxsUpdateIndividualPassword(newPassword: string): Promise; /** * Callback method called on reception of ON_WEBRTCGATEWAY_CONFIG_CHANGE event * @param {Event} __event Native event * @param {boolean} isConfigured True if mediapillar is configured * @param {string} remoteExtension Remote extension number of the mediapillar user */ onMediaPillarConfigChanged(__event: Event, isConfigured: boolean, remoteExtension: string): void; /** * Callback method called on reception of ON_WEBRTCGATEWAY_STATE_CHG event * @param {Event} __event Native event * @param {boolean} mediaPillarAlive true if mediapillar is alive */ onMediaPillarStateChanged(__event: Event, mediaPillarAlive: boolean): void; /*********************************************************/ /** TELEPHONY CAPABILITIES */ /*********************************************************/ /** * @param {Call} call call * @param {Contact} destinationContact destination contact for which some capabilities are returned (such as makecall , blindtransfer) * @returns {any} object capabilities */ getCapabilitiesForCall(call: CallRB, destinationContact?: Contact): any; /** * * @param {Contact} contact contact for which capabilities are returned * @returns {any} object contiaining capabilities of given contact */ getCapabilitiesForContact(contact: Contact): any; /** * * @returns {any} object containing my capabilities */ getCapabilitiesForMyContact(): any; computeTelCapabilities(): void; private computeAndNotifyTelCapabilitiesForCallsContacts; private computeAndNotifyTelCapabilitiesForCallContact; private computeAndNotifyTelCapabilitiesForMyContact; private telCapabilitiesEquals; private onActiveConversationChange; private onCallUpdated; /***************************************************************/ /***************************************************************/ computeAndNotifySupervisionCapabilities(contact: Contact, createSupervisionCapabilities?: boolean): void; getSupervisionCapabilitiesForContact(contact: Contact): any; private existHgOrCcqOrSfuIncomingCall; private onWebConferenceReleased; /***************************************************************************************/ putActiveTelephonyCallOnHold(conferenceSession?: any): Promise; waitCallState(call: CallRB, expectedStatus: any[], timeout?: number, retryPeriod?: number): Promise; private setAutoOffHookConference; private setWebConferenceInvitDeskphone; /************************* Voicemail language *************************/ /** * get list of supported voicemail audio languages: de, en, fr, nl, es, it, ro, ar, he... * @public * @function * @async * @returns {Promise} Status promise resolved with the list of supported languages for voicemail */ getVoicemailSupportedLanguages(): Promise; /** * get current voicemail language of logged user, among same_as_company, de, en, fr, nl, es, it, ro, ar, he... * @public * @function * @async * @returns {Promise} Status promise resolved with the current voicemail language */ getVoicemailLanguage(): Promise; /** * modify logged user's voicemail language * New language possible values: same_as_company, de, en, fr, nl, es, it, ro, ar, he... * @public * @function * @param {string} voicemailLanguage new voicemail language to set for the logged user * @async * @returns {Promise} Status promise resolved with the new voicemail language */ updateVoicemailLanguage(voicemailLanguage: string): Promise; isRemoteControlledPhoneCallId(phoneCallId: string): boolean; removeRemoteControlledPhoneCallId(phoneCallId: string): boolean; getCorrelatorDataFromManifest(phoneNumber: string): { correlatorData: string; correlatorDataHex: string; }; setAutoAnswerCorrelatorIdResourceMap(correlatorId: string, resource?: string): void; getAutoAnswerCorrelatorIdResourceMap(correlatorId: string): any; removeAutoAnswerCorrelatorId(correlatorId: string): void; } //# sourceMappingURL=telephony.service.d.ts.map