[Freeswitch-users] ESL Ruby - sched_api / task id issue
Hector.Geraldino at ip-soft.net
Thu Oct 13 20:35:38 MSD 2011
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)
Schedule a hangup:
"sched_hangup +10 " + uuid;
Cancel scheduled hangup:
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
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:"
When I run the script, my output looks like:
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?
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...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users