[asterisk-users] Lock extension from asterisk
-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. ) and Asterisk will drop any call until another special extension (i.e. ) 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- ___ --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
Re: [asterisk-users] Lock extension from asterisk
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. ) and Asterisk will drop any call until another special extension (i.e. ) 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. S (all untested!) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=) (I think I swapped the and 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 ___ --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
Re: [asterisk-users] Lock extension from asterisk
Gordon Henderson wrote: On Fri, 17 Aug 2007, Andres Jimenez wrote: exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,VMAuthenticate(${me}) exten = ,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. ___ --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
Re: [asterisk-users] Lock extension from asterisk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2007/8/17, Gordon Henderson : S (all untested!) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=) (I think I swapped the and 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- ___ --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
Re: [asterisk-users] Lock extension from asterisk
On Fri, 17 Aug 2007, Doug Lytle wrote: Gordon Henderson wrote: On Fri, 17 Aug 2007, Andres Jimenez wrote: exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,VMAuthenticate(${me}) exten = ,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() XOR in dialplan :) 9 lines of code vs. my 7 (which include a validation) though ;-) Dialplan obscurification contest, anyone? (joking - it's weird enough as it is!!!) One thing I noted recently is that phones sometimes do weird things with *'s and #'s )-: The Siemens C460IP DECT phones in particular won't let you dial a number that has a * in it at any position other than the 1st digit - I guess this is because the phone uses it to switch from the default interface to the other one (PSTN vs. VoIP) Gordon ___ --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
Re: [asterisk-users] Lock extension from asterisk
Gordon Henderson wrote: On Fri, 17 Aug 2007, Doug Lytle wrote: XOR in dialplan :) 9 lines of code vs. my 7 (which include a validation) though ;-) Ooops! Missed that line. One thing I noted recently is that phones sometimes do weird things with *'s and #'s )-: The Siemens C460IP DECT phones in particular won't let you Yeah, Polycom's use the # internally as well. 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
Re: [asterisk-users] Lock extension from asterisk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks to Gordon Doug I have now a very good locking system using one only extension. Extension informs you about the current lock situation and, if authentacated, it changes it and explain the change done. ;Locking system ;LOCK exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,GotoIf(${DB(${me}/locked)}?,101:,201) exten = ,101,Playback(security) exten = ,n,Playback(activated) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=) exten = ,n,Playback(security) exten = ,n,Playback(now) exten = ,n,Playback(de-activated) exten = ,n,Hangup() exten = ,201,Playback(security) exten = ,n,Playback(de-activated) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,n,Playback(security) exten = ,n,Playback(now) exten = ,n,Playback(activated) exten = ,n,Hangup() Thanks again, guys - -- Andres Jimenez -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGxasI8SZxpGYWwpYRAsMZAJwPb/fRAH5IMB4muBtzH1QIPfMFlgCeI2iu UZH/bs38f1iqiZ/CNWvoTsk= =Fsal -END PGP SIGNATURE- ___ --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
Re: [asterisk-users] Lock extension from asterisk
On Aug 17, 2007, at 6:52 AM, Doug Lytle wrote: Gordon Henderson wrote: On Fri, 17 Aug 2007, Andres Jimenez wrote: exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,VMAuthenticate(${me}) exten = ,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 ___ --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
Re: [asterisk-users] Lock extension from asterisk
On Fri, 17 Aug 2007, Andres Paglayan wrote: 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) I've experimented with sending text to a phone display... it's a bit hit miss... and of-course not all phone have textual displays, and some require you to hit a key to display the text. I experimented with it in speed-dial programming - trying to echo te number back to the display. Worked a treat on GXP2000's (untile you got more than one message), but on the Snom 300 it just seemed fiddly to get the message on the display. Gordon ___ --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
Re: [asterisk-users] Lock extension from asterisk
2007/8/17, Andres Paglayan [EMAIL PROTECTED]: 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 = ,1,Answer() exten = ,n,Set(me=${CALLERID(num)}) exten = ,n,GotoIf(${DB(${me}/locked)}?,101:,201) exten = ,101,Playback(security) exten = ,n,Playback(activated) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=) exten = ,n,Playback(security) exten = ,n,Playback(now) exten = ,n,Playback(de-activated) exten = ,n,Hangup() exten = ,201,Playback(security) exten = ,n,Playback(de-activated) exten = ,n,VMAuthenticate(${me}) exten = ,n,Set(DB(${me}/locked)=1) exten = ,n,Playback(security) exten = ,n,Playback(now) exten = ,n,Playback(activated) exten = ,n,Hangup() -- Andres Jimenez GPG : http://www.andresin.com/gpg/[EMAIL PROTECTED] ___ --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
Re: [asterisk-users] Lock extension from asterisk
Andres Jimenez wrote: 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. Just a note, You will want to make sure that (911/999) calls are handled properly when the phone is locked down. 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
Re: [asterisk-users] Lock extension from asterisk
-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/[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGxgMD8SZxpGYWwpYRAvXHAJ9ZsPF6wzEaEn6y/VDfgxvuJdmXkgCfYxrz ZEEXnAqeELULlSqJxqmdaJw= =NvEA -END PGP SIGNATURE- ___ --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
Re: [Asterisk-Users] Lock Extension
Hi Robert, Do you have the sample script for locking the extension? Thanks, Stephen Robert Goodyear wrote: On Aug 18, 2005, at 3:07 AM, Stephen wrote: Hi All, How can I lock the extension in Asterisk? For example , my extension is 1000 and I am away for business trip. I want to lock my extension during my absence. Can it be done in Asterisk? regards, Stephen You could write a little script to mangle/unmangle your SIP context and then SIP RELOAD. You could assign it to a context called 'disabled' whose only valid extension matching therein is to that same macro to authenticate and change your context back. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Lock Extension
On Aug 18, 2005, at 3:07 AM, Stephen wrote: Hi All, How can I lock the extension in Asterisk? For example , my extension is 1000 and I am away for business trip. I want to lock my extension during my absence. Can it be done in Asterisk? regards, Stephen You could write a little script to mangle/unmangle your SIP context and then SIP RELOAD. You could assign it to a context called 'disabled' whose only valid extension matching therein is to that same macro to authenticate and change your context back. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Lock Extension
Hi All, How can I lock the extension in Asterisk? For example , my extension is 1000 and I am away for business trip. I want to lock my extension during my absence. Can it be done in Asterisk? regards, Stephen ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users