Re: [Asterisk-Users] Re: phone line "roaming"
Benjamin on Asterisk Mailing Lists wrote: On Wed, 15 Sep 2004 14:15:24 +0200, Pavel Jezek <[EMAIL PROTECTED]> wrote: thanks for idea, but this is not exactly what I need, It wasn't supposed to be *exactly* what you need ;-) That's not what a mailing list is about. We can give each other clues and ideas for how things can be done *in principle*, elaboration and implementation is up to whoever wants the feature requested. assume: one employee working in office (open-space "cubes"), when this employee leave the work, on the same place come another employee so that, I can't ring both lines and can't use bluetooth device :( I thing to do some "login" to phone & asterisk and "download" appropriate extension/phone line according to e.g. username/login id, Yes, that's a good thought to elaborate on. but how to configure/implement? The easiest way in terms of both implementation and use is probably to use the dialplan and some extensions to trigger the login/logoff For example, you could use *21 and *22 as a prefix to login and logoff, then use DBput/DBget and the built in database to determine the state of a virtual extension. *212000 would tell Asterisk that extension 2000 is now on the device from which this was dialled. *222000 would tell Asterisk to cancel the previous state. You'd maintain a database entry for each virtual extension (or user depending on your) which would be your key. Then when somebody dials *21 for that virtual extension, you check the phone it was coming from and that is going to be your value for this key. something along the lines of ... exten => _*21,1,DBput(VIRTUAL${EXTEN:3}/physical={CALLERIDNUM}) but ideally you'd want to use something other than CALLERIDNUM to identify the physical device. All you have to do then is check for each incoming call whether there is a value stored in the key for the virtual extension in question and if there is send the call to the phone associated with that value. Once you've got this basic functionality working, You can make it more fancy with such things as PIN numbers, automatic cancelling of a value if the user signs in again on another phone, timeouts taking into account office hours etc etc etc. And if you have done all this, don't forget to share and post the code on the Wiki ;-) rgds benjk benjk, pavel, I have had something similar to this i made long ago. There are a couple downfalls, as MWI doesn't work, but all in all, it works great. http://www.indigent-networks.com/asterisk/roaming.txt Also note, this is just an EXAMPLE. I claim no usability for it, even though it does work ;) -twisted ___ Asterisk-Users mailing list [EMAIL PROTECTED] 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] Re: phone line "roaming"
On Wed, 2004-09-15 at 22:37, Senad Jordanovic wrote: > >> > >> make a simple web interface.. where user logs in.. > >> interface tells a script on * server about users > >> location/extension/device. then your script will re-create TFTP > >> files, sends > >> reboot to 7940/7792 and you are done... > > > > Seems like overkill when you can just use the agent support in > > asterisk. > > yes, of course if these users are to "belong" to a queue... > what if they are NOT...? > > > another way to do it will be: > configure an AA, ask users to enter their PIN, and then send system call > to re-configure the phones. There is a much simpler solution, which I hacked together briefly, and then discarded because I didn't really need it (and there were some discrepancies in the zap driver that I didn't have time to track down). Anyway, for your purposes, this is really quite simple. extensions.conf: [macro-stdexten] exten => s,1,DBget(dnd=DND/${ARG1}) exten => s,2,Goto(s|20) exten => s,102,Goto(s|3) exten => s,3,DBget(chan=extensions/${ARG1}) ; extension could not be found, drop to voicemail exten => s,104,Voicemail(u${ARG1}) exten => s,4,Dial,${chan}|20|rtT exten => s,5,AbsoluteTimeout(90) exten => s,6,Voicemail(u${ARG1}) exten => s,7,Hangup exten => s,105,AbsoluteTimeout(90) exten => s,106,Voicemail(b${ARG1}) exten => s,107,Hangup ; DND is on, so go to voicemail and hangup exten => s,20,AbsoluteTimeout(90) exten => s,21,Voicemail(u${ARG1}) exten => s,22,Hangup So, take the extension they want to dial, look in the astdb for the entry extensions/${EXT} and then dial using that value. This way, I can (manually) update the database to decide where an extension points to. It is a simple matter to add some dialplan extension for login/logout, basically I was using an AGI which did this: Request extension number Request password Check extension/password in voicemail.conf, if no match, repeat If match, delete (or add) the astdb value for the current channel and the provided extension. If this is a hot-desk type situation, then each time a user sits down/leaves, they need to login/out. If it is just an occassional thing, where sometimes a person moves office, then you could just do it manually like I do... For those that are interested, I was also trying to create DB flags based on the channel name which would show that 'this' channel is permitted to make outgoing calls. Then my outgoing calls macro would check the variable before placing the call. This didn't work because sometimes the CHANNEL variable would be Zap/126-1 and sometimes it would be ZAP/126-1, and there didn't seem to be any pattern to this. Like I said, I might be wrong, things might have changed since then, etc, I never had a chance to really look into it, I just removed it. I was intending on extending this to regularly call the extension and request their password, if it wasn't supplied, then I would remove their dialout privilege. (Check once per hour, if wrong password, or no answer, or whatever, then retry each 5 minutes for 3 attempts). Or something, I never got that far in the implementation, it might be too much hassle/nuisance for people to keep calling them. Thinking now, perhaps a timeout, no dialout for more than one hour => confirmation call. Regards, Adam ___ Asterisk-Users mailing list [EMAIL PROTECTED] 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] Re: phone line "roaming"
On Wed, 15 Sep 2004 14:15:24 +0200, Pavel Jezek <[EMAIL PROTECTED]> wrote: > thanks for idea, but this is not exactly what I need, It wasn't supposed to be *exactly* what you need ;-) That's not what a mailing list is about. We can give each other clues and ideas for how things can be done *in principle*, elaboration and implementation is up to whoever wants the feature requested. > assume: one employee working in office (open-space "cubes"), > when this employee leave the work, on the same place come another employee > so that, I can't ring both lines and can't use bluetooth device :( > > I thing to do some "login" to phone & asterisk and "download" appropriate > extension/phone line > according to e.g. username/login id, Yes, that's a good thought to elaborate on. > but how to configure/implement? The easiest way in terms of both implementation and use is probably to use the dialplan and some extensions to trigger the login/logoff For example, you could use *21 and *22 as a prefix to login and logoff, then use DBput/DBget and the built in database to determine the state of a virtual extension. *212000 would tell Asterisk that extension 2000 is now on the device from which this was dialled. *222000 would tell Asterisk to cancel the previous state. You'd maintain a database entry for each virtual extension (or user depending on your) which would be your key. Then when somebody dials *21 for that virtual extension, you check the phone it was coming from and that is going to be your value for this key. something along the lines of ... exten => _*21,1,DBput(VIRTUAL${EXTEN:3}/physical={CALLERIDNUM}) but ideally you'd want to use something other than CALLERIDNUM to identify the physical device. All you have to do then is check for each incoming call whether there is a value stored in the key for the virtual extension in question and if there is send the call to the phone associated with that value. Once you've got this basic functionality working, You can make it more fancy with such things as PIN numbers, automatic cancelling of a value if the user signs in again on another phone, timeouts taking into account office hours etc etc etc. And if you have done all this, don't forget to share and post the code on the Wiki ;-) rgds benjk -- Sunrise Telephone Systems, 9F Shibuya Daikyo Bldg., 1-13-5 Shibuya, Tokyo, Japan. NB: Spam filters in place. Messages unrelated to the * mailing lists may get trashed. ___ Asterisk-Users mailing list [EMAIL PROTECTED] 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] Re: phone line "roaming"
>> >> make a simple web interface.. where user logs in.. >> interface tells a script on * server about users >> location/extension/device. then your script will re-create TFTP >> files, sends >> reboot to 7940/7792 and you are done... > > Seems like overkill when you can just use the agent support in > asterisk. yes, of course if these users are to "belong" to a queue... what if they are NOT...? another way to do it will be: configure an AA, ask users to enter their PIN, and then send system call to re-configure the phones. ta SJ ___ Asterisk-Users mailing list [EMAIL PROTECTED] 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] Re: phone line "roaming"
Senad Jordanovic wrote: [EMAIL PROTECTED] wrote: thanks for idea, but this is not exactly what I need, assume: one employee working in office (open-space "cubes"), when this employee leave the work, on the same place come another employee so that, I can't ring both lines and can't use bluetooth device :( I thing to do some "login" to phone & asterisk and "download" appropriate extension/phone line according to e.g. username/login id, but how to configure/implement? (we use cisco7940 & 7912) make a simple web interface.. where user logs in.. interface tells a script on * server about users location/extension/device. then your script will re-create TFTP files, sends reboot to 7940/7792 and you are done... Seems like overkill when you can just use the agent support in asterisk. -- Jon Stockill [EMAIL PROTECTED] ___ Asterisk-Users mailing list [EMAIL PROTECTED] 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] Re: phone line "roaming"
[EMAIL PROTECTED] wrote: > thanks for idea, but this is not exactly what I need, assume: > one employee working in office (open-space "cubes"), when this > employee leave the work, on the same place come another employee so > that, I can't ring both lines and can't use bluetooth device :( > > I thing to do some "login" to phone & asterisk and "download" > appropriate extension/phone line > according to e.g. username/login id, but how to configure/implement? > (we use cisco7940 & 7912) make a simple web interface.. where user logs in.. interface tells a script on * server about users location/extension/device. then your script will re-create TFTP files, sends reboot to 7940/7792 and you are done... Ta SJ ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users