Michaƫl Gaudette
2005-Dec-14 10:20 UTC
[Asterisk-Users] Background() followed by Read - something wrong?
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
Luki
2005-Dec-14 12:30 UTC
[Asterisk-Users] Background() followed by Read - something wrong?
> 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)That's not the right approach. Do something like his: [confirmcall] exten => s,1,Background(blablabla) exten => 1,1,Goto(accept_call_context,s,1) exten => t,1,Hangup exten => i,1,Hangup