royce3 at gmail.com Guest
|
Posted: Fri May 06, 2022 10:40 am Post subject: [Freeswitch-users] uuid_broadcast hang and start after the c |
|
|
I would also like to know why FreeSWITCH does this. I'd really like to execute a uuid_broadcast while a lua script is running in the dialplan.
The reason for this is I have implemented an alternate dialplan in lua. I want the caller to hear audio while I'm waiting for an agent to become available. After a certain amount of time passes, I want to do different things based on certain conditions. FreeSWITCH's xml dialplan forces you to make all your decisions as soon as the call enters the dialplan which doesn't work in my scenario. In order to make decisions later during the call, I need the lua script to remain in control, sleeping until it's time to make the decision, but that causes problems with uuid_broadcast.
FYI, my workaround so far has been to re-execute my script using luarun and have the "dialplan" instance of the script loop on session:sleep(), but this might to be causing an issue with session:recordFile() which is why I'm posting here.
Royce Mitchell, IT Consultant
ITAS Solutions
royce3@itas-solutions.com (royce3@itas-solutions.com)
There are three hard problems in computer science: naming things, and off-by-one errors.
On Tue, Jun 1, 2021 at 2:14 PM Dmitry Mordovin <d.mordovin@crestwavetech.ru (d.mordovin@crestwavetech.ru)> wrote:
Quote: | Hello
I have LUA script which start a call (new session generated)
Code here
new_session = freeswitch.Session(destination);
if (new_session:ready()) then
new_session_disp = new_session:getVariable("endpoint_disposition");
while(new_session:ready() and new_session_disp ~= "ANSWER") do
<------>new_session_disp = new_session:getVariable("endpoint_disposition");
end
api = freeswitch.API();
api:executeString("bgapi uuid_park " .. tostring(new_session.uuid));
end
On answer event I park the call and script finished.
I see single active call. Listing below.
freeswitch@freeswitch43> show calls
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,presence_id,presence_data,accountcode,callstate,callee_name,callee_num,callee_direction,call_uuid,hostname,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_presence_id,b_presence_data,b_accountcode,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_sent_callee_name,b_sent_callee_num,call_created_epoch
3aa3a274-c23d-11eb-9150-e74dc4cdb20a,outbound,2021-05-31 18:22:59,1622485379,sofia/external/1000,CS_PARK,,0000000000,,1000,,,,ACTIVE,Outbound Call,1000,,3aa3a274-c23d-11eb-9150-e74dc4cdb20a,freeswitch43,,,,,,,,,,,,,,,,,,,,,,
1 total.
After all I execute command from cli:
Command looks like:
uuid_broadcast 3aa3a274-c23d-11eb-9a50-e74dc4cdb20a lua::’next-script.lua' both
In logs I see, command was sent to FS success, but not executed!
Moveover, after call hangup, FS start execution of command but can’t coz call in terminate state.
2021-05-31 18:23:30.312133 [NOTICE] sofia.c:1079 Hangup sofia/external/1000 [CS_PARK] [NORMAL_CLEARING]
2021-05-31 18:23:30.312133 [DEBUG] switch_ivr.c:625 sofia/external/1000 Command Execute lua(next-script.lua)
2021-05-31 18:23:30.312133 [DEBUG] switch_core_session.c:2668 sofia/external/1000 ZOMBIE EXEC lua(next-script.lua)
EXECUTE sofia/external/1000 lua(next-script.lua)
What/why is ZOMBIE EXEC ?
Could someone help me to find reason of strange behavior FS?
Looks like the uuid_broadcast command stay in queueu and wait something… and start after call has hangup.
_________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com
Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
|