[Freeswitch-users] uuid_broadcast hang and start after the call hangup
Bote Man
botelist at gmail.com
Fri May 6 15:50:27 UTC 2022
As a rule, it is better to run your script outside of the dialplan to avoid blocking FreeSWITCH core from executing apps. Perhaps it would be better to have your script communicate with FS via ESL?
John Boteler
Bote Communications
From: FreeSWITCH-users <freeswitch-users-bounces at lists.freeswitch.org> On Behalf Of Royce Mitchell III
Sent: Friday, 6 May, 2022 11:23
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] uuid_broadcast hang and start after the call hangup
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 at itas-solutions.com <mailto:royce3 at 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 at crestwavetech.ru <mailto:d.mordovin at crestwavetech.ru> > wrote:
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 at 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 at freeswitch.com <mailto:sales at 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 at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20220506/9a8281eb/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list