On Fri, Sep 02, 2011 at 11:14:57AM -0400, Brandon Phelps wrote: > We would like to change our dialplan a bit so that after a user dials a > number (any number, including domestic, international, internal) Asterisk > firsts prompts the user for a PIN before actually allowing the call to go > through. > > I know I could setup an IVR that would accomplish this but I'd prefer not > to have the users first call an internal extension before they dial out. I > want them to be able to dial the destination number directly, have asterisk > intercept and prompt for password, then either allow the call or play a > .gsm file and hangup if the PIN is incorrect. > > We are using AELs, and not the exten,x,x format.
Never used AEL myself but with the old format it should not be very hard: exten => _X.,n,Set(CDR(accountcode)=) exten => _X.,n,Authenticate(something,a) exten => _X.,n,GotoIf($["${CDR(accountcode)}" > ""]?dial:fail) exten => _X.,n(dial),Dial(SIP/${EXTEN}@trunk) exten => _X.,n,Hangup() exten => _X.,n(fail),Playback(notauthorized) exten => _X.,n,Congestion() Add prompts and maybe Answer where needed. -- Daniel Tryba -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users