Fix. xml_handler/directory generate vm params based on number_alias

This commit is contained in:
Alexey Melnichuk 2015-07-07 18:16:21 +04:00
parent e89a499b2c
commit b4435c974e
1 changed files with 2 additions and 2 deletions

View File

@ -281,8 +281,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