Hello Guys,
I receive a call from side A and send it out to side B.
I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999">
<action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/>
<action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/>
<action application="hangup" data="NORMAL_CLEARING"/>
</extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout");
session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
--
DVG