[asterisk-users] Lock extension from asterisk

Andres Jimenez gandresin at gmail.com
Fri Aug 17 07:45:26 CDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



2007/8/17, Gordon Henderson :

> Soooo.... (all untested!)
>
> exten => 8888,1,Answer()
> exten => 8888,n,Set(me=${CALLERID(num)})
> exten => 8888,n,Set(DB(${me}/locked)=1)
>
> exten => 9999,1,Answer()
> exten => 9999,n,Set(me=${CALLERID(num)})
> exten => 9999,n,VMAuthenticate(${me})
> exten => 9999,n,Set(DB(${me}/locked)=)
>
> (I think I swapped the 8888 and 9999 here, but I'm sure you can see that!)
>
> and in the dial-plan where call processing takes place:
>
> exten =>  s,1,Set(me=${CALLERID(num)})
> exten =>  s,n,Set(locked=${DB(${me}/locked)})
> exten =>  s,n,GotoIf(${locked}?:doneLockCheck)
>
> exten =>  s,n,Playback(sorry-cant-let-you-do-that)
> exten =>  s,n,Hangup()
> exten =>  s,n(doneLockCheck),Noop(We're not locked)


Works like a charm. Thanks very much.

- --
Andres Jimenez
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFGxZh98SZxpGYWwpYRAgpLAJ0cYJ3okceZZOirBirLB7/jZGgT6ACgjYpv
W3QsbPV53glyOdxaFVNnFrw=
=U7Ab
-----END PGP SIGNATURE-----



More information about the asterisk-users mailing list