[asterisk-users] Lock extension from asterisk
Doug Lytle
support at drdos.info
Fri Aug 17 07:52:50 CDT 2007
Gordon Henderson wrote:
> On Fri, 17 Aug 2007, Andres Jimenez wrote:
>
> 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)=)
>
>
>
This is good, but it can be done with just 1 extension:
exten => 80*,1,Answer()
exten => 80*,2,Set(LOCKED=${DB(phonelocked/${CALLERID(number)})})
exten => 80*,3,GotoIf($["${LOCKED}" = "YES"]?80*,4:80*,101)
exten => 80*,4,Set(DB(phonelocked/${CALLERID(number)})=NO)
exten => 80*,5,Playback(de-activated)
exten => 80*,6,Hangup()
exten => 80*,101,Set(DB(phonelock/${CALLERID(number)})=YES)
exten => 80*,102,Playback(activated)
exten => 80*,103,Hangup()
Doug
--
Ben Franklin quote:
"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
More information about the asterisk-users
mailing list