import { TelephonyService } from '../../services/telephony/telephony.service'; export interface ITelephonyEventHandler { attachHandlers(): void; detachHandlers(): void; } /** * @class * @public * @name TelephonyHybridEventHandler * @description * This class is used to represent the handler of hybrid telephony (oxe/oxo/third party) events */ export declare class TelephonyHybridEventHandler implements ITelephonyEventHandler { private telephonyService; private xmppService; private logger; private contactService; private eventService; private profileService; private settingsService; private mainService; private roomService; private office365AdService; private companyDirectoryService; private messageHandlerRef; private promiseQueue; private reservationCalls; private static CALLSERVICE_NS; private static CallFailureLabels; /** * Constructor of TelephonyHybridEventHandler instance * @public * @param {any} telephonyService reference to the telephony service * @memberof TelephonyHybridEventHandler */ constructor(telephonyService: TelephonyService); /** * Create the handler of telephony events for hybrid telephony (OXE / OXO / third party systems) * @public * @static * @param {any} telephonyService reference to the telephony service * @returns {TelephonyHybridEventHandler} Instance of newly created TelephonyHybridEventHandler * @memberof TelephonyHybridEventHandler */ static create(telephonyService: any): TelephonyHybridEventHandler; /*************************************************************/ /*************************************************************/ /** * Attach the xmpp handlers to callbacks * @public * @memberof TelephonyHybridEventHandler */ attachHandlers(): void; /** * Detach the xmpp handlers * @public * @memberof TelephonyHybridEventHandler */ detachHandlers(): void; /*************************************************************/ /*************************************************************/ /** * Main handling callback method for received telephony events * @public * @param {any} stanza Received telephony event * @returns {boolean} true indicates successful handling of event * @memberof TelephonyHybridEventHandler */ onCallserviceMessageReceived(stanza: any): boolean; /** * Indicates whether a call exists with the given call identifier * @private * @param {string} callId call identifier * @returns {boolean} true if a call exists * @memberof TelephonyHybridEventHandler */ private existingCall; /** * Handler of INITIATED event * @private * @param {any} initiatedElem Initiated sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onInitiatedEvent; private checkMakecallCtiAndSendEvent; /** * Handler of ORIGINATED event * @private * @param {any} originatedElem Originated sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onOriginatedEvent; /** * Handler of DELIVERED event * @private * @param {any} deliveredElem Delivered sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onDeliveredEvent; /** * Handler of QUEUED event * @private * @param {any} queuedElem Queued sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onQueuedEvent; private createReservationCall; private findReservationCall; private handleComputerMultiDeviceAutoOffHookResource; private retrieveComputerMultiDeviceAutoOffHookResource; /** * Handler of FAILED event * @private * @param {any} failedElem Failed sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onFailCallEvent; /** * Handler of UPDATECALL event * @private * @param {any} updatecallElem Updatecall sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onUpdateCallEvent; /** * Handler of UPDATEPARTY event * @private * @param {any} updatepartyElem Updateparty sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onUpdatePartyEvent; /** * Handler of ESTABLISHED event * @private * @param {any} establishedElem Established sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onEstablishedEvent; private computeRemotePartyNumber; private computeCallDirectionFromGlobalCallId; /** * Handler of HOLD event * @private * @param {any} heldElem Held sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onHeldEvent; /** * Handler of RETRIEVE event * @private * @param {any} retrieveElem Retrieve sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onRetrieveCallEvent; /** * Handler of DIVERTED event * @private * @param {any} divertedElem Diverted sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onDivertedEvent; /** * Handler of TRANSFER event * @private * @param {any} transferElem Transfer sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onTransferEvent; /** * Handler of CONFERENCE event * @private * @param {any} conferencedElem Conference sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onConferenceEvent; /** * Handler of CALLSUBJECT event * @private * @param {any} callElem Callsubject sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onCallSubjectEvent; /** * Handler of CONNECTIONCLEARED event * @private * @param {any} clearElem Connectioncleared sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onClearCallEvent; /** * Handler of FORWRDED event * @private * @param {any} forwardElem Forwarded sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onCallForwardedEvent; /** * Handler of DYNAMIC STATE event * @private * @param {any} dynamicStateElem dynamicstate sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onOxeDynamicStateEvent; /** * Handler of NOMADICSTATUS event * @private * @param {any} nomadicElem Nomadicstatus sub element of received event * @async * @returns {Promise} Status promise resolved when the handling is complete * @memberof TelephonyHybridEventHandler */ private onCallNomadicEvent; /*********************************************************************/ /** UTILITY METHODS */ /*********************************************************************/ /** * Publishes a ON_CALL_UPDATED_EVENT event for the given call * @private * @param {Call} call call to notify * @param {any} elem Additional info to publish * @memberof TelephonyHybridEventHandler */ private sendCallUpdateEvent; /** * Extract additional info from given event element * @private * @param {any} elem Event element from which we extract additional info * @returns {any} the additional info object * @memberof TelephonyHybridEventHandler */ private extractInfoEvent; /** * Create a new conference call * @private * @param {string} connectionId CSTA connection identifier * @param {Contact[]} participants List of conferenced participant contacts * @returns {Call} the newly created conference call * @memberof TelephonyHybridEventHandler */ private createConferenceCall; /** * Retrieves the call from the received event element * @private * @param {any} elem Telephony event element * @param {boolean} doNotUseEqtIdFromElem Indicates wether equiment identifier inside connection identifier may be used or not * @param {boolean} searchPendingMakeCall Indicates wether the call may be searched in pendingMakeCalls array * @param {boolean} noCreate Indicates wether the call may be craetaed if it does not exist * @param {boolean} searchReservationCall Indicates wether the call may be searched in reservationCalls array * @async * @returns {Promise} Promise resolved with the found or created call * @memberof TelephonyHybridEventHandler */ private getCall; /** * Retrieves or creates the call from the given parameters * @private * @param {string} connectionId CSTA connection identifier * @param {string} jid Jabber identifier of the other party * @param {string} phoneNumber Phone number of the other party * @param {boolean} doNotUseEqtIdFromElem Indicates wether equiment identifier inside connection identifier may be used or not * @param {boolean} searchPendingMakeCall Indicates wether the call may be searched in pendingMakeCalls array * @param {boolean} noCreate Indicates wether the call may be craetaed if it does not exist * @param {boolean} searchReservationCall Indicates wether the call may be searched in reservationCalls array * @async * @returns {Promise} Promise resolved with the found or created call * @memberof TelephonyHybridEventHandler */ private getOrCreateCall; /** * Compute call relevant data, such as relevantEquipmentId, connectionId and isSecondary * @private * @param {any} elem Telephony event element * @param {Call} call Call of which the relevant properties are computed * @memberof TelephonyHybridEventHandler */ private computeCallRelevancy; /** * Updates a call contact * @private * @param {string} jid Jabber identifier of other party * @param {string} phoneNumber Phone number fof other party * @param {any} actionElem Action element of the event * @param {Call} call The call to update * @async * @returns {Promise} Status promise resolved when the update is complete * @memberof TelephonyHybridEventHandler */ private updateCallContact; /** * Updates the contact and the remote party data in the call * @private * @param {Call} call The call to update * @param {Contact} contact The contact to set in call and remote party data * @param {string} phoneNumber The phone number to set in remote party data * @param {string} jid The jid of the contact, needed to compute the remote party number * @memberof TelephonyHybridEventHandler */ private makeUpdateContact; /** * Analyse if a contact update operation has to be done following situation * @private * @param {string} jid Jabber identifier of other party * @param {string} phoneNumber Phone number of other party * @param {Call} call [required] the call to update * @returns {any} Object:{ updateContactToBeDone : boolean, searchOutlookToBeDone :boolean} * updateContactToBeDone true if the contact has to be updated in the call (by setContact) * searchOutlookToBeDone true if an outlook search has to be performed to resolve call identity * @memberof TelephonyHybridEventHandler */ private analyzeContactChange; computeDisplayName(firstname: string, lastname: string): string; } //# sourceMappingURL=telephonyHybridEventHandler.d.ts.map