Something inbetween background() and playback()

hi guys i need to create a section in the ivr that does exactly what:

playback(0)
read(1)

would do but is interuptable like background()…

the reason is i dont like backgruond because it goes to the extension pressed, i want to process (add digits to it) the extension pressed but give the customer the ability to interupt the played emssage…

Hi, I found ExternalIVR application very useful to create more complicated IVRs scenarios.
More info can be found here.

i cant find any examples, all i find are docos on it.

Phew, I thought I was the only one who made up call-plans like this! Yeah, what you have to do is no use background OR playback at all but just “Read”

From this page at voip-info.org:

As of Asterisk 1.0:
 Read(variable[|filename][|maxdigits][|option])
As of Asterisk 1.2:
 Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])
As of Asterisk 1.4:
 Read(variable[,filename][,maxdigits][,option][,attempts][,timeout]) 

So here you see that the read() command does the playback for you! :smile:

Try something like:

exten => _X.,n,Read(var,ext-or-zero,4,,3,5)

This will playback the file “ext-or-zero” and allows for 5 seconds after the playback to enter in whatever you need to enter in. That it stores the entered DTMF as “var”

Hope this helps!

pretty neat except that “read” stops as soon as you press a DTMF key. but I guess that’s actually what most folks want.

Yeah, when I decide to push a key, I’m probably at the point where I have heard all the options I need :smile: