Skip to content

Commit

Permalink
Update index.lua (fusionpbx#4663)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenbea authored and markjcrane committed Sep 26, 2019
1 parent 7df0b39 commit b023ef0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions resources/install/scripts/app/voicemail/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,21 +452,25 @@
--freeswitch.consoleLog("notice", "[voicemail][destinations] SQL:" .. sql .. "; params:" .. json.encode(params) .. "\n");
destinations = {};
x = 1;
table.insert(destinations, {domain_uuid=domain_uuid,voicemail_destination_uuid=voicemail_uuid,voicemail_uuid=voicemail_uuid,voicemail_uuid_copy=voicemail_uuid});
x = x + 1;

dbh:query(sql, params, function(row)
destinations[x] = row;
x = x + 1;
end);

table.insert(destinations, {domain_uuid=domain_uuid,voicemail_destination_uuid=voicemail_uuid,voicemail_uuid=voicemail_uuid,voicemail_uuid_copy=voicemail_uuid});
--show the storage type
freeswitch.consoleLog("notice", "[voicemail] ".. storage_type .. "\n");


count = 0
for k,v in pairs(destinations) do
count = count + 1
end

--loop through the voicemail destinations
y = 1;
for key,row in pairs(destinations) do
--determine uuid
if (y == 1) then
if (y == count) then
voicemail_message_uuid = uuid;
else
voicemail_message_uuid = api:execute("create_uuid");
Expand Down

0 comments on commit b023ef0

Please sign in to comment.