е
Size: a a a
е
AA
А
O
АХ
DM
DM
O
VK
Callcenter-announce-position.lua
после входа в очередь. На вход передавать параметры: uuid, идентификатор очереди и периодичность озвучки api = freeswitch.API()
caller_uuid = argv[1]
if caller_uuid==nil then return end
queue_name = argv[2]
if queue_name==nil then return end
mseconds = argv[3]
if mseconds==nil then return end
while (true) do
freeswitch.msleep(mseconds)
members = api:executeString("callcenter_config queue list members "..queue_name)
pos=1
exists=false
for line in members:gmatch("[^\r\n]+") do
if (string.find(line,"Trying")~=nil or string.find(line,"Waiting")~=nil) then
if string.find(line,caller_uuid,1,true)~=nil then
exists=true
if (pos == 1) then
api:executeString("uuid_broadcast "..caller_uuid.." ivr/queue-youarenext.wav aleg");
else
api:executeString("uuid_broadcast "..caller_uuid.." file_string://ivr/queue-thereare.wav!digits/"..pos..".wav aleg");
end
end
pos=pos+1
end
end
if exists==false then return end
end
O
VK
${uuid}
AM
O
Callcenter-announce-position.lua
после входа в очередь. На вход передавать параметры: uuid, идентификатор очереди и периодичность озвучки api = freeswitch.API()
caller_uuid = argv[1]
if caller_uuid==nil then return end
queue_name = argv[2]
if queue_name==nil then return end
mseconds = argv[3]
if mseconds==nil then return end
while (true) do
freeswitch.msleep(mseconds)
members = api:executeString("callcenter_config queue list members "..queue_name)
pos=1
exists=false
for line in members:gmatch("[^\r\n]+") do
if (string.find(line,"Trying")~=nil or string.find(line,"Waiting")~=nil) then
if string.find(line,caller_uuid,1,true)~=nil then
exists=true
if (pos == 1) then
api:executeString("uuid_broadcast "..caller_uuid.." ivr/queue-youarenext.wav aleg");
else
api:executeString("uuid_broadcast "..caller_uuid.." file_string://ivr/queue-thereare.wav!digits/"..pos..".wav aleg");
end
end
pos=pos+1
end
end
if exists==false then return end
end
AM
VK
AK
AK
I
I
AK