I’m interested in controlling outbound dialing through my asterisk system. Some users should be able to place long distance and/or int’l calls while some should not. The best case would be to have some kind of group membership. I haven’t turned up anything on the wiki yet.
I’m wondering what design patterns others have used to achieve this (number ranges in extens?). I’d like to do it within the dialplan if I can.
If I were looking to do this, I would go to my outbound routes.
create one for local calls, and a second one for LD and INT calls.
With the second one for LD and INT calls, simply add a password requirement. Do this even though they both use the same outbound trunk.
Just set the Dial Patterns/plan for local on one, and LD on the other with a password.
this is easily done using *@H 2.8. Not sure what you are running.
I was hoping there would be a bit moe elegant way to do it. I decided to do something similar in where we just create one more contexts with the specific dialing rules appropriate for a specific type of user and assign that context when creating the record for the extension in sip.conf.
[default]
include => internal
include => longdistance
include => local
include => tollfree
include => emergency
[restricted]
include => internal
include => local
include => emergency
you’d set your non-restricted users to use the ‘default’ context as their default, and your restricted users to use the ‘restricted’ context as their default.
both contexts still have internal extension dialing capabilities, and emergency dialing, but only the ‘default’ context allows for tollfree and LD dialing.
i don’t see why this wouldn’t work…in fact, i’m planning on doing something very similar for our company.
[default]
include => internal
include => longdistance
include => local
include => tollfree
include => emergency
[restricted]
include => internal
include => local
include => emergency
i don’t see why this wouldn’t work…in fact, i’m planning on doing something very similar for our company.[/quote]
I agree. I’m writing a dial plan builder application for my company and that is what I have decided to do, except instead of having just say 2 static outbound contexts, we’ll just include the ability to define more than out outbound route.