[Freeswitch-users] help with lua and callcenter

babak yakhchali babak.freeswitch at gmail.com
Mon Jun 4 21:54:41 MSD 2012


Hi
In the following lua function, I want to invoke VMX(another function) after
execution of callcenter is completed. but it seems when  agent answers the
call from callcenter, execution continues from the line after
"session:execute("callcenter","tehccq");", I mean it is not waiting till
the dialog between agent and member ends. Is it normal (or I'm doing
something wrong)? if it is normal is there anyway I can get this working
the way I need?
thanx

function DialCallCenter()
setLastState('CALLCENTER');
session:execute('answer');
current_call_add(customerId,callerNumber,firstname,lastname);
session:execute("callcenter","tehccq");
local agent_found = session:getVariable('cc_agent_found');
freeswitch.consoleLog("info","hellophone:cc agent"..(agent_found or ""));
if agent_found == nil or agent_found ~= 'true' then
VMX('no-answer-leave-a-message');
end
return true;
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120604/60c8a82d/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list