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…
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!
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”