[Asterisk-Users] Extensions.conf?

Leif Madsen leif.madsen at gmail.com
Mon Oct 11 11:37:00 MST 2004


On Mon, 11 Oct 2004 13:57:10 -0400, Jeff Owen <owenj at surfree.net> wrote:
> If I want to have based on a caller id, 

Shouldn't filter on callerID since you can spoof it :)

> allow incoming calls to be prompted
> for a "pin" then allow the caller to call back out another available line to
> the number dialed after the "pin" was entered, how would I accomplish that
> in *? 

You could use the ${CALLERID} variable to filter on.  Perhaps with a
GotoIf statement.  Have it send to another context and then use the
Authorize application to authenticate the call.

> Basically I can't call long distance from work and want to call home, enter
> a pin and then call wherever I want. 

I just set that up as well the other day.  Here is what has worked for
me so far.  I'm sure there are far more elegant solutions, but it
works.  I'll tweak it as I go :)

[gateway]
; allow dialing out to the PSTN if the person authenticates
exten => s,1,Authenticate(123456789)
exten => s,2,Playback(pin-number-accepted)
exten => s,3,ResponseTimeout(60)
exten => s,4,Playback(this-call-may-be) ; This call may be recorded
because we're paranoid
exten => s,5,Playback(recorded)
exten => s,6,Playback(because-paranoid)
exten => s,7,Wait(1)
exten => s,8,Background(enter-phone-number10) ; Please enter your
ten-digit telephone
                                              ; number, area code first.
exten => _NXXNXXXXXX,1,Playback(pls-hold-while-try)
exten => _NXXNXXXXXX,2,NoOp("${DATETIME}:  Placing call to ${EXTEN}
via GATEWAY") ; CLI log message
exten => _NXXNXXXXXX,3,Dial(${LDTRUNK}/1${EXTEN},45)
exten => _NXXNXXXXXX,4,Hangup

exten => t,1,Playback(goodbye)
exten => t,2,Hangup

exten => i,1,Playback(invalid)
exten => i,2,Goto(gateway,s,8)

Thanks,
Leif Madsen.
http://www.asteriskdocs.org



More information about the asterisk-users mailing list