|Summary:||ASTERISK-08184: Background() application over AGI doesn't return control until file is through playing|
|Reporter:||Jay Phillips (jicksta)||Labels:|
|Date Opened:||2006-11-25 03:56:26.000-0600||Date Closed:||2011-06-07 14:07:52|
|Description:||When executing Background() over an AGI script, the "200 result=x" response should be returned immediately, though presently it works no differently than Playback().|
Without a way to Background audio, AGI is severely limited in the sophistication of IVR menus and many other potential VoIP applications. I've also heard this issue being used publicly as a reason to not use AGI for VoIP applications.
|Comments:||By: Joshua C. Colp (jcolp) 2006-11-29 21:17:25.000-0600|
Background is not meant to be used in an asynchronous fashion as you seem to want it to. It's made to play a file, and wait for DTMF while matching it against the dialplan and it does it fine. There are other AGI specific commands that may help you. Doing 'show agi' in the Asterisk CLI reveals them - do any of those fit along the lines of what you need? or even what exactly do you need?
By: Anton Fedorov (datacompboy) 2006-11-29 23:04:03.000-0600
Look at http://bugs.digium.com/view.php?id=8163 i have provide link to maillist with corresponding AGI application that allows to start background (async) playback, and in comments there what to change in agi.c to make it happy with non-zaptel channels.
By: Jay Phillips (jicksta) 2006-12-01 23:41:09.000-0600
Great, thanks datacompboy.
When I get some time this weekend I'll implement that and report back here.
By: Donny Kavanagh (donnyk) 2006-12-07 17:22:57.000-0600
IVR's are not intended to be designed in this way, they are typically sync not async. You should be using the agi command 'STREAM FILE' and not calling background btw. If you really must do work and let the user hear audio while this happens, enable MOH, do your work and then disable when you are done.
By: Anton Fedorov (datacompboy) 2006-12-07 23:47:00.000-0600
2 juggie: in general, yes. but if you want to say "Please wait, while we try to dial" and run MOH after, WHY user should hear WHOLE phrase, if dialout finished after "please wait, while" ?
By: Tilghman Lesher (tilghman) 2007-01-16 17:18:04.000-0600
This is clearly a misunderstanding of what the Background application does, and is therefore not a bug.