import { EventEmitter } from "events"; import { Logger } from "../common/Logger"; import { Core } from "../Core"; import { GenericService } from "./GenericService"; export {}; declare class RBVoiceService extends GenericService { private avatarDomain; private readonly _protocol; private readonly _host; private readonly _port; private rbvoiceEventHandler; private rbvoiceHandlerToken; static getClassName(): string; getClassName(): string; static getAccessorName(): string; getAccessorName(): string; constructor(_core: Core, _eventEmitter: EventEmitter, _http: any, _logger: Logger, _startConfig: { start_up: boolean; optional: boolean; }); start(_options: any): Promise; stop(): Promise; init(useRestAtStartup: boolean): Promise; attachHandlers(): void; _onEventRBVoice(data: any): void; /** * @public * @nodered true * @method retrieveAllAvailableCallLineIdentifications * @async * @category Rainbow Voice CLI Options * @instance * @description * This api returns all CLI options available. * @fulfil {Promise} return result. * @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Calling Line Identification (CLI) | * | policy | String | CLI **policy** applied.
It indicates which kind of number is used as CLI
Detailed description of **policy** meanings:
* **company_policy** : CLI will be the **Default identifier** as defined at company level (as a result it can be either the Company Number or the Work phone of the user ; according the chosen CLI company policy)
* **user\_ddi\_number** : CLI will be the **Work phone** of the user
* **installation\_ddi\_number** : CLI will be the **Company number**
* **other\_ddi\_number** : CLI will be a **Hunting Group number** the user belongs to. Can be also **another number authorized** by Admin
Possible values : `company_policy`, `user_ddi_number`, `installation_ddi_number`, `other_ddi_number` | * | companyPolicy optionnel | String | Only when policy is "company_policy" ; it indicates what is the CLI policy defined at company level
Possible values : `user_ddi_number`, `installation_ddi_number` | * | phoneNumberId | String | phoneNumber Unique identifier that is used for identifying selected CLI | * | number | String | phoneNumber value that is used as CLI | * | type optionnel | String | Only when CLI policy is "other\_ddi\_number" ; allows to differentiate Hunting Groups with another number
Possible values : `Group`, `Other` | * | name optionnel | String | Only when CLI policy is "other\_ddi\_number" and type is "Group". It is then the Group name | * */ retrieveAllAvailableCallLineIdentifications(): Promise; /** * @public * @nodered true * @method retrieveCurrentCallLineIdentification * @async * @category Rainbow Voice CLI Options * @instance * @description * This api returns current Call line identification.
* @return {Promise} */ retrieveCurrentCallLineIdentification(): Promise; /** * @public * @nodered true * @method setCurrentActiveCallLineIdentification * @async * @category Rainbow Voice CLI Options * @param {string} policy CLI policy to apply.Possible values : "company_policy", "user_ddi_number", "installation_ddi_number", "other_ddi_number" * @param {string} phoneNumberId phoneNumber Unique Identifier of the ddi we want to apply (parameter only mandatory when selected CLI policy is "other_ddi_number" * @instance * @description * This api allows user to set the current CLI.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Calling Line Identification (CLI) | * | policy | String | CLI **policy** applied.
It indicates which kind of number is used as CLI
Detailed description of **policy** meanings:
* **company_policy** : CLI will be the **Default identifier** as defined at company level (as a result it can be either the Company Number or the Work phone of the user ; according the chosen CLI company policy)
* **user\_ddi\_number** : CLI will be the **Work phone** of the user
* **installation\_ddi\_number** : CLI will be the **Company number**
* **other\_ddi\_number** : CLI will be a **Hunting Group number** the user belongs to. Can be also **another number authorized** by Admin
Posible values : `company_policy`, `user_ddi_number`, `installation_ddi_number`, `other_ddi_number` | * | companyPolicy optionnel | String | Only when policy is "company_policy" ; it indicates what is the CLI policy defined at company level
Possible values : `user_ddi_number`, `installation_ddi_number` | * | phoneNumberId | String | phoneNumber Unique identifier that is used for identifying selected CLI | * | number | String | phoneNumber value that is used as CLI | * | type optionnel | String | Only when CLI policy is "other\_ddi\_number" ; allows to differentiate Hunting Groups with another number
Possible values : `Group`, `Other` | * | name optionnel | String | Only when CLI policy is "other\_ddi\_number" and type is "Group". It is then the Group name | * */ setCurrentActiveCallLineIdentification(policy: string, phoneNumberId?: string): Promise; /** * @public * @nodered true * @method addMemberToGroup * @async * @category Rainbow Voice Cloud PBX group * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} memberId Unique identifier (userId) of the user to add * @param {number} position Position of the user inside the group, from 1 to last. * @param {Array} roles Member roles inside the group. Default value : agent.Possible value : agent, manager, assistant * @param {string} status Member status inside the group. Default : active. Possible value : active, idle * @instance * @description * This part of the API allows a user having manager role on a group to add another user.
* The added user can be any user belonging to the same company.
* The position of the inserted member is important in case of a hunting group with serial or circular policy, and also in case of a manager_assistant group with several assistants.
* The position is meaningless in case of parallel hunting group.
* Manager can choose to set the default status of the added user to 'idle' or 'active' (default value, user will be involved in call distribution for hunting group).
* In case of a manager_assistant group the status can be:
*
* - 'idle': the newly inserted member is just 'declared', and not provisioned on cloud PBX side
* - 'active': the newly inserted manager or assistant is configured and ready
*
* Manager can also set the added user role, defining if this user is an agent and/or manager in a hunting group (assistant or manager in case of manager_assistant group).
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ addMemberToGroup(groupId: string, memberId: string, position: number, roles: [], status: string): Promise; /** * @public * @nodered true * @method deleteVoiceMessageAssociatedToAGroup * @async * @category Rainbow Voice Cloud PBX group * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} messageId Message identifier (userId) of the user to add * @instance * @description * Deletion of the given voice message.
* @return {Promise} the result. * */ deleteVoiceMessageAssociatedToAGroup(groupId: string, messageId: string): Promise; /** * @public * @nodered true * @method getVoiceMessagesAssociatedToGroup * @async * @category Rainbow Voice Cloud PBX group * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {number} limit=100 Allow to specify the number of voice messages to retrieve. Default value : 100 * @param {number} offset=0 Allow to specify the position of first voice messages to retrieve. Default value : 0 * @param {string} sortField="name" Sort voice messages list based on the given field. Default value : date * @param {number} sortOrder=-1 Specify order when sorting voice messages. Default is descending. Default value : -1. Possible values : -1, 1 * @param {string} fromDate List voice messages created after the given date. * @param {string} toDate List voice messages created before the given date. * @param {string} callerName List voice messages with caller party name containing the given value. * @param {string} callerNumber List voice messages with caller party number containing the given value. * @instance * @description * Returns the list of voice messages associated to a group.
* @return {Promise} the result. * * * | Champ | Type | Description | * | --- | --- | --- | * | id | String | voice message identifier | * | fileName | String | File name of the voice message - composed of the voice message date | * | mime | String | MIME type of the voice message file
Possible values : `audio/mpeg` | * | size | Number | Size of the voice message file (in bytes). | * | duration | Number | Duration of the voice message (in seconds) | * | date | Date | Date of the voice message | * | callerInfo | Object | Caller party info | * | data | Object\[\] | Voice messages | * | number | String | Caller number | * | name optionnel | String | Caller name, if available | * | firstName optionnel | String | Caller firstName, if available | * | lastName optionnel | String | Caller lastName, if available | * | userId optionnel | String | Caller user identifier if it can be resolved. | * | jid optionnel | String | Caller Jid if it can be resolved. | * */ getVoiceMessagesAssociatedToGroup(groupId: string, limit: number, offset: number, sortField: string, sortOrder: number, fromDate: string, toDate: string, callerName: string, callerNumber: string): Promise; /** * @public * @nodered true * @method getGroupForwards * @async * @category Rainbow Voice Cloud PBX group * @param {string} groupId Unique identifier of the Cloud PBX group to update * @instance * @description * This API allows to get all cloud PBX group forwards.
* The cloud PBX group forwards can be of two different types:
* - groupForwards: applies to hunting group - supported forward types for this kind of group are all listed in the response (immediate, overflow (reprensents busy/unavailable for non parallel and busy/unavailable/noReply for parallel)) * - members: applies to manager_assistant group - list the individual forwards of every managers of the group. These individual forwards are filtered to the only immediate forward, with a destinationType of 'managersecretary' (a.k.a. 'Do Not Disturb forward to assistants') *
* Inside a manager_assistant group, both manager and assistant can retrieve the group forwards. Inside a hunting group, only the manager can see it (i.e. users with role only set to 'agent' are not allowed to consult the group forwards).
*
* For hunting_group on return data "name" or concerned "id" with value "null" if the user/rvcpGroup/rvcpAutoAttendant is deleted, please remove the forward.
* @return {Promise} the result. * */ getGroupForwards(groupId: string): Promise; /** * @public * @nodered true * @method getTheUserGroup * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} type Filter only groups of the given type. Possible values : hunting_group, manager_assistant * @description * This API allows to retrieve the groups where the logged user is member.
* For a hunting group, a user can have two roles inside the group: manager and/or agent.
* For a manager_assistant group, a user can be manager OR assistant, not both.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object\[\] | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | skippedGroups optionnel | String\[\] | List of group Identifier from which user has not been able to leave due to restrictions | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ getTheUserGroup(type: string): Promise; /** * @public * @nodered true * @method joinAGroup * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId The group identifier to join. * @description * This part of the API allows a user to join a group.
* To be able to join in a group, the member must have been already declared inside the group, by a manager or an administrator.
* Only the status of the member will be altered (idle to active). His roles will remain untouched (assistant, agent and/or manager).
* Only users with role 'agent' or 'assistant' can join or leave a group.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ joinAGroup(groupId: string): Promise; /** * @public * @nodered true * @method joinAllGroups * @async * @category Rainbow Voice Cloud PBX group * @instance * @description * Allow a user to join all the groups he belongs to.
* Only users of hunting groups with role 'agent' can leave all their groups in one go.
* If user if already logged out of a given group, logout action for this group will be skipped.
* @return {Promise} the result. * */ joinAllGroups(): Promise; /** * @public * @nodered true * @method leaveAGroup * @async * @category Rainbow Voice Cloud PBX group * @param {string} groupId The group identifier to leave. * @instance * @description * This part of the API allows a user to leave a group.
* To be able to leave in a group, a member must have been already declared inside the group, by a manager or an administrator.
* Only the status of the member will be altered (active to idle). His roles will remain untouched (assistant, agent and/or manager).
* Only users with role 'agent' or 'assistant' can join or leave a group.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ leaveAGroup(groupId: string): Promise; /** * @public * @nodered true * @method leaveAllGroups * @async * @category Rainbow Voice Cloud PBX group * @instance * @description * Allow a user to leave all the groups he belongs to.
* Only users of hunting groups with role 'agent' can leave all their groups in one go.
* If user if already logged out of a given group, logout action for this group will be skipped.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ leaveAllGroups(): Promise; /** * @public * @nodered true * @method removeMemberFromGroup * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} memberId Unique identifier of the member to remove * @description * This part of the API allows a manager to remove a member from a group.
* @return {Promise} the result. * */ removeMemberFromGroup(groupId: string, memberId: string): Promise; /** * @public * @nodered true * @method retrieveNumberReadUnreadMessagesForHuntingGroupsOfLoggedUser * @async * @category Rainbow Voice Cloud PBX group * @instance * @description * Returns the number of read/unread messages for each hunting group where logged in user is a member.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object\[\] | Messages summary for each hunting group where logged in user is a member | * | groupId | String | Group identifier | * | groupName | String | Group name | * | messages | Object\[\] | List of read/unread messages per type | * | type | String | Messages type
Possible values : `voicemail`, `email`, `fax`, `video` | * | new | Number | Number of unread voice messages | * | old | Number | Number of read voice messages | * | totalByType | Object\[\] | Total of messages grouped by their type | * | type | String | Messages type
Possible values : `voicemail`, `email`, `fax`, `video` | * | new | Number | Unread messages sum for all group messages where logged in user is a member. | * | old | Number | Read messages sum for all group messages where logged in user is a member. | * */ retrieveNumberReadUnreadMessagesForHuntingGroupsOfLoggedUser(): Promise; /** * @public * @nodered true * @method updateAVoiceMessageAssociatedToAGroup * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} messageId Message Identifier * @param {boolean} read Mark the message as read or unread * @description * Update the given voice message - mark it as read or unread When a message is 'unread', it is considered as a new message. On the opposite, a 'read' message is considered as an old message.
* @return {Promise} the result. * */ updateAVoiceMessageAssociatedToAGroup(groupId: string, messageId: string, read: boolean): Promise; /** * @public * @nodered true * @method updateAGroup * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} externalNumberId Identifier of the public phone number assigned to the group - applicable to hunting group type only * @param {boolean} isEmptyAllowed Indicates if the last active member can leave the group or not - applicable to hunting group only. * @description * This API allows a manager of to group to modify some settings of a Cloud PBX hunting group.
* Modification can be done on the following settings of a group:
* * Assign a public phone number to the group * * Allow or not empty group *
* To assign a public number, the following steps should be performed:
* * Retrieve the list of available phone numbers: (list DDI numbers from RVCP Provisioning portal) * * Provide the externalNumberId of the selected phone number in the body of this update request * * @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ updateAGroup(groupId: string, externalNumberId: string, isEmptyAllowed: boolean): Promise; /** * @public * @nodered true * @method updateGroupForward * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} callForwardType The forward type to update. Only 'immediate' supported in case of manager_assistant group. Possible values : immediate, overflow * @param {string} destinationType The destination type. Mandatory for activation. 'managersecretary' only for manager_assistant. 'internalNumber', 'externalNumber', 'autoAttendant' only for hunting group. Possible values : internalnumber, externalnumber, autoattendant, managersecretary * @param {number} numberToForward The number to forward. Mandatory for destinationType = internalnumber or externalnumber. * @param {boolean} activate Activate or cancel a forward. * @param {number} noReplyDelay in case of 'overflow' forward type on parallel hunting group, timeout in seconds after which the call will be forwarded. Default value : 20. Possible values : {10-60}. * @param {Array} managerIds List of manager ids to set forward on (Manager_assistant group type with destination type 'managersecretary' only.
* For assistant(s) only).
* If not provided, all active managers of the group will be concerned by this forward. * @param {string} rvcpAutoAttendantId Unique identifier of the auto attendant, only for hunting_group for autoAttendant destinationType * @description * This API allows to update the forwards of a cloud PBX group.
* Setting a forward on a group has different implications depending on the type of group.
* For a **_hunting group_**, it implies setting a forward on the dedicated subscriber of the cloud PBX associated with the group. The supported forward types in this case are: 'immediate', 'overflow'. Overflow is:
*
* * for parallel: 'busy', 'noreply' and 'unavailable' * * for others: 'busy', unavailable' * Only user with manager role inside the hunting group can set up a forward for the group.
* Forward destinations are limited to externalNumber, autoAttendant and internalNumber for hunting group.
*
* For a **_manager_assistant group_**, only 'immediate' forward type to 'managersecretary' destination is allowed in this API.
* When requested by an assistant, update of the forward will be sent to every active managers of the group, unless filtered by the 'managerIds' parameter.
* When requested by a manager, only its own forward is concerned ('managerIds' parameter is not used).
*
* Additional remarks on group forward:
*
* * Users can access their forwards from the dedicated forward API ([Voice Forward](#api-Voice_Forward)) * * ...but only this API allows to deal with the 'managersecretary' for destination type (as an assistant to set or cancel the DND of its manager(s), or as the manager itself) * * Setting DND on a manager will then override its previous immediate forward (if set). After cancelling the DND, the previous forward will NOT be restored. * * When setting a noreply forward, providing a noReplyDelay timeout, pay attention that this timeout can be later changed if hunting group changes (add / remove member). * * In manager_assistant groups, if forward is activated and the group is then modified, the forward will be cancelled if there are no longer any active assistants after the modification. * * A forward can be indirectly cancelled after a group modification (case of manager_assistant group, with assistant(s) no longer active). * * @return {Promise} the result. * */ updateGroupForward(groupId: string, callForwardType: string, destinationType: string, numberToForward: number, activate: boolean, noReplyDelay: number, managerIds: Array, rvcpAutoAttendantId: string): Promise; /** * @public * @nodered true * @method updateGroupMember * @async * @category Rainbow Voice Cloud PBX group * @instance * @param {string} groupId Unique identifier of the Cloud PBX group to update * @param {string} memberId Unique identifier of the group member * @param {number} position Position of the user inside a serial group, from 1 to last. Meaningless in case of parallel hunting group * @param {Array} roles Member roles inside the group. Default value : ["agent"]. Possible values : agent, manager, assistant * @param {string} status="active" Member status inside the group. Default value : active. Possible values : active, idle * @description * This part of the API allows a manager to update a member inside a group.
* Update consists in changing the status of the member, or its roles, or its position inside the group.
* Some updates are specific to the type of group:
* * Hunting group only can support several roles for a member (e.g. manager and agent) * @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Group Object | * | id | String | Group unique identifier | * | type optionnel | String | Group type
Default value : `hunting_group`
Possible values : `hunting_group`, `manager_assistant` | * | name | String | Group name - displayed on the caller phone set for hunting group type | * | policy optionnel | String | Group policy - applicable to hunting group type only
Default value : `parallel`
Possible values : `serial`, `parallel`, `circular` | * | members | Object\[\] | List of group members. | * | memberId | String | Member (user) unique identifier | * | displayName | String | Member display name | * | roles optionnel | String\[\] | Member role inside the group
Default value : `[agent]`
Possible values : `manager`, `agent`, `assistant` | * | status optionnel | String | Member status inside the group
Default value : `active`
Possible values : `active`, `idle` | * */ updateGroupMember(groupId: string, memberId: string, position: number, roles?: Array, status?: string): Promise; /** * @public * @nodered true * @method activateDeactivateDND * @async * @category Rainbow Voice Deskphones * @instance * @param {boolean} activate Set to "true" to activate or "false' to deactivate user DND. * @description * This API allows logged in user to activate or deactivate his DND state.
* @return {Promise} the result. */ activateDeactivateDND(activate: boolean): Promise; /** * @public * @nodered true * @method configureAndActivateDeactivateForward * @async * @category Rainbow Voice Deskphones * @instance * @param {string} callForwardType The forward type to update. Possible values : immediate, busy, noreply . * @param {string} type The destination type (Optional in case of deactivation)). Possible values : number, voicemail . * @param {string} number Forward destination number (Optional if forward destination type is voicemail). * @param {number} timeout In case of noreply forward type, timeout in seconds after which the call will be forwarded. Default value : 20 . Possible values : {10-60} . * @param {boolean} activated Activate or deactivate current forward. * @description * This API allows logged in user to activate or deactivate a forward.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | type optionnel | String | The destination type (Optional in case of deactivation)).
Possible values : `number`, `voicemail` | * | number optionnel | String | Forward destination number (Optional if forward destination type is `voicemail`). | * | timeout optionnel | Number | In case of `noreply` forward type, timeout in seconds after which the call will be forwarded.
Default value : `20`
Possible values : `{10-60}` | * | activated | Boolean | Activate or deactivate current forward. | * */ configureAndActivateDeactivateForward(callForwardType: string, type: string, number: string, timeout: number, activated: boolean): Promise; /** * @public * @nodered true * @method retrieveActiveForwards * @async * @category Rainbow Voice Deskphones * @instance * @description * This API allows logged in user to retrieve his active forwards.
* @return {Promise} the result. * */ retrieveActiveForwards(): Promise; /** * @public * @nodered true * @method retrieveDNDState * @async * @category Rainbow Voice Deskphones * @instance * @description * This API allows logged in user to retrieve his DND state.
* @return {Promise} the result. * */ retrieveDNDState(): Promise; /** * @public * @nodered true * @method searchUsersGroupsContactsByName * @async * @category Rainbow Voice Deskphones * @param {string} displayName Search users, groups, contacts on the given name. * @param {number} limit=20 Allow to specify the number of users, groups or contacts to retrieve (Max: 50). Default value : 20 * @instance * @description * This API allows to retrieve phone numbers associated to Rainbow users, groups, Office365 contacts and external directories contacts.
*
* Search by displayName (query parameter `displayName`):
* * The search is done on users/contacts' \`firstName\` and \`lastName\`, and search is done in * * all Rainbow public users and users being in companies visible by logged in user's company, * * external directories (like Office365) linked to logged in user's company. *
* * If logged in user's has visibility \`closed\` or \`isolated\`, or \`same\_than\_company\` and logged in user's company has visibility \`closed\` or \`isolated\`, search is done only on users being in companies visible by logged in user's company.
* * Search on display name can be:
* * firstName and lastName exact match (ex: 'John Doe' find 'John Doe') * * partial match (ex: 'Jo Do' find 'John Doe') * * case insensitive (ex: 'john doe' find 'John Doe') * * accents insensitive (ex: 'herve mothe' find 'Hervé Mothé') * * on only firstname or lastname (ex: 'john' find 'John Doe') * * order firstname / lastname does not matter (ex: 'doe john' find 'John Doe'). * @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object\[\] | List of user, group, contact Objects. | * | firstName optionnel | String | User, contact first name | * | lastName optionnel | String | User, contact last name | * | companyName optionnel | String | User company name if known and different of logged in user company | * | displayName | String | User, group, contact display name | * | category | String | Specify where user, group or contact has been found
Possible values : `my_company`, `other_company`, `other_directory` | * | phonenumbers | Object\[\] | List of phone numbers linked to user, group or contact | * | number | String | User, group or contact phone number | * | type | String | Phone number type
Possible values : `home`, `work`, `other` | * | deviceType optionnel | String | Device type
Possible values : `landline`, `mobile`, `fax`, `other` | * */ searchUsersGroupsContactsByName(displayName: string, limit?: number): Promise; /** * @public * @nodered true * @method activatePersonalRoutine * @async * @category Rainbow Voice Personal Routines * @instance * @param {string} routineId A user routine unique identifier. * @description * This api activates a user's personal routine.
* A supervisor can request to activate the personal routine of a user by providing its identifier as a parameter.
* The requesting user must be supervisor of the given supervised user. * @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Rvcp Personal Routines | * | routines | Object\[\] | Routines data array of routine objects | * | id | String | Routine unique identifier | * | name | String | Name of the routine | * | type optionnel | String | Type of routine
Possible values : `At`, `work`, `Out`, `of`, `office`, `On`, `break`, `Custom` | * | active | Boolean | Is the routine activated
Default value : `false` | * | inSync | Boolean | Boolean to know if last activation or active routine update is done | * | issuesLastSync | Object | Indications about issues last activation or active routine update | * | dndPresence | Boolean | | * | presence | Boolean | | * | cliOptions | Boolean | | * | deviceMode | Boolean | | * | immediateCallForward | Boolean | | * | busyCallForward | Boolean | | * | noreplyCallForward | Boolean | | * | huntingGroups | Boolean | | * */ activatePersonalRoutine(routineId: string): Promise; /** * @public * @nodered true * @method createCustomPersonalRoutine * @async * @category Rainbow Voice Personal Routines * @instance * @param {string} name Name of the new routine between 1 and 255 characters. * @description * This api create a user's custom personal routine.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Rvcp Personal Routines | * | type optionnel | String | Type of routine
Possible values : `At`, `work`, `Out`, `of`, `office`, `On`, `break`, `Custom` | * | id | String | Routine unique identifier | * | active | Boolean | Is the routine activated
Default value : `false` | * | name | String | Name of the routine | * | dndPresence | Boolean | If set to true, on routine activation the presence will be set to "dnd", if false "online", soon deprecated with presence object
Default value : `true` | * | deviceMode | Object | Device mode data | * | manage | Boolean | Is device mode managed on routine activation
Default value : `false` | * | mode | String | Device mode value, same choice(s) as in Rainbow GUI
Default value : `computer`
Possible values : `computer`, `office_phone` | * | immediateCallForward | Object | Immediate call forward data | * | manage | Boolean | Is immediate call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `immediate` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber` | * | busyCallForward | Object | Busy call forward data | * | manage | Boolean | Is busy call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `busy` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noreplyCallForward | Object | No reply call forward data | * | manage | Boolean | Is noreply call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `noreply` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noReplyDelay | Number | | * | huntingGroups | Object | | * | manage | Boolean | Default value : `false` | * | withdrawAll optionnel | Boolean | Not for work routine
Default value : `true` | * | huntingGroupsWithdraw optionnel | Object\[\] | Array of objects on user status in each hunting groups, only for work routine | * | rvcpGroupId | String | Hunting group unique identifier | * | presence | Object | Presence configuration, value can be overwritten by user | * | status | String | User's status in the hunting group
Possible values : `active`, `idle` | * | manage | Boolean | Manage presence on routine activation | * | value | String | Same choices as in Rainbow GUI
Possible values : `dnd`, `online`, `invisible`, `away` | * | cliOptions | Object | Cli options configuration | * | manage | Boolean | Manage cli options on routine activation | * | policy | String | Cli options policy
Possible values : `company_policy`, `installation_number`, `user_ddi_number`, `other_ddi_number` | * | phoneNumberId | String | Phone number id in "other\_ddi\_number" policy | * */ createCustomPersonalRoutine(name: string): Promise; /** * @public * @nodered true * @method deleteCustomPersonalRoutine * @async * @category Rainbow Voice Personal Routines * @instance * @param {string} routineId A user routine unique identifier. * @description * This api delete a user's custom personal routine.
* @return {Promise} the result. * */ deleteCustomPersonalRoutine(routineId: string): Promise; /** * @public * @nodered true * @method getPersonalRoutineData * @async * @category Rainbow Voice Personal Routines * @instance * @param {string} routineId A user routine unique identifier. * @description * This api returns a user's personal routine data.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Rvcp Personal Routines | * | type optionnel | String | Type of routine
Possible values : `At`, `work`, `Out`, `of`, `office`, `On`, `break`, `Custom` | * | id | String | Routine unique identifier | * | active | Boolean | Is the routine activated
Default value : `false` | * | name | String | Name of the routine | * | dndPresence | Boolean | If set to true, on routine activation the presence will be set to "dnd", if false "online", soon deprecated with presence object
Default value : `true` | * | deviceMode | Object | Device mode data | * | manage | Boolean | Is device mode managed on routine activation
Default value : `false` | * | mode | String | Device mode value, same choice(s) as in Rainbow GUI
Default value : `computer`
Possible values : `computer`, `office_phone` | * | immediateCallForward | Object | Immediate call forward data | * | manage | Boolean | Is immediate call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `immediate` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber` | * | busyCallForward | Object | Busy call forward data | * | manage | Boolean | Is busy call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `busy` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noreplyCallForward | Object | No reply call forward data | * | manage | Boolean | Is noreply call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `noreply` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noReplyDelay | Number | | * | huntingGroups | Object | | * | manage | Boolean | Default value : `false` | * | withdrawAll optionnel | Boolean | Not for work routine
Default value : `true` | * | huntingGroupsWithdraw optionnel | Object\[\] | Array of objects on user status in each hunting groups, only for work routine | * | rvcpGroupId | String | Hunting group unique identifier | * | presence | Object | Presence configuration, value can be overwritten by user | * | status | String | User's status in the hunting group
Possible values : `active`, `idle` | * | manage | Boolean | Manage presence on routine activation | * | value | String | Same choices as in Rainbow GUI
Possible values : `dnd`, `online`, `invisible`, `away` | * | cliOptions | Object | Cli options configuration | * | manage | Boolean | Manage cli options on routine activation | * | policy | String | Cli options policy
Possible values : `company_policy`, `installation_number`, `user_ddi_number`, `other_ddi_number` | * | phoneNumberId | String | Phone number id in "other\_ddi\_number" policy | * */ getPersonalRoutineData(routineId: string): Promise; /** * @public * @nodered true * @method getAllPersonalRoutines * @async * @category Rainbow Voice Personal Routines * @instance * @param {string} userId Identifier of the user for which we want to get the personal routines. Requesting user must be a supervisor. * @description * This api returns all user's personal routines data
*
* A supervisor can request the personal routines of a user by providing its identifier as a parameter.
* The requesting user must be supervisor of the given supervised user.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Detailed information about Rvcp Personal Routines | * | routines | Object\[\] | Routines data array of routine objects | * | id | String | Routine unique identifier | * | name | String | Name of the routine | * | type optionnel | String | Type of routine
Possible values : `At`, `work`, `Out`, `of`, `office`, `On`, `break`, `Custom` | * | active | Boolean | Is the routine activated
Default value : `false` | * | inSync | Boolean | Boolean to know if last activation or active routine update is done | * | issuesLastSync | Object | Indications about issues last activation or active routine update | * | dndPresence | Boolean | | * | presence | Boolean | | * | cliOptions | Boolean | | * | deviceMode | Boolean | | * | immediateCallForward | Boolean | | * | busyCallForward | Boolean | | * | noreplyCallForward | Boolean | | * | huntingGroups | Boolean | | * */ getAllPersonalRoutines(userId: string): Promise; /** * @public * @nodered true * @method updatePersonalRoutineData * @async * @category Rainbow Voice Personal Routines * @instance * @description * This api updates a user's personal routine data, it's not possible to update the work routine, it contains memorized data before the activation of another routine.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | cliOptions optionnel | Object | Cli options configuration | * | manage | Boolean | Manage cli options on routine activation | * | policy | String | Cli options policy
Possible values : `company_policy`, `installation_number`, `user_ddi_number`, `other_ddi_number` | * | phoneNumberId | String | Phone number id in "other\_ddi\_number" policy | * | data | Object | Detailed information about Rvcp Personal Routines | * | name | String | name of the routine | * | dndPresence | Boolean | If set to true, on routine activation the presence will be set to "dnd", if false "online", soon deprecated with presence object
Default value : `true` | * | deviceMode | Object | Device mode data | * | manage | Boolean | Is device mode managed on routine activation
Default value : `false` | * | mode | String | Device mode value, same choice(s) as in Rainbow GUI
Default value : `computer`
Possible values : `computer`, `office_phone` | * | immediateCallForward | Object | Immediate call forward data | * | manage | Boolean | Is immediate call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `immediate` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber` | * | busyCallForward | Object | Busy call forward data | * | manage | Boolean | Is busy call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `busy` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noreplyCallForward | Object | No reply call forward data | * | manage | Boolean | Is noreply call forward managed on routine activation
Default value : `false` | * | callForwardType | String | Default value : `noreply` | * | activate | Boolean | Default value : `false` | * | number | String | Default value : `null` | * | destinationType | String | Default value : `null`
Possible values : `voicemail`, `internalnumber`, `externalnumber`, `overflowvoicemail` | * | noReplyDelay | Number | | * | huntingGroups | Object | | * | manage | Boolean | Default value : `false` | * | type optionnel | String | Type of routine
Possible values : `At`, `work`, `Out`, `of`, `office`, `On`, `break`, `Custom` | * | withdrawAll optionnel | Boolean | Default value : `true` | * | active | Boolean | Is the routine activated
Default value : `false` | * | issuesLastSync optionnel | Object | Indications about issues if the routine was active | * | dndPresence | Boolean | | * | presence | Boolean | | * | cliOptions | Boolean | | * | deviceMode | Boolean | | * | immediateCallForward | Boolean | | * | busyCallForward | Boolean | | * | noreplyCallForward | Boolean | | * | presence | Object | Presence configuration, value can be overwritten by user | * | huntingGroups | Boolean | | * | manage | Boolean | Manage presence on routine activation | * | value | String | Same choices as in Rainbow GUI
Possible values : `dnd`, `online`, `invisible`, `away` | * * @param {string} routineId A user routine unique identifier. * @param {boolean} dndPresence Configure dndPresence on routine activation, or online on fallback to work routine, soon deprecated with presence object * @param {string} name New routine name, not for default routine. * @param {Object} deviceMode Device mode configuration
* - deviceMode.manage : boolean Manage device mode on routine activation
* - deviceMode.mode : string Same choices as in Rainbow GUI. Possible values : computer, office_phone
* @param {Object} presence Presence configuration, value can be overwritten by user
* - presence.manage : boolean Manage presence on routine activation
* - presence.value : string Same choices as in Rainbow GUI. Possible values : dnd, online, invisible, away
* @param {Object} immediateCallForward immediate call forward configuration
* - immediateCallForward.manage : boolean Manage immediate call forward
* - immediateCallForward.activate : boolean
* - immediateCallForward.number optionnel : string Mandatory on destinationType internalnumber or externalnumber
* - immediateCallForward.destinationType optionnel : string Possible values : voicemail, internalnumber, externalnumber
* @param {Object} busyCallForward Busy call forward configuration
* - busyCallForward.manage : boolean Manage busy call forward
* - busyCallForward.activate : boolean
* - busyCallForward.number optionnel : string Mandatory on destinationType internalnumber or externalnumber
* - busyCallForward.destinationType optionnel : string Possible values : voicemail, internalnumber, externalnumber
* @param {Object} noreplyCallForward Noreply call forward configuration
* - noreplyCallForward.manage : boolean Manage noreply call forward
* - noreplyCallForward.activate : boolean
* - noreplyCallForward.number optionnel : string Mandatory on destinationType internalnumber or externalnumber
* - noreplyCallForward.destinationType optionnel : string Possible values : voicemail, internalnumber, externalnumber
* - noreplyCallForward.noReplyDelay : number timeout in seconds after which the call will be forwarded Default value : 20 Ordre de grandeur : 10-60
* @param {Object} huntingGroups Hunting groups configuration
* - huntingGroups.withdrawAll Boolean Withdraw from all hunting groups or keep the work data
* - huntingGroups.manage Boolean Manage hunting groups configuration
* */ updatePersonalRoutineData(routineId: string, dndPresence: boolean, name: string, presence: { manage: boolean; value: string; }, deviceMode: { manage: boolean; mode: string; }, immediateCallForward: { manage: boolean; activate: boolean; number: string; destinationType: string; }, busyCallForward: { manage: boolean; activate: boolean; number: string; destinationType: string; }, noreplyCallForward: { manage: boolean; activate: boolean; number: string; destinationType: string; noReplyDelay: number; }, huntingGroups: { withdrawAll: boolean; }): Promise; /** * @public * @nodered true * @method manageUserRoutingData * @async * @category Rainbow Voice Routing * @instance * @param {string} destinations List of device's identifiers indicating which devices will receive incoming calls. * @param {string} currentDeviceId Device's identifier to use for 3Pcc initial requests like "Make Call". * @description * This api allows user routing management
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | destinations | Object\[\] | Which devices will be ringing when an incoming call is received | * | deviceId | String | Destination identifier | * | type | String | Destination type (`webrtc` : destination is a softphone ; `sip` : destination is a SIP deskphone)
Possible values : `sip`, `webrtc` | * | currentDeviceId | String | Which device is used for handling 3PCC initial requests (like "Make Call") | * | current | String | (Deprecated) Which device is used for handling 3PCC initial requests (like "Make Call") | * */ manageUserRoutingData(destinations: Array, currentDeviceId: string): Promise; /** * @public * @nodered true * @method retrievetransferRoutingData * @async * @category Rainbow Voice Routing * @instance * @param {string} calleeId Callee user identifier. * @param {string} addresseeId Addressee user identifier (in case of Rainbow user). * @param {string} addresseePhoneNumber Addressee phone number (short or external number). * @description * For transfer, get addressee routing data.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | jid_im | String | Addressee Jabber identifier (WebRTC). | * | phoneNumber | String | Addressee phone number (deskphone or external number). | * */ retrievetransferRoutingData(calleeId: string, addresseeId?: string, addresseePhoneNumber?: string): Promise; /** * @public * @nodered true * @method retrieveUserRoutingData * @async * @category Rainbow Voice Routing * @instance * @description * This api returns user routing information.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | destinations | Object\[\] | Which devices will be ringing when an incoming call is received | * | deviceId | String | Destination identifier | * | type | String | Destination type (`webrtc` : destination is a softphone ; `sip` : destination is a SIP deskphone)
Possible values : `sip`, `webrtc` | * | currentDeviceId | String | Which device is used for handling 3PCC initial requests (like "Make Call") | * | current | String | (Deprecated) Which device is used for handling 3PCC initial requests (like "Make Call") | * */ retrieveUserRoutingData(): Promise; /** * @public * @nodered true * @method retrieveVoiceUserSettings * @async * @category Rainbow Voice Voice * @instance * @description * Allows logged in user to retrieve his voice settings.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | Response data | * | emulatedRingBackTone | Boolean | Indicate that emulated ringback tone is active | * */ retrieveVoiceUserSettings(): Promise; /** * @public * @nodered true * @method addParticipant3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.callee : string Contains the callee number.
* @description * Adds a participant in a call, as a one step conference.
* @return {Promise} the result. * */ addParticipant3PCC(callId: string, callData: { callee: string; }): Promise; /** * @public * @nodered true * @method answerCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.legId : string Leg identifier, on which the call will be answered.
* @description * This is a 3PCC answer call.
* @return {Promise} the result. * */ answerCall3PCC(callId: string, callData: { legId: string; }): Promise; /** * @public * @nodered true * @method blindTransferCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.destination : Object if destination type is a `String`, its content is treated as the phone number to call, if destination type is an `Object` with following attributes is expected:
* callData.destination.userId : string Identifier of the user to call.
* callData.destination.resource : string Specific user resource to call.
* @description * This is a 3PCC blind transfer call. Immediate transfer of an active call to a new destination.
* @return {Promise} the result. * */ blindTransferCall3PCC(callId: string, callData: { destination: { userId: string; resource: string; }; }): Promise; /** * @public * @nodered true * @method deflectCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.destination : string The number to deflect to.
* @description * This is a 3PCC deflect call. During ringing state, user transfer the call to another destination.
* @return {Promise} the result. * */ deflectCall3PCC(callId: string, callData: { destination: string; }): Promise; /** * @public * @nodered true * @method holdCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.legId : string Leg identifier, from which the call will be held.
* @description * This is a 3PCC hold call.
* @return {Promise} the result. * */ holdCall3PCC(callId: string, callData: { legId: string; }): Promise; /** * @public * @nodered true * @method makeCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {Object} callData Object with :
* callData.deviceId : string Identifier of the device from which the call should be initiated.
* callData.callerAutoAnswer : boolean Indicates if the call should be automatically answered by the caller (if true). Default value : false.
* callData.anonymous : boolean If true, the caller identity will not be presented to the other call parties. Default value : false.
* callData.calleeExtNumber : string The format could be anything the user can type, it will be transformed in E164 format.
* callData.calleePbxId : string PBX identifier on which the callee is attached.
* callData.calleeShortNumber : string Callee short number. CalleePbxId must be provided with calleeShortNumber, as it is used to check that caller and callee are on the same pbx.
* callData.calleeCountry : string Callee country code. If not specified, the logged user country code will be used.
* callData.dialPadCalleeNumber : string Callee number ; with the same format as if number was dialed By EndUser using a deskphone :
* That means that inside this parameter, we can have internal number ; or external number (for national and international calls) but in that case the outgoing prefix must be present.
* This parameter support also the E.164 format.
* Examples of accepted number into this parameter:
* - +33299151617 : national or international call to France
* - 0 00 XXXXXXXXX : for international calls where 0 is PBX outbound prefix and 00 the international prefix (spaces are not mandatory, it is for better understanding)
* - 0 0 XXXXXXXXX : for national calls where 0 is PBX outbound prefix and 0 the national prefix (spaces are not mandatory, it is for better understanding)
* - 0 XXXX : for services where 0 is PBX outbound prefix (space is not mandatory, it is for better understanding)
* - XXXXX : for internal calls
*
* This parameter is used only if other "callee" parameters are not set.
* @description * This api makes a 3PCC call between 2 users.
* @return {Promise} the result. * */ makeCall3PCC(callData: { deviceId: string; callerAutoAnswer: boolean; anonymous: boolean; calleeExtNumber: string; calleePbxId: string; calleeShortNumber: string; calleeCountry: string; dialPadCalleeNumber: string; }): Promise; /** * @public * @nodered true * @method mergeCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} activeCallId Active call identifier.
* @param {Object} callData Object with :
* callData.heldCallId : string Held call identifier.
* @description * This is a 3PCC merge call. Merge an held call into the active call (single call or conference call).
* @return {Promise} the result. * */ mergeCall3PCC(activeCallId: string, callData: { heldCallId: string; }): Promise; /** * @public * @nodered true * @method pickupCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {Object} callData Object with :
* callData.deviceId : string Identifier of the device from which the call should be initiated.
* callData.callerAutoAnswer : string Indicates if the call should be automatically answered by the caller (if true). Default value : false.
* callData.calleeShortNumber : string Callee short number.
* @description * 3PCC pickup call can be used in case of manager/assistant context, when an assistant wants to pickup a call on a manager. * To allow such pickup, the following checks must be fulfilled: * * The user initiating the pickup must be an active assistant in the same group as the manager .
* @return {Promise} the result. * */ pickupCall3PCC(callData: { deviceId: string; callerAutoAnswer: boolean; calleeShortNumber: string; }): Promise; /** * @public * @nodered true * @method releaseCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {string} legId Leg identifier, from which the call will be released.
* @description * This is a 3PCC release call.
* If the legId is not specified, the resulting operation will be considered as a 'clearCall'.
* If specified, a 'clearConnection' will be invoked.
* @return {Promise} the result. * */ releaseCall3PCC(callId: string, legId: string): Promise; /** * @public * @nodered true * @method retrieveCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.legId : string Leg identifier, from which the call will be retrieved.
* @description * This is a 3PCC retrieve call.
* @return {Promise} the result. * */ retrieveCall3PCC(callId: string, callData: { legId: string; }): Promise; /** * @public * @nodered true * @method sendDTMF3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Call identifier. * @param {Object} callData :
* callData.legId : string Leg identifier, on which the DTMF will be sent.
* callData.digits : string Digits to send.
* @description * This is a 3PCC send DTMF.
* @return {Promise} the result. * */ sendDTMF3PCC(callId: string, callData: { legId: string; digits: string; }): Promise; /** * @public * @nodered true * @method snapshot3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} callId Snapshot will be filtered with the given callId. * @param {string} deviceId Snapshot will be filtered with the given deviceId. * @param {string} seqNum If provided and different from the server's sequence number, full snapshot will be returned. If provided seqNum is the same as the one on the server, no snapshot returned (client and server are sync). * @description * This is a 3PCC Snapshot of the user's calls and devices.
* Providing a callId will restrict the snapshot to the given call. The same principle applies to the deviceId for the user's devices states.
* A synchronisation check can also be used by the client to see if any changes have been correctly notified by the server.
* To use this mechanism, the client will send the last sequence number received, either from events, or when requesting the last snapshot.
* The main advantage of using this sequence number is to minimize the data flow between the client and the server.
* Returning the complete snapshot result is only necessary when sequence numbers are different between the server and the client.
* @return {Promise} the result. * * data : Object snapshot Calls and/or devices snapshot * */ snapshot3PCC(callId: string, deviceId: string, seqNum: number): Promise; /** * @public * @nodered true * @method transferCall3PCC * @async * @category Rainbow Voice Voice * @instance * @param {string} activeCallId Active call identifier. * @param {Object} callData :
* callData.heldCallId : string Held call identifier.
* @description * This is a 3PCC transfer call. Transfer the active call to the given held call.
* @return {Promise} the result. * */ transferCall3PCC(activeCallId: string, callData: { heldCallId: string; }): Promise; /** * @public * @nodered true * @method deleteAVoiceMessage * @async * @category Rainbow Voice Voice * @instance * @param {string} messageId Message identifier. * @description * Deletion of the given voice message.
* When deleted, the user will receive a MWI XMPP notification.
* @return {Promise} the result. * */ deleteAVoiceMessage(messageId: string): Promise; /** * @public * @nodered true * @method deleteAllVoiceMessages * @async * @category Rainbow Voice Voice * @instance * @param {string} messageId Message identifier. * @description * Deletion of all user's voice messages.
* When updated, the user will receive a MWI XMPP notification.
* @return {Promise} the result. * */ deleteAllVoiceMessages(messageId: string): Promise; /** * @public * @nodered true * @method getEmergencyNumbersAndEmergencyOptions * @async * @category Rainbow Voice Voice * @instance * @description * This api returns emergency numbers the user can use (+ emergency options).
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | emergencyNumbers | Object\[\] | Array of emergency numbers | * | outgoingPrefix | String | Reminder of what is the outgoing prefix for the Cloud PBX | * | emergencyOptions | Object | Emergency options | * | callAuthorizationWithSoftPhone | Boolean | Indicates if SoftPhone can perform an emergency call over voip | * | number | String | emergency number | * | description | String | description of the emergency number | * */ getEmergencyNumbersAndEmergencyOptions(): Promise; /** * @public * @nodered true * @method getVoiceMessages * @async * @category Rainbow Voice Voice * @instance * @param {number} limit=100 Allow to specify the number of voice messages to retrieve. Default value : 100. * @param {number} offset=0 Allow to specify the position of first voice messages to retrieve. Default value : 0. * @param {string} sortField="date" Sort voice messages list based on the given field. Default value : date. * @param {number} sortOrder=-1 Specify order when sorting voice messages. Default is descending. Default value : -1. Possible values : -1, 1 . * @param {string} fromDate List voice messages created after the given date. * @param {string} toDate List voice messages created before the given date. * @param {string} callerName List voice messages with caller party name containing the given value. * @param {string} callerNumber List voice messages with caller party number containing the given value. * @description * Returns the list of voice messages.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | id | String | voice message identifier | * | fileName | String | File name of the voice message - composed of the voice message date | * | mime | String | MIME type of the voice message file
Possible values : `audio/mpeg` | * | size | Number | Size of the voice message file (in bytes). | * | duration | Number | Duration of the voice message (in seconds) | * | date | Date | Date of the voice message | * | callerInfo | Object | Caller party info | * | data | Object\[\] | Voice messages | * | number | String | Caller number | * | name optionnel | String | Caller name, if available | * | firstName optionnel | String | Caller firstName, if available | * | lastName optionnel | String | Caller lastName, if available | * | userId optionnel | String | Caller user identifier if it can be resolved. | * | jid optionnel | String | Caller Jid if it can be resolved. | * */ getVoiceMessages(limit: number, offset: number, sortField: string, sortOrder: number, fromDate: string, toDate: string, callerName: string, callerNumber: string): Promise; /** * @public * @nodered true * @method getUserDevices * @async * @category Rainbow Voice Voice * @instance * @description * This api returns user devices information.
* @return {Promise} the result. * * Array of * * | Champ | Type | Description | * | --- | --- | --- | * | id | String | Device Unique Identifier | * | deviceId | String | Device identifier to use for 3PCC requests (like MakeCall) | * | type | String | Device type (enumeration ; values are : "sip" ; "webrtc") | * | jid_wrg | String | Jabber identifier of the associated Web Rtc Gateway (only set when type is "webrtc") | * */ getUserDevices(): Promise; /** * @public * @nodered true * @method updateVoiceMessage * @async * @category Rainbow Voice Voice * @param {string} messageId Message Identifier. * @param {Object} urlData :
* urlData.read : boolean Mark the message as read or unread.
* @instance * @description * Update the given voice message - mark it as read or unread.
* When a message is 'unread', it is considered as a new message. On the opposite, a 'read' message is considered as an old message.
* @return {Promise} the result. * * | Champ | Type | Description | * | --- | --- | --- | * | messageUpdateResult | Object | message Updated message | * */ updateVoiceMessage(messageId: string, urlData: { read: boolean; }): Promise; /** * @public * @nodered true * @method forwardCall * @async * @category Rainbow Voice Voice Forward * @param {string} callForwardType The forward type to update. Possible values : immediate, busy, noreply * @param {string} userId Identifier of the user for which we want to set the forwards. Requesting user must be a supervisor. * @param {Object} urlData :
* urlData.destinationType : string The destination type. Possible values : internalNumber, externalNumber, voicemail .
* urlData.number : string The number to forward.
* urlData.activate : boolean Activate or cancel a forward.
* urlData.noReplyDelay : number in case of 'noreply' forward type, timeout in seconds after which the call will be forwarded. Default value : 20. Possible values : {10-60} .
* @instance * @description * This api activates/deactivates a forward.
* Group forward (immediate/managersecretary) is not supported here. There is a dedicated API for group forward management (Cloud PBX group forwards)
* If the destinationType is "voicemail" and overflow is enabled on the Cloud PBX or/and forced on the subscriber, the overflow configuration (noReplyDelay) will be use.
*
* A supervisor can also set the forward of a user by providing its identifier as a parameter, as well as the supervision group identifier.
* In such case, the requesting user must be supervisor of the given supervision group, and the requested user must 'supervised' in the given group.
* @return {Promise} the result. * */ forwardCall(callForwardType: string, userId: string, urlData: { destinationType: string; number: string; activate: boolean; noReplyDelay: number; }): Promise; /** * @public * @nodered true * @method getASubscriberForwards * @async * @category Rainbow Voice Voice Forward * @param {string} userId Identifier of the user for which we want to get the forwards. Requesting user must be a supervisor. * @instance * @description * This api gets the user forwards.
* For internalnumber forward, on return data you will see the userId/rvcpGroupId/rvcpAutoAttendantId with the associated name.
* If name equals "null" or the id equals "null", the concerned user/rvcpGroup/rvcpAutoAttendantId is deleted, please remove the associated forward.
*
* A supervisor can request the forwards of a user by providing its identifier as a parameter.
* The requesting user must be supervisor of the given supervised user.
* @return {Promise} the result. * */ getASubscriberForwards(userId: string): Promise; /** * @public * @nodered true * @method searchCloudPBXhuntingGroups * @async * @category Rainbow Voice Voice Search Hunting Groups * @param {string} name Search hunting groups on the given name * @instance * @description * This API allows to retrieve Cloud PBX Hunting Groups.
* @return {Promise} the result. * */ searchCloudPBXhuntingGroups(name: string): Promise; } export { RBVoiceService as RBVoiceService };