-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all I am working in a new set up with Grandstream GXP-2000 handsets. I like those phone, but they lack a feature I need: the phone cannot be locked by the user. What I actually want is a user to be able to avoid someone else making calls from his phone without giving him access to SIP configuration access to the phone. i.e. let say I want user 132 (that uses extension 132 in our system) to be able to lock his phone (located in a publicly accessible office). Could he dial an special extension (i.e. 9999) and Asterisk will drop any call until another special extension (i.e. 8888) is dialed? Suggestions? - -- Andres Jimenez -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGxX6A8SZxpGYWwpYRAtojAJ4yKE77nv9rpkoXXr1i4SOiLPb7JACgug+7 64yg8fCDRdnmeZFmmpGynwQ=eCWP -----END PGP SIGNATURE-----
On Fri, 17 Aug 2007, Andres Jimenez wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all > > I am working in a new set up with Grandstream GXP-2000 handsets. I > like those phone, but they lack a feature I need: the phone cannot be > locked by the user. > > What I actually want is a user to be able to avoid someone else making > calls from his phone without giving him access to SIP configuration > access to the phone. > > i.e. let say I want user 132 (that uses extension 132 in our system) > to be able to lock his phone (located in a publicly accessible > office).The easy answer is: Yes...> Could he dial an special extension (i.e. 9999) and Asterisk will drop > any call until another special extension (i.e. 8888) is dialed? > > Suggestions?It all depends on how your dialplan works. If you have one macro that controls calls from extensions to other extensions, or outside lines, then you can implement 2 numbers to set/clear a "flag" in the astdb, then in the bits where to call other extensions, (or outside lines) call a macro that tests for the flag being set... You can use the extensions voicemail PIN to validate the unlocking too for futher security. 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) Gordon
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."
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 2007/8/17, Doug Lytle :> Just a note, > > You will want to make sure that (911/999) calls are handled properly > when the phone is locked down. >Good point. - -- Andres Jimenez GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGxgMD8SZxpGYWwpYRAvXHAJ9ZsPF6wzEaEn6y/VDfgxvuJdmXkgCfYxrz ZEEXnAqeELULlSqJxqmdaJw=NvEA -----END PGP SIGNATURE-----