Alejandro Mejía
2007-Apr-09 14:20 UTC
[asterisk-users] Play audio and continue to next priority before audio ends...
Hello list members. I would like to know how to playback an audio file to the caller, and while it's played asterisk to continue executing the next priorities on extensions.conf That's not the case when using "playback" command, because the next priority is executed until the audio file ends playing. I want to evaluate some variables while caller hears the audio file. Any ideas? Thanks in advance, Alejandro -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070409/c3de1d66/attachment.htm
Steve Edwards
2007-Apr-09 15:08 UTC
[asterisk-users] Play audio and continue to next priority before audio ends...
On Mon, 9 Apr 2007, Alejandro Mejía wrote:> I would like to know how to playback an audio file to the caller, and while > it's played asterisk to continue executing the next priorities on > extensions.conf > That's not the case when using "playback" command, because the next priority > is executed until the audio file ends playing. I want to evaluate some > variables while caller hears the audio file.I solved this in my application (adult chat billed to a credit card) by writing an AGI that created a thread to play the audio ("Please wait while your card is being verified") while the AGI mainline queried the credit card processor. Most of the time I get the cc response before the audio finishes so the authorization appears to be instantaneous. The "key" was that the mainline cannot interact with Asterisk (i.e. "verbose" while the audio thread is executing. Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Tony Mountifield
2007-Apr-11 04:47 UTC
[asterisk-users] Re: Play audio and continue to next priority before audio ends...
Alejandro Mejía <noc@carmeltelecom.com> wrote:> > I would like to know how to playback an audio file to the caller, and while > it's played asterisk to continue executing the next priorities on > extensions.conf > That's not the case when using "playback" command, because the next priority > is executed until the audio file ends playing. I want to evaluate some > variables while caller hears the audio file. > > Any ideas?Look at the Background() application. It does just what you are asking for. I'm surprised no-one else has mentioned this. Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org
Thomas Winter
2007-Apr-11 11:28 UTC
[asterisk-users] Play audio and continue to next priority before audio ends...
Am Monday 09 April 2007 23:20 schrieb Alejandro Mej?a:> Hello list members. > > I would like to know how to playback an audio file to the caller, and while > it's played asterisk to continue executing the next priorities on > extensions.conf > That's not the case when using "playback" command, because the next > priority is executed until the audio file ends playing. I want to evaluate > some variables while caller hears the audio file. > > Any ideas?Use StartMusicOnHold() and StopMusicOnHold() If use use MoH type=files MoH play from start of file, so ist similar to Playback