[Asterisk-Users] Re: phone line "roaming"

Benjamin on Asterisk Mailing Lists benjk.on.asterisk.ml at gmail.com
Wed Sep 15 06:29:20 MST 2004


On Wed, 15 Sep 2004 14:15:24 +0200, Pavel Jezek <pavel.jezek at i.cz> 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
*21xxxx 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 => _*21XXXX,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.



More information about the asterisk-users mailing list