Summary:ASTERISK-05519: [post 1.2] Background Passes Vars to parent context
Reporter:zamsler (zamsler)Labels:
Date Opened:2005-11-08 23:23:46.000-0600Date Closed:2011-06-07 14:10:10
Versions:Frequency of
Description:When I use Backgound followed by a read(Getting phone# from caller), Soon as the number in read it is passed to the parent context. Mine is from-internal, and the read number is dialed as an outgoing call. This does not happen when I use Playback.


macro privacy( inccidnum , inccidname ) {

       if(foo${inccidnum} = foo ) {
               NoOp(Caller entered: ${enterphone});
               switch(${enterphone}) {
               case 9999999999:
                       NoOp(Customer entered our phone number);
                       //Goto s|3;
                       NoOp(Customer entered a valid Phone number Of: ${enterphone});

       } else {
               NoOp(Caller had CID of: ${calleridnum})
Comments:By: Russell Bryant (russell) 2005-11-10 21:59:40.000-0600

This is actually expected behavior.  When a digit is pressed while the Background application is executing, the call will continue at the extension of the digit that was pressed.  At the same time, Playback doesn't pay attention to digits.

So really, there is no reason to use Background in AEL.  However, we do need to add an option to Background or Playback that allows the application to stop executing if a digit is pressed, but without changing to that extension.

I'm marking this for post-1.2 review.

By: zamsler (zamsler) 2005-11-12 09:40:23.000-0600

I agree with you, but my understanding is that background would keep in the same context until it is finished like playback does. The issue I see is that when the number is entered, it is passed to the parent context without completetion of the curent context/macro. ie soon as the number is entered, * dials it as an outgoing call and does not complete the macro I included above. I have reolved this issue by using read like it was intended. Just thought that this behavior is a security risk for people that can't RTFM. Thanks !

By: Russell Bryant (russell) 2005-11-21 22:09:12.000-0600

Since you can already specify a sound file with the Read application, I'm closing this out as a configuration error since my last note about needing a new feature isn't actually needed.