-- Copy of authenticator-plaintext, plus added authentication from voicemail DB module (..., package.seeall) require("md5") list_fields = function(self, tabl) return nil end read_field = function(self, tabl, field) return nil end delete_field = function(self, tabl, field) return false end write_entry = function(self, tabl, field, id, entry) return false end read_entry = function(self, tabl, field, id) local result if tabl == authenticator.usertable and field == "" then -- authenticator is reading one user local vmcontroller = self:new("freeswitch-vmail/vmail") local users = vmcontroller.model.list_passwords(id) if users and users.value and users.value[1] and users.value[1].password then result = md5.sumhexa(users.value[1].password)..":Voicemail User:/freeswitch-vmail/vmail/USER::/freeswitch-vmail/vmail/listmymessages" end vmcontroller:destroy() end return result end delete_entry = function (self, tabl, field, id) return false end