Merge pull request #1018 from moteus/number_alias_as_vm_id

Change. Use number_alias as voicemail_id.
This commit is contained in:
FusionPBX
2015-08-11 20:43:20 -06:00
4 changed files with 9 additions and 9 deletions

View File

@@ -284,8 +284,8 @@
--get the voicemail from the database
if (continue) then
vm_enabled = "true";
if tonumber(user) == nil then
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. number_alias .. "' ";
if number_alias and #number_alias > 0 then
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. number_alias .. "' ";
else
sql = "SELECT * FROM v_voicemails WHERE domain_uuid = '" .. domain_uuid .. "' and voicemail_id = '" .. user .. "' ";
end