Advisability of Device and User Mode


We had one client who ran for years in user/device mode – this worked, but it was quite a hassle.

We now have another large client who wants to swap to this mode.

What opinions are there about this mode of working? Essentially, the client wants to force the users to “log in” to be able to receive calls.



Moving from Extension mode to Dev User mode isn’t bad, everything gets duplicated, meaning your devices will be automatically (fixed) to your user. And if you wish to make that different, i.e different user with password to dynamic devices, you have to modify each entry.

Unfortunately also, BULK extneions doesn’t support Device / User mode, so its going to be a litle more work, unless you know how to manipulate the DB :smiley:

Anyway, the ability to control only logged on users to make calls isn’t natively availble through this mode, you have to write custom contexts for that to work. If that’s what you wish, i can guide you to my blog entry that might just help :slight_smile:

OK sorry my bad, thought i saw making calls (not receiving), yes that would be exactly what will happen, of course


Thanks for the comments - I am comfortable writing custom contexts.


Maybe this will help you, it works great for us:

exten => *11,1,Goto(from-internal,${EXTEN},1)

exten => *12,1,Goto(from-internal,${EXTEN},1)

exten => _.,1,Answer()
same => n,Set(USEREXIST=$[${DB(DEVICE/${CALLERID(num)}/user)}])
same => n,GotoIf($[${USEREXIST}=none]?LoginOption)
same => n,Goto(from-internal,${EXTEN},1)
same => n,Hangup()
same => n(LoginOption),Playback(cannot-complete-as-dialed)
same => n,Goto(*11,1)

exten => 112,1,Goto(from-internal,${EXTEN},1)
exten => 911,1,Goto(from-internal,${EXTEN},1)

Then, put all devices in this LoggedOffPhone context. Then, in order for BLF keys to work, add this to sip_additional (or in case of FreePBX, the custom version): subscribecontext=from-internal

I just wish to add this is what happens:
Logged on user dials number (extension or external or whatever): Dials normally
Unauthorized user (logged off phone) dials: “Your call cannot be completed as dialed” is played, then the user is redirected to logon (*11), and “Please enter your extension…” is played

Here’s my blog entry, just incase

i use device and user mode, always have. i find it to have several important advantages. then to my surprise, i got this from paid schmooze support:

Barry, strictly speaking D & U mode will be gone completely in FreePBX 2.12. the support person elaborated that Asterisk v12 was not going to support it (i thought d&u mode was a freepbx concept… but they’re the experts).

i can’t find any other corroboration to this fact… anyone see anything in asterisk doc? freepbx doc?

We will be re-writing what is now Device and User mode to coincide with how Asterisk 12 now works. Asterisk 12’s primary SIP driver is no longer chan_sip, it is PJSIP and PJSIP allows multiple devices to register to one authentication. So technically you could have device 102,103,104,105 registered to 101.

At this time it is too early to say wether device and user mode will go away completely or just be different. I am 95% sure it will still work the same functionally and look the same. Asterisk in itself has always supported and will always support users & devices, it is the core functionality behind Asterisk. We are thinking of new ways to “do” device and user mode correctly or in a different way to work with the advances in A12.

That being said I will clarify with the support team on what is changing in Asterisk 12 and what is changing in FreePBX 2.12 in the coming weeks.

Just to comment their are known issues with using Device and User mode in FreePBX with some modules and certain things that never worked correctly with ad-hoc mode or more then 1 device to the same users. These have existed for years in FreePBX and every month someone opens tickets on them.

Will there be details on whether we’ll be able to upgrade soon?
For us, U&D is an important feature, because users can roam with their extension between physical phones just like they can with Active Directory account between computers.

We have no clue what will be possible or not at this time. The buggiest part is the hot desking and creates problems with lots of other modules and the part that we put the least work in.

I know there have been some issues to work around with hotdesking. Nonetheless, this is a vital feature I think, and hardwiring an extension to a phone would really decrease the utility and attractiveness of the wonderful Asterisk/FreePBX setup.

I agree though (since I have extended a few things here and there) that the Hotdesking is messy requires a serious overhaul; possibly even a design change/complete rewrite.

Is there any more info on this? We’re setting up a new system, and was going to go with device and user mode, but now may use extension mode and wait to see what’s coming, but not sure if thats next month or next year? Any insight? Any where else i could check on status/info of this development?