This allows a single user to have multiple devices with the same phone number. It also allows a single device to be used by multiple users in a hot desk style environment, where a user logs into the device resulting in it becoming their phone.
From the CLI navigate to Asterisk directory.
With your prefered editor ( i like joe or nano ) open amportal.conf and find the following:
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, and Users will be able to "login" to devices.
# If set to 'extensions' Devices and Users will me administered in a single screen.
Change the value from extensions to deviceanduser like so:
Save and exit.
Now we need to restart asterisk and amportal. From CLI i use the following command
Login to the webui, and create a user. Complete the form to your needs. Be sure that you supply a password in the User Password field. Now that we have a user, submit the changes.
Now we need to create a device. Under Device Options: Provide a password. Under Device Info: Supply a device ID and Description. For device type, select Adhoc. For default user select: none.
Now that we have a device, submit the changes and reload. The user and device has been created. Now, onto the queue. For creation of the Queue, please refer here
Place the ID of the USER into the static agents field. Now that we have a queue, submit the changes and reload.
On the Device, place a call to *11, when prompted, enter your USER Extension, next it will ask for a password, enter the USER password. Your User is now an Agent in the Queue.To logout, simply dial *12
So, with this configuration you should have a device that a user can login or out of at will.