Update index.lua (#4663)
This commit is contained in:
parent
516d98a4fc
commit
de7f341d5f
|
|
@ -452,21 +452,25 @@
|
||||||
--freeswitch.consoleLog("notice", "[voicemail][destinations] SQL:" .. sql .. "; params:" .. json.encode(params) .. "\n");
|
--freeswitch.consoleLog("notice", "[voicemail][destinations] SQL:" .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||||
destinations = {};
|
destinations = {};
|
||||||
x = 1;
|
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)
|
dbh:query(sql, params, function(row)
|
||||||
destinations[x] = row;
|
destinations[x] = row;
|
||||||
x = x + 1;
|
x = x + 1;
|
||||||
end);
|
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
|
--show the storage type
|
||||||
freeswitch.consoleLog("notice", "[voicemail] ".. storage_type .. "\n");
|
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
|
--loop through the voicemail destinations
|
||||||
y = 1;
|
y = 1;
|
||||||
for key,row in pairs(destinations) do
|
for key,row in pairs(destinations) do
|
||||||
--determine uuid
|
--determine uuid
|
||||||
if (y == 1) then
|
if (y == count) then
|
||||||
voicemail_message_uuid = uuid;
|
voicemail_message_uuid = uuid;
|
||||||
else
|
else
|
||||||
voicemail_message_uuid = api:execute("create_uuid");
|
voicemail_message_uuid = api:execute("create_uuid");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue