MT#63594 Update log_debug preference

Update the log_debug preference from boolean version to enum with
three log levels : NOTICE, INFO and DEBUG.
Update the attribute name to call_log_level.

Change-Id: Iab2edbaec82702d74859a687cb814f5c71c68d3f
mr14.0
kthiry 4 months ago committed by Sipwise Jenkins Builder
parent f863fe359d
commit 646bb31e41

@ -0,0 +1,18 @@
USE provisioning;
SET autocommit=0;
SELECT id INTO @vp_id FROM voip_preferences
WHERE attribute = 'call_log_level';
UPDATE voip_preferences
SET attribute = 'log_debug'
WHERE id = @vp_id;
UPDATE voip_preferences
SET data_type = 'boolean',
description = "Enable scoped debug logging for subscriber, domain, or peer. When enabled, all log levels for dialogs in this scope are promoted to be recorded regardless of the global proxy log setting. The default is disabled."
WHERE id = @vp_id;
DELETE FROM voip_preferences_enum WHERE preference_id = @vp_id;
COMMIT;

@ -0,0 +1,23 @@
USE provisioning;
SET autocommit=0;
SELECT id INTO @vp_id FROM voip_preferences
WHERE attribute = 'log_debug';
UPDATE voip_preferences
SET attribute = 'call_log_level'
WHERE id = @vp_id;
UPDATE voip_preferences
SET data_type = 'enum',
description = "Define the log level verbosity preference for subscribers or peers. The level can be NOTICE, INFO or DEBUG."
WHERE id = @vp_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
(@vp_id, 'NOTICE', 'notice', 1, 0, 0, 1, 0, 0, 1),
(@vp_id, 'INFO', 'info', 1, 0, 0, 1, 0, 0, 0),
(@vp_id, 'DEBUG', 'debug', 1, 0, 0, 1, 0, 0, 0);
COMMIT;

@ -1000,7 +1000,7 @@ CREATE TABLE `usr_preferences` (
KEY `ua_idx` (`uuid`,`attribute`),
KEY `av_idx` (`attribute`,`value`),
KEY `uda_idx` (`username`,`domain`,`attribute`,`value`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8mb4;
@ -1279,6 +1279,7 @@ set autocommit=0;
INSERT INTO `usr_preferences` VALUES (1,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','cloud_pbx_hunt_policy',0,'none','1900-01-01 00:00:01');
INSERT INTO `usr_preferences` VALUES (5,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','emergency_location_format',0,'cirpack','1900-01-01 00:00:01');
INSERT INTO `usr_preferences` VALUES (6,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','play_announce_before_recording',0,'never','1900-01-01 00:00:01');
INSERT INTO `usr_preferences` VALUES (8,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','call_log_level',1,'notice','1900-01-01 00:00:01');
commit;
set autocommit=0;
INSERT INTO `version` VALUES ('acc',5);

@ -25,7 +25,7 @@ CREATE TABLE `db_schema` (
PRIMARY KEY (`id`),
UNIQUE KEY `rev_idx` (`revision`,`node`,`site_id`),
KEY `release_idx` (`release`)
) ENGINE=InnoDB AUTO_INCREMENT=917 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=918 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -30968,6 +30968,7 @@ INSERT INTO `db_schema` VALUES (913,15868,'spce','1970-01-01 00:00:01','trunk',1
INSERT INTO `db_schema` VALUES (914,15869,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (915,15870,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (916,15871,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (917,15872,'spce','1970-01-01 00:00:01','trunk',1);
commit;
set autocommit=0;
INSERT INTO `timezone` VALUES ('1','localtime','1970-01-01 00:00:01','1970-01-01 00:00:01',NULL);

@ -1218,7 +1218,7 @@ CREATE TABLE `voip_preferences_enum` (
PRIMARY KEY (`id`),
KEY `pref_id_idx` (`preference_id`),
CONSTRAINT `pref_id_fk` FOREIGN KEY (`preference_id`) REFERENCES `voip_preferences` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=413 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -1587,7 +1587,7 @@ CREATE TABLE `voip_usr_preferences` (
CONSTRAINT `v_u_p_subscriberid_ref` FOREIGN KEY (`subscriber_id`) REFERENCES `voip_subscribers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `voip_usr_preferences_ibfk_1` FOREIGN KEY (`subscriber_id`) REFERENCES `voip_subscribers` (`id`),
CONSTRAINT `voip_usr_preferences_ibfk_2` FOREIGN KEY (`attribute_id`) REFERENCES `voip_preferences` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -4162,7 +4162,7 @@ INSERT INTO `voip_preferences` VALUES (408,3,'otp_secret','OTP Secret',0,1,1,0,0
INSERT INTO `voip_preferences` VALUES (409,3,'show_otp_registration_info','Show OTP Registration Info',0,1,1,0,0,0,0,0,0,0,0,'1970-01-01 00:00:01',1,0,'boolean',1,'Show Time-based One-Time-Password (TOTP) secret and registration info for the next CSC logins.',0,0,0);
INSERT INTO `voip_preferences` VALUES (410,3,'dnd','Do Not Disturb (DND) mode',1,1,1,1,0,0,0,0,0,0,0,'1970-01-01 00:00:01',0,1,'boolean',0,'Enable Do Not Disturb (DND) mode. If activated the subscriber will not receive any call. The call forwards will not be taken into account.',0,0,1);
INSERT INTO `voip_preferences` VALUES (411,4,'colr','Hide own number for inbound calls',1,1,1,0,0,0,0,0,0,0,0,'1970-01-01 00:00:01',0,1,'boolean',0,'\'Connected line identification restriction\' - if set to true, the CLI is not displayed to the remote party on incoming calls.',0,0,1);
INSERT INTO `voip_preferences` VALUES (412,8,'log_debug','Debug log level',1,1,1,0,0,1,0,0,0,0,0,'1970-01-01 00:00:01',0,0,'boolean',0,'Enable scoped SIP debug logging for subscriber, domain, or peer. When enabled, all log levels for dialogs in this scope are promoted to be recorded regardless of the global proxy log setting. The default is disabled.',0,0,0);
INSERT INTO `voip_preferences` VALUES (412,8,'call_log_level','Debug log level',1,1,1,0,0,1,0,0,0,0,0,'1970-01-01 00:00:01',0,0,'enum',0,'Define the log level verbosity preference for subscribers or peers. The level can be NOTICE, INFO or DEBUG.',0,0,0);
commit;
set autocommit=0;
INSERT INTO `voip_preferences_enum` VALUES (8,62,'use domain default',NULL,1,1,0,0,NULL,0,0,0,0,NULL,NULL);
@ -4536,6 +4536,9 @@ INSERT INTO `voip_preferences_enum` VALUES (406,403,'use domain default',NULL,1,
INSERT INTO `voip_preferences_enum` VALUES (407,403,'Disabled','disabled',1,1,0,0,0,0,0,0,0,0,NULL);
INSERT INTO `voip_preferences_enum` VALUES (408,403,'Disabled','disabled',0,0,1,0,0,0,0,0,0,1,NULL);
INSERT INTO `voip_preferences_enum` VALUES (409,403,'Enabled','enabled',1,1,1,0,0,0,0,0,0,0,NULL);
INSERT INTO `voip_preferences_enum` VALUES (410,412,'NOTICE','notice',1,0,0,1,0,0,0,0,0,1,NULL);
INSERT INTO `voip_preferences_enum` VALUES (411,412,'INFO','info',1,0,0,1,0,0,0,0,0,0,NULL);
INSERT INTO `voip_preferences_enum` VALUES (412,412,'DEBUG','debug',1,0,0,1,0,0,0,0,0,0,NULL);
commit;
set autocommit=0;
commit;
@ -4750,6 +4753,7 @@ set autocommit=0;
INSERT INTO `voip_usr_preferences` VALUES (1,3,97,'none','1970-01-01 00:00:01');
INSERT INTO `voip_usr_preferences` VALUES (7,3,372,'cirpack','1970-01-01 00:00:01');
INSERT INTO `voip_usr_preferences` VALUES (8,3,305,'never','1970-01-01 00:00:01');
INSERT INTO `voip_usr_preferences` VALUES (10,3,412,'notice','1970-01-01 00:00:01');
commit;
set autocommit=0;
commit;

Loading…
Cancel
Save