[Freeswitch-users] ESL: Which event is generated when an api command completed?
Grant Bagdasarian
GB at cm.nl
Mon Nov 10 13:47:25 MSK 2014
Is there a way to pass a UUID (Event-UUID) for the application being executed by uuid_broadcast using the format: “uuid_broadcast <uuid> app[![hangup_cause]]::args [aleg|bleg|both]”
uuid_broadcast a69b7fc0-68c5-11e4-937f-4fc1451152d2 playback::/usr/src/freeswitch/sounds/prompts/welcome.wav both
I’m not sure how to format the “args” when executing playback or any other dialplan application.
The Wiki page for playback allows the playback data to contain variables enclosed in curly braces.https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_playback
But then I need to listen for PLAYBACK_STOP, which won’t be a problem, but a while back I read on the mailinglist not to use PLAYBACK_START or STOP because it wasn’t reliable?
I’m using version 1.2.13. Not sure to which version that applied.
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Steven Ayre
Sent: Wednesday, November 5, 2014 10:49 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] ESL: Which event is generated when an api command completed?
For bgapi it's https://wiki.freeswitch.org/wiki/Event_list#BACKGROUND_JOB
On 5 November 2014 09:43, Grant Bagdasarian <GB at cm.nl<mailto:GB at cm.nl>> wrote:
Hello,
When using Outbound ESL in async full mode and executing a API command like uuid_transfer or uuid_bridge using bgapi, which channel event is generated to notify the command execution completed?
For dialplan applications it is the CHANNEL_EXECUTE_COMPLETED event. That I know.
All I got is this:
Command Executed: uuid_transfer 563c9750-64cc-11e4-8cd8-4fc1451152d2 -both park_extension XML park_ext
Bgapi returned an ESLevent:
{
"Event-Name": "SOCKET_DATA",
"Content-Type": "command/reply",
"Reply-Text": "+OK Job-UUID: ede6c869-0bfa-4e07-8490-04973b6ba971",
"Job-UUID": "ede6c869-0bfa-4e07-8490-04973b6ba971"
}
However, a channel event named SOCKET_DATA did not show up when listening for channel events using the RecvEvent method.
What I’m trying to do is use bgapi or sendMSG to execute an application/command, and use the RecvEvent method to wait for a channel event that indicates the application/command completed execution.
So if I were to use the playback application, I’d send it using the SendMSG method, and use RecvEvent to wait for the CHANNEL_EXECUTE_COMPLETED event containing the UUID set for this playback.
This works fine for dialplan applications but I don’t know which event to listen for when using api commands.
I hope someone could point me into the right direction.
Regards,
Grant
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.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
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141110/77013654/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list