[Freeswitch-users] ESL Ruby - sched_api / task id issue
Hector Geraldino
Hector.Geraldino at ip-soft.net
Thu Oct 13 20:35:38 MSD 2011
Hi,
I don't know if that's the intended behavior or not, but I can cancel a scheduled task by calling sched_del and passing the uuid as a parameter (no task_id whatsoever)
e.g.
Schedule a hangup:
"sched_hangup +10 " + uuid;
Cancel scheduled hangup:
sched_del uuid
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Claudio Álvarez
Sent: Thursday, October 13, 2011 11:03 AM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] ESL Ruby - sched_api / task id issue
Hi all,
I'm currently experimenting with sched_api to schedule a ringback sound from a Ruby script. My code looks like this:
ringback_result = con.bgapi('sched_api +8 none uuid_broadcast ' + leg1_uuid + ' /var/www/mi/audio/ringback.mp3 aleg')
puts "Serialized result:"
puts ringback_result.serialize()
When I run the script, my output looks like:
Serialized result:
Event-Name: SOCKET_DATA
Content-Type: command/reply
Reply-Text: %2BOK%20Job-UUID%3A%20cec047cc-97d7-4320-811a-e15e454843f9
Job-UUID: cec047cc-97d7-4320-811a-e15e454843f9
The problem here is that I'm not getting the scheduled task ID returned by sched_api I expect. I need the task ID so as to run sched_del should I need to abort the task. Trying the same api_sched command on fs_cli I get an output confirming that the task has been added, together with the assigned task ID.
sched_api +8 none uuid_broadcast 41b482a9-8595-47d4-a3fd-3c6a0d32e942 /var/www/mi/audio/ringback.mp3 aleg
+OK Added: 34
Can anyone help me out with this one?
Thanks!
--
Claudio Álvarez, Ph.D.
Arquitecto de Sistemas / Systems Architect
Medularis S.p.A. - ClickFono
Tel: 56 2 934 40 74
Cel: 56 9 9079 4951
claudio at clickfono.com<mailto:claudio at clickfono.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111013/dc1aeefb/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list