Hello!

Right now res_agi application in run_agi() execution loop does run
ast_waitfor_nandfds forever, without checking for any scheduled events runned on
channel.

That includes playback of any sound (so you can't run playback of sound, that
would be interrupted a bit later, once your application gen finish required info
calculation); it should also affect playtones, and possible another places.

There no much work to get loop correct -- we should instead
  ms = -1;
do something like
  struct ast_sched_context *sched = ast_channel_sched(chan);
  ms = sched ? ast_sched_wait(chan->sched) : -1;

and right before
  if (c) {

need to analyse result of wait:
  if (sched) ast_sched_runq(sched);
  if (ms==0) retry = AGI_NANDFS_RETRY;


that's the only changes reqired to get correct background work with FastAGI().


-- 
Regards,
Anton Fedorov
Call2ru service
E-Mail: datacomp...@call2ru.com
Jabber: datacomp...@call2ru.com
Skype: datacompboy
ICQ: 272-35-262
Mobile: +7-913-925-7974 [SMS 24h, Call 05:00-19:00 MSKT (GMT+3)]


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to