TT#157500 New preference busy_hg_member_mode

see RQRAINB-6610

Add the new domain/subscriber preference 'busy_hg_member_mode' to
determine if a huntgroup call can be distributed or not to a busy member.
The new preference accepts the following values:
- 'ring' the call is always distributed to the member whatever is
  his/her busy status (note: default value for domain preference)
- 'skip_totaluser' or 'skip_activeuser' the call is not distributed
  to a member considered as busy depending of the counter 'totaluser'
  or 'activeuser'.

Change-Id: I83973d7bdae2420d8c6836ddcbc542eb7c6f9fd2
mr10.4.1
Antoine Lingat 4 years ago
parent e6a641ee01
commit cc9e2633f4

@ -0,0 +1,10 @@
USE provisioning;
SET autocommit=0;
SELECT id INTO @at_id FROM voip_preferences WHERE attribute = "busy_hg_member_mode";
DELETE FROM voip_preferences_enum WHERE preference_id = @at_id;
DELETE FROM voip_preferences WHERE id = @at_id;
COMMIT;

@ -0,0 +1,36 @@
USE provisioning;
SET autocommit=0;
SELECT id INTO @pgid FROM voip_preference_groups WHERE name = 'Cloud PBX';
INSERT INTO voip_preferences SET
voip_preference_groups_id = @pgid,
attribute = "busy_hg_member_mode",
label = "Busy huntgroup member mode",
type = 0,
max_occur = 1,
usr_pref = 1,
prof_pref = 0,
dom_pref = 1,
peer_pref = 0,
contract_pref = 0,
contract_location_pref = 0,
modify_timestamp = now(),
internal = 0,
expose_to_customer = 0,
data_type = "enum",
read_only = 0,
description = "Defines whether a subscriber can accept a hunt group call when busy in another call or to exclude it from the hunt group targets based on either 'totaluser' or 'activeuser' call counters";
SELECT last_insert_id() INTO @pref_id;
INSERT INTO voip_preferences_enum
(preference_id, label, value, usr_pref, dom_pref, prof_pref, peer_pref, contract_pref, contract_location_pref, default_val)
VALUES
(@pref_id, 'use domain default', NULL, 1, 0, 0, 0, 0, 0, 1),
(@pref_id, 'ring', 'ring', 1, 0, 0, 0, 0, 0, 0),
(@pref_id, 'ring', 'ring', 0, 1, 0, 0, 0, 0, 1),
(@pref_id, 'skip based on totaluser', 'skip_totaluser', 1, 1, 0, 0, 0, 0, 0),
(@pref_id, 'skip based on activeuser', 'skip_activeuser', 1, 1, 0, 0, 0, 0, 0);
COMMIT;
Loading…
Cancel
Save