Voicemail mysql only works for basic values

Hi,

I just installed asterisk 18.6 as a standalone voicemail. I created to following mysql table:

CREATE TABLE `voicemail` (
  `uniqueid` int(4) NOT NULL AUTO_INCREMENT,
  `customer_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `context` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `mailbox` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `password` int(4) NOT NULL,
  `fullname` varchar(150) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `pager` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `tz` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT 'central',
  `attach` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `saycid` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'yes',
  `dialout` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `callback` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `review` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `operator` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `envelope` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `sayduration` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `saydurationm` tinyint(4) NOT NULL DEFAULT 1,
  `sendvoicemail` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `delete` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `nextaftercmd` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'yes',
  `forcename` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `forcegreetings` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'no',
  `hidefromdir` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'yes',
  `stamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `attachfmt` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `searchcontexts` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `cidinternalcontexts` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `exitcontext` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `volgain` varchar(4) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `tempgreetwarn` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin DEFAULT 'yes',
  `messagewrap` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_bin DEFAULT 'no',
  `minpassword` int(2) DEFAULT 4,
  `vm-password` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-newpassword` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-passchanged` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-reenterpassword` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-mismatch` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-invalid-password` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `vm-pls-try-again` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `listen-control-forward-key` varchar(2) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `listen-control-reverse-key` varchar(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `listen-control-pause-key` varchar(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `listen-control-restart-key` varchar(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `listen-control-stop-key` varchar(13) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `backupdeleted` varchar(3) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '25',
  PRIMARY KEY (`uniqueid`),
  KEY `mailbox_context` (`mailbox`,`context`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1

I have configured mysql and it basically works. When I call the voicemail, I see aterisk makes a “select * from voicemail” query in mysql, the mailbox/password/context configured for the user are properly interpreted and work fine, but any other parameter I configured on the table do not seem to take effect.

For example, I set “minpassword”=4, but I can still change the password to something shorter than 4 digits.

Is there something extra that I need to do for all parameters to work? when I used voicemail.conf those parameters could be defined globally but each voicemail definition can override the global value. I would assume is the same for the mysql implementation?