import { CallRB } from "../../models/call.model"; import { Contact } from '../../models/contact.model'; import { CliOption } from "../../models/cli.model"; import { Service } from '../../services/service'; import { Bubble } from '../../models/bubble.model'; export declare const TELEPHONY_SVC_SIP_WISE = "TelephonyServiceSipWise"; export declare class TelephonyServiceSipWise extends Service { private mainService; private logger; private authService; private errorHelperService; private eventService; private contactService; private settingsService; private xmppService; private telephonyService?; private webrtcGatewayService?; private portalURL; private portalAdminURL; private settings; routingData: { devicesList: any[]; ringingDestinations: any[]; alsoOfficePhoneRingEnabled: boolean; }; private emergencyCallData; private monolineIncomingMode; private telephonyLinePolicy; static getInstance(): TelephonyServiceSipWise; static build(): TelephonyServiceSipWise; private constructor(); /** * Start service method * @public * @async */ start(): Promise; /** * Reset the sipwise routing data */ routingDataClear(): void; /** * Get the sipwise url * @returns {string} the sipwise portal url */ getPortalURL(): string; /** * * * @returns {boolean} Return TRUE if the monoline mode is activated either for user or for PBX system; */ isMonolineIncomingModeActivated(): boolean; /** * getTelephonyLinePolicy * @returns {string} Returns the telephony line policy of the current user (used for hub systems only) * Possible values are "mono_line" / "multi_lines" / "multi_lines_plus" */ getTelephonyLinePolicy(): string; /** * getDeviceWithType * @param {string} deviceType Device type * @returns {any} Found device with given type */ getDeviceWithType(deviceType: string): any; /** * getCurrentDevice * @returns {any} Current device */ getCurrentDevice(): any; /** * setCurrentDevice * @param {string} currentDeviceId : Id of device to be setted as main/current device * broadcast evt with type of main device + devices list * @returns {boolean} true if ok */ setCurrentDevice(currentDeviceId: string): boolean; /** * setRingingDevice * @param {string} ringingDeviceId Ringing device identifier * @returns {string[]} List of ringing device ids */ setRingingDevice(ringingDeviceId: string): string[]; /** * putUserRoutingInfo * @param {string} currentDeviceId the current device (default for outgoing call) * @param {any[]} destinations list of configured destinations * @returns {Promise} Status promise resolved when the handling is complete */ putUserRoutingInfo(currentDeviceId: string, destinations: any[]): Promise; /** * getUserRoutingInfo */ getUserRoutingInfo(): Promise; /** * patchNomadicData * for sipwise webrtcgateway patch the nomadicObject for hacking others layer */ patchNomadicData(): void; /** * getUserDevices * Fill devices list in routing data */ getUserDevices(): Promise; /*************************************************************/ /*************************************************************/ /** * getCliOptionsCurrent */ getCliOptionsCurrent(): Promise; /** * getCliOptionsAll */ getCliOptionsAll(): Promise; setCliOption(cliOption: CliOption): Promise; getClirOption(): Promise; setClirOption(clirActivation: boolean): Promise; /*************************************************************/ /*************************************************************/ /** * getUserGroups */ getUserGroups(): Promise; /** * joinGroup * @param {string} groupId group identifier * @param {string} leaderId leader identifier (for mng-assist GR) */ joinGroup(groupId: string, leaderId?: string): Promise; /** * leaveGroup * @param {string} groupId group identifier * @param {string} leaderId leader identifier (for mng-assist GR) */ leaveGroup(groupId: string, leaderId?: string): Promise; /** * joinAllGroups * @param {string} subType group sub type (to target HG groups or mngAssist groups) */ joinAllGroups(subType?: string): Promise; /** * @function leaveAllGroups * @public * @param {string} subType group sub type (to target HG groups or mngAssist groups) * @description leave all normal hunting group or leave the manager-assistant groups * @returns {Promise} the API response */ leaveAllGroups(subType?: string): Promise; /** * removeMemberFromGroup * @param {string} groupId group identifier * @param {string} memberId member identifier */ removeMemberFromGroup(groupId: string, memberId: string): Promise; /** * addMemberFromGroup * @param {string} groupId group identifier * @param {string} memberId member identifier */ addMemberFromGroup(groupId: string, memberId: string): Promise; /** * changeMemberRole * @param {string} groupId group identifier * @param {string} memberId member identifier * @param {boolean} isAgent * @param {boolean} isManager */ changeMemberRole(groupId: string, memberId: string, isAgent: boolean, isManager: boolean): Promise; /** * changeMemberStatus * @param {string} groupId group identifier * @param {string} memberId member identifier * @param {boolean} withdraw member is withdraw or not */ changeMemberStatus(groupId: string, memberId: string, withdraw: boolean): Promise; /** * changeMemberOrder * @param {string} groupId group identifier * @param {string} memberId member identifier * @param {number} position position in the list */ changeMemberOrder(groupId: string, memberId: string, position: number): Promise; /** * setUserGroupForward * @param {string} groupId group identifier * @param {string} callForwardType forward type * @param {any} forwardData forward data */ setUserGroupForward(groupId: string, callForwardType: string, forwardData: any): Promise; /** * getUserGroupForwards * Retrieve the forwards for one given group of the logged user * @param {string} groupId group identifier */ getUserGroupForwards(groupId: string): Promise; /** * getAllUserGroupsForwards * * Retrieve the forwards for all groups of logged user */ getAllUserGroupsForwards(): Promise; /** * getAllUserGroupsPhoneNumberDDI * * Retrieve the List DDI numbers associated to a CloudPBX */ getAllUserGroupsPhoneNumberDDI(isAssignedToUser?: boolean): Promise; /** * getHuntingGroup * Get Group global information (including associated welcome services) * @param {string} groupId */ getHuntingGroup(groupId: string): Promise; /** * updateHuntingGroup * @param {string} groupId * @param {string} externalNumberId */ updateHuntingGroup(groupId: string, externalNumberId: string, callQueuePositionAnnounceEnabled?: boolean, callQueueWrapUpEnabled?: boolean, callQueueWrapUpTime?: number): Promise; /** * searchHuntingGroups * @param {string} searchText searched group name * @param {number} limit max number of results */ searchHuntingGroups(searchText: string, limit?: number): Promise; /** * automatedAttendants list * */ getAutomatedAttendantsList(): Promise; getGroupRealtimeStatistics(groupId: string): Promise; /*************************************************************/ /*************************************************************/ /** * getSnapshot * @param {Call} call Call for which the snapshot is requested * @param {string} deviceId Identifier of the device for which the snapshot is requested * @param {string} seqNum Sequence number for which the snapshot is requested */ private getSnapshot; /** * processSnapshot */ processSnapshot(): Promise; /** * createCallFromSnapShotCallsElt * @param {any} snapShotCallsElt Call element of snapshot response */ private createCallFromSnapShotCallsElt; /*************************************************************/ /*************************************************************/ /** * getWelcomeInfo * Get welcome global information * @param {string} targetId */ getWelcomeInfo(targetId: string): Promise; /*************************************************************/ /*************************************************************/ /** * FORWARD CALL sipWise to destination possible welcome * @param {string} destId the destination id (contact or hunting group) * @param {string} phoneNumber the destination of forward * @param {string} destType type of number (string) in [internalNumber, externalNumber, voicemail, welcome] * @param {string} forwardType the forward type (string) from [immediate, busy, noreply] * @param {string} [userId] id of the user for which the forward is modified (used by supervisors only). If not set, the user modified is the logged user * @function forwardToDeviceWithWelcome */ forwardToDeviceWithWelcome(destId: string, phoneNumber: string, destType: string, forwardType: string, userId?: string): Promise; /** * FORWARD CALL sipWise * @param {string} phoneNumber the destination of forward * @param {string} destType type of number (string) in [internalNumber, externalNumber, voicemail] * @param {string} forwardType the forward type (string) from [immediate, busy, noreply] * @param {string} [userId] id of the user for which the forward is modified (used by supervisors only). If not set, the user modified is the logged user */ forwardToDevice(phoneNumber: string, destType: string, forwardType: string, userId?: string): Promise; /** * CANCEL FORWARD sipWise * @param {string} forwardType the forward type (string) from [immediate, busy, noreply] * @param {string} userId id of the user for which the forward is cancelled (used by supervisors only). If not set, the user modified is the logged user */ cancelForward(forwardType: string, userId?: string): Promise; /*************************************************************/ /*************************************************************/ /** * GET FORWARD STATUS sipWise */ getForwardStatus(): Promise; /** * FORWARD helper method * forwardObject converter (from new forward API to former forwardObject structure) * @param {any} sipWiseForwardData Server Forward data * @returns {any} client forward object */ convForwardObject(sipWiseForwardData: any): any; /*************************************************************/ /*************************************************************/ /** * GET OVERFLOW STATUS sipWise * @param {string} systemId system identifier * @param {string} phoneNumberId phone number identifier (subscrber identifier) */ getOverFlowStatus(systemId: string, phoneNumberId: string): Promise; /** * Get the sipwise settings * @returns {any} the sipwise settings */ getSettings(): any; /** * Initialization of SIP WISE SETTINGS * @returns {any} the sipwise settings */ private initializeSettings; /*************************************************************/ /*************************************************************/ /** * emergencyCallDataClear * reset local cached emergency call data * */ emergencyCallDataClear(): void; /** * check if phoneNumber belongs to emergency numbers * @param {string} phoneNumber phone number to check * @returns {boolean} true if phoneNumber is an emergancy number */ private checkEmergencyNumber; /** * Get Emergency numbers and emergency options */ getEmergencyCallData(): Promise; /*************************************************************/ /*************************************************************/ makeSimpleCall(contact: Contact, phoneNumber: string, calledNumber?: string, bubble?: Bubble): Promise; /*************************************************************/ /*************************************************************/ /** * RELEASE SIPWISE CALL * @param {Call} call call to release * @param {string} reason Optional reason of call releasing, currently the only accepted value = reject */ releaseCall(call: CallRB, reason?: string): Promise; /** * deleteCallIfInvalid * delete call if not existing on server * @param {any} error error * @param {Call} call call to remove in client if it does not exist on server */ private deleteCallIfInvalid; /*************************************************************/ /*************************************************************/ /** * ANSWER CALL sipWise * @param {Call} call the call to answer * @returns {Call} the answered call */ answerCall(call: CallRB): Promise; /*************************************************************/ /*************************************************************/ /** * HOLD CALL sipWise * @param {Call} call the call to hold * @returns {Call} the held call */ holdCall(call: CallRB): Promise; /*************************************************************/ /*************************************************************/ /** * RETRIEVE CALL sipWise * @param {Call} call the call to retrieve * @returns {Call} the retrieved call */ retrieveCall(call: CallRB): Promise; /*************************************************************/ /*************************************************************/ /** * DEFLECT CALL sipWise * @param {Call} call the call to deflect * @param {string} destination the destination number to which the call must be deflected */ deflectCall(call: CallRB, destination: string): Promise; /*************************************************************/ /*************************************************************/ /** * TRANSFERT CALL sipWise * @param {CallRB} activeCall the active call to transfer * @param {CallRB} heldCall the held call to transfer */ transferCall(activeCall: CallRB, heldCall: CallRB): Promise; /*************************************************************/ /*************************************************************/ /** * BLIND TRANSFERT CALL sipWise * @param {CallRB} activeCall the active call to transfer * @param {string} calleeNumber the phone number of the callee * @param {string} destination the destination object (used in mix webrtc/pstn transfers) */ blindTransferCall(activeCall: CallRB, calleeNumber: string, destination: any): Promise; /*************************************************************/ /*************************************************************/ /** * TRANSFER routing sipWise * Send the transfer routing service request to the server * @public * @async * @param {string} calleeId callee identifier * @param {string} addresseeId addressee identifier * @param {string} addresseePhoneNumber addressee phone number * @returns {Promise} Promise resolved with the trasnfer routing data */ transferRouting(calleeId: string, addresseeId: string, addresseePhoneNumber: string): Promise; /*************************************************************/ /*************************************************************/ /** * send DTMF sipWise * @param {CallRB} call the call for which the dtmf must be sent * @param {string} dtmf the dtmf digits to send */ sendDtmf(call: CallRB, dtmf: string): Promise; /*************************************************************/ /*************************************************************/ sipWiseGetCliOption(): Promise; sipWiseSetCliOption(cliOption: any): Promise; sipWiseGetClirOption(): Promise; sipWiseSetClirOption(clirActivation: boolean): Promise; /************************* 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 by voicemail */ getVoicemailSupportedLanguages(): Promise; private languageComparator; /** * 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; /** * getWelcomeServicesByUser */ getWelcomeServicesByUser(groupId?: string): Promise; /** * getDetailedWelcomeServices * @param welcomeServiceId */ getDetailedWelcomeServices(welcomeServiceId: string): Promise; /** * forceWelcomeService * @param welcomeServiceId * @param mode */ forceWelcomeService(welcomeServiceId: string, mode: string): Promise; /** * getWelcomeServiceGreetings * @param welcomeServiceId * @param groupId */ getWelcomeServiceGreetings(welcomeServiceId: string, groupId: string): Promise; /** * getWelcomeServiceGreeting * @param welcomeServiceId * @param greetingId */ restoreDefaultWelcomeServiceGreeting(welcomeServiceId: string, greetingId: string, groupId: string): Promise; /** * ActivateWelcomeServiceGreeting * @param welcomeServiceId * @param fileId */ activateWelcomeServiceGreeting(welcomeServiceId: string, fileId: string, groupId: string): Promise; /** * updateNewWelcomeServiceGreeting * @param welcomeServiceId * @param greetingId * @param groupId * */ updateNewWelcomeServiceGreeting(welcomeServiceId: string, greetingId: string, greetingFile: File, groupId: string, loopPlay?: boolean, description?: string, fileName?: string): Promise; updateSettingsWelcomeServiceGreeting(welcomeServiceId: string, fileId: string, groupId: string, loopPlay: boolean): Promise; /** * modify the calendar * @public * @function * @param {string} calendarId Unique identifier of the calendar * @param {any} calendarData all data of the calendar * @async * @returns {Promise} Status promise resolved with the new voicemail language */ updateCalendar(calendarId: string, groupId: string, calendarData: any): Promise; /** * getCalendar */ getCalendar(calendarId: string, groupId: string): Promise; /** * getCalendars */ getCalendars(limit?: number, sortField?: string, sortOrder?: number): Promise; } //# sourceMappingURL=telephonySipWise.service.d.ts.map