Device and User Trouble

I’m new to Asterisk.

I managed to get it up and running without any major problems.
I figured out how to change modes from extensions to devices and users, because I want users to able to log on to their phones. This works great.

The only thing I don’t understand is how to restrict phones from calling when there are no users logged on.

I tried the solution with the white list that restricted the phone but also the user that logged on.

I’m looking for something that can allow the phone to call internal and emergency numbers and when the user logs on it can call everywhere the user is allowed to.

Is there a solution? because I think this is one of the purposes of the mode usersandevices.

While you logic is sound, the default behavior is to allow calls even if no user is logged on. You need to modify the dialplan to explicitly prevent calls if no user is logged in.

Thank you for your explanation,

Ill have try to learn more about writing dialplans.
Can you give me some leads?

Read the book linked in my sig (or post a bounty :slight_smile: )