[Asterisk-Users] Background() followed by Read - something wrong?

Michaël Gaudette michael.gaudette at virtutel.ca
Wed Dec 14 10:20:26 MST 2005


Hi,

I'm using Asterisk 1.2.1, and have been trying to sue the Background()
command followed by Read() (for a screening app, but that's beside the
point)

I did the following
s,1,Background(blablabla)
s,2,Read(VARIABLE||1) ; accepting only one digit (1 to accept call, anything
else to hangup)
...

My problem is that when using Background, the following happens:
1) When I wait until the file has finished playing, the VARIABLE is read
according to input. Good!
2) If I press a key while the sound file is playing, it seems not to go into
the VARIABLE as its value, but go to the extension pressed. NOT good.

What I want to do is simply play a file but accept a Read() value while the
file is playing.  What am I missing?

Mike




More information about the asterisk-users mailing list