[asterisk-users] Lock extension from asterisk

Andres Paglayan andres at paglayan.com
Fri Aug 17 11:50:31 CDT 2007


On Aug 17, 2007, at 6:52 AM, Doug Lytle wrote:

> 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()
>

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)


> Doug
>
> --  
>
> Ben Franklin quote:
>
> "Those who would give up Essential Liberty to purchase a little  
> Temporary Safety, deserve neither Liberty nor Safety."
>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

Andres Paglayan

--"Harmony is more important than being right"
Bapak







More information about the asterisk-users mailing list