[asterisk-users] Lock extension from asterisk
Andres Jimenez
gandresin at gmail.com
Fri Aug 17 14:33:07 CDT 2007
2007/8/17, Andres Paglayan <andres at paglayan.com>:
> Guys, very nice dialplan programming,
> as a user's opinion, the two extension approach might be better.
> so the user doesn't need to remember whether the phone is locked or not,
> and accidentally lock it when the contrary was meant,
> (unless you send some sip text to the phone display)
In the latest version (see below) I added some playback that will say
if the phone is lock or unlock, before and after locking/unlocking it.
;Locking system
;LOCK
exten => 8888,1,Answer()
exten => 8888,n,Set(me=${CALLERID(num)})
exten => 8888,n,GotoIf(${DB(${me}/locked)}?8888,101:8888,201)
exten => 8888,101,Playback(security)
exten => 8888,n,Playback(activated)
exten => 8888,n,VMAuthenticate(${me})
exten => 8888,n,Set(DB(${me}/locked)=)
exten => 8888,n,Playback(security)
exten => 8888,n,Playback(now)
exten => 8888,n,Playback(de-activated)
exten => 8888,n,Hangup()
exten => 8888,201,Playback(security)
exten => 8888,n,Playback(de-activated)
exten => 8888,n,VMAuthenticate(${me})
exten => 8888,n,Set(DB(${me}/locked)=1)
exten => 8888,n,Playback(security)
exten => 8888,n,Playback(now)
exten => 8888,n,Playback(activated)
exten => 8888,n,Hangup()
--
Andres Jimenez
GPG : http://www.andresin.com/gpg/gandresin@gmail.com.asc
More information about the asterisk-users
mailing list