Hi Jason,

Try to use NoOp, You can use it as printf or echo for the console but set
the verbose level to 3 or higher. So that you will be able to check the
value of the ${EXTEN}.  You can also add GotoIf to add condition statements.

[macro-acceptcall]
exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,Background(makechoice)  ;make a choice, press 1 or 2
exten => s,4,WaitExten(3)
exten => s,5,NoOp(${EXTEN})
exten => s,6,GotoIf($["${EXTEN}" = "1"]?youchose1|1|1:youchose2|1|1)

[youchose1]
exten => 1,1,Background(youchose1)

[youchose2]
exten => 1,1,Background(youchose2)

Hope that helps.

Best Regards,
Joanna Liza Mariazeta
www.mariazeta.com

On 2/15/07, Jason Wolfe <[EMAIL PROTECTED]> wrote:

Hello,

I have the following simple application...


1. Call is answered, and Dial() function is used with a macro to dial
out to a number.
2. 'Called' party answers the phone, and hears a message (this is a
function of the macro)

At this point I'd like for the 'Called' Party to be able to make a
decision and press 1 or 2 to hear some additional information before
accepting the call.

The problem is that any key pressed causes the call to be bridged.

Is this the only behavior, or can someone help me with an example of a
script that will allow the 'Called' party to do some things before the
call is bridged.

I have included my macro code below
**************************************************************

[macro-acceptcall]
exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,Background(makechoice)  ;make a choice, press 1 or 2
exten => s,4,WaitExten(3)
exten => s,5,Goto(s,3)


exten => 1,1,Background(youchose1)

exten => 2,1,Background(youchose2)

***************************************************************

This is what I want to happen, but it just bridges the call immediately
without playing the respective messages. Thanks for the help.


Thanks!

J


_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to