AGI generated prompts and Background application

Hi,

I am using Asterisk 11 and the googletts.agi script to generate my dynamic voice prompts. I would like users to be able to interrupt the prompt if they already know which key to press without having to sit through the whole thing before making a choice.

The googletts.agi comes with an interrupt option, some or any keys (depending on how you call the script) will stop playback and go to the next step in the dialplan.

I was wondering how I could interface this with Background()? I would like to be able to specify the context so Background() seems to be the only option. But I was unsuccessful calling an AGI script from within the Background() application.

Is Background the only option? I’m having a hard time understanding how I can let callers “press 1” more than one time in the whole IVR system without using different contexts every time.

welcome-prompt
caller chose option 1
go to option 1
play prompt2
caller chose option 1 again
go to prompt3

But with WaitExten there can only be one extension 1 so the second time the caller choses option 1 the dialplan will be looping. Am I missing something?

Thanks, and happy new year!

Don’t use AGI!

So how can I use Google TTS to render my dynamic prompts without AGI?

Ok it seems I was misusing priority labels. I switched to a more logical dialplan making use of different contexts and extensions within these contexts along with Goto(context,extension,priority) and it works much better.