[asterisk-users] Re: Play audio and continue to next priority before audio ends...

Steve Totaro stevetotaro at hotmail.com
Wed Apr 11 07:02:48 MST 2007


Gordon Henderson wrote:
> On Wed, 11 Apr 2007, Tony Mountifield wrote:
>
>> Alejandro Mejía <noc at 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.
>
> Are you sure it does that?
>
> I'm under the impression that it waits until the sound(s) have 
> finished playing before moving on to the next priority. (While 
> "listening" for digits to be pushed, then be dialled)
>
>   -= Info about application 'BackGround' =-
>
> [Synopsis]
> Play a file while awaiting extension
>
> [Description]
>   
> Background(filename1[&filename2...][|options[|langoverride][|context]]):
>
> This application will play the given list of files while waiting for 
> an extension to be dialed by the calling channel. To continue waiting 
> for digits after this application has finished playing files, the 
> WaitExten application should be used. The 'langoverride' option 
> explicity specifies which language to attempt to use for the requested 
> sound files. If a 'context' is specified, this is the dialplan context 
> that this application will use when exiting to a dialed extension.  If 
> one of the requested sound files does not exist, call processing will 
> be terminated.
>
>
> Gordon
>

You could break up the audio files you want to play into smaller bits 
and execute dialplan mojo in between the audio chunks.

Thanks,
Steve



More information about the asterisk-users mailing list