Is there a way to restrict extensions so they can call another extension but not use the trunks?
(without using passwords in trunks)
Regards...
Is there a way to restrict extensions so they can call another extension but not use the trunks?
(without using passwords in trunks)
Regards...
Freepbx does not have this ability from the gui at this point. You must do it manuallly. You must put those extensions into their own context and then create that context in extensions_custom.conf. You would then include all the other contexts that you want that extension to have access to - besides the outbound routes. Keep in mind when you do this, you should make sure to include emergency routing (911 or equivalent).
p
Philippe Lindheimer, FreePBX® Project Leader
http://freepbx.org - #freepbx on irc.freenode.net
http://freepbx.org/forums - The FreePBX® Forum
OTTS Training - Apr 27-29, Huntsville, AL
Thanks foy your help...
Could you point me to a forum or site where I can read more on this subjet?
The truth is that Im not that familiar with asterisk but Im willing to read as much as necesary... Regards....
sammyantoun (might have that wrong) posted a detailed description on how to do this on the old AAH forum. But the simple answer is:
1. choose another context than from-internal for these extensions
2. copy from-internal as your starting point
3. peel out whatever you don't want
4. make sure you include an emergency routing context
for the last, take a look at outbound-allroutes which you won't want to include, but you may want to include some of the routes that it has for the emergency dialing. And when you are done - make sure to test the emergency dialing.
Beyond that - it's just learning and understanding asterisk better, and then looking at the dialplan and figuring out how to mold it to do what you want to (while not breaking what the gui does)
p
Philippe Lindheimer, FreePBX® Project Leader
http://freepbx.org - #freepbx on irc.freenode.net
http://freepbx.org/forums - The FreePBX® Forum
OTTS Training - Apr 27-29, Huntsville, AL
Thanks...
Here is my post from the old AAH forums on this subject:
This is a little complicated, but here goes.
1. Get all your trunks and outbound routes set up for ALL users.
2. open extensions_additional.conf and find the section:
[outbound-allroutes]
There will be an include => line for each outbound route you have defined in FreePBX. it will look something like this:
include => outbound-allroutes-custom
include => outrt-001-911
include => outrt-002-ForceTeliax
include => outrt-003-ForceZap
include => outrt-004-TollFree
include => outrt-005-LD
include => outrt-006-Mexico
include => outrt-007-ToDLK
include => outrt-008-ToHadden
include => outrt-009-Ecuador
exten => foo,1,Noop(bar)
Copy it to a text file somewhere
This is the key to allowing various outbound calls.
Now, open extensions_custom and add a section like this:
[from-restricted]
include => parkedcalls
include => ext-fax
include => app-cf-busy-off
include => app-cf-busy-off-any
include => app-cf-busy-on
include => app-cf-off
include => app-cf-off-any
include => app-cf-on
include => app-cf-unavailable-off
include => app-cf-unavailable-on
include => ext-meetme
include => ext-findmefollow
include => ext-paging
include => ext-queues
include => app-calltrace
include => app-directory
include => app-echo-test
include => app-speakextennum
include => app-speakingclock
include => app-callwaiting-cwoff
include => app-callwaiting-cwon
include => app-recordings
include => app-dialvm
include => app-vmmain
include => app-dnd-off
include => app-dnd-on
include => ext-group
include => app-userlogonoff
include => app-zapbarge
include => ext-test
include => ext-local
;****************OutBound Routes************************
**Copy the outbound routes include statenemts here from YOUR SYSTEM - REMOVE MINE
include => outbound-allroutes-custom
include => outrt-001-911
include => outrt-002-ForceTeliax
include => outrt-003-ForceZap
include => outrt-004-TollFree
include => outrt-005-LD
include => outrt-006-Mexico
include => outrt-007-ToDLK
include => outrt-008-ToHadden
include => outrt-009-Ecuador
exten => foo,1,Noop(bar)
;********************************************************
exten => h,1,Hangup
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)
********end of code to add to extensions_custom
Now, go comment out the outbound routes you do not want the restricted extrensions to use.
Last, go back to FreePBX and pull up the extension you want to restrict. Change the Context to :
from-restricted
Thats it :)
Any include => line in the above code that you comment out will restrict the extension.
If you comment out:
include => app-zapbarge
then the restricted extension will not be able to use that feature.
Commenting out the include for a long distance route will restrict access to that.
Greg Keys
Sorry about starting that other thread. I found this one and continue here:
So to allow people to use a trunk outbound with g729 but restrict the fax to ulaw, I would have to set up a second trunk entry to the same provider and point everything to the g729 entry and the fax to the new entry.
Before I mess up my whole setup one question...
I am going to need to set up a second trunk for this, as I want one where g729 and ulaw get used and one where only ulaw gets used. How do I set the second one up? My assumptions are: Different outgoing context. No user context needed at all since that's for incoming. Do I need a registrations string or will having one in the "main" trunk entry take care of that with the IAX2 provider?
Thanks,
Warren
Why not just modify the dial plan of your phone(s) to only allow dialing inter-office extensions?
This works great if you want to restrict x number of trunk from x number of people
what if I want to restrict
Trunk Abc from user 333 but not trunk XYZ and
Trunk XYZ from user 222 but not trunk ABC
To Clarify
I have user 111 and he should only be using trunk 1
user 222 should only use trunk 2
user 333 should only use trunk 3
can this be done?
You can create different [from-restricted] contexts.
[from-restricted1]
allow trunk abc
;allow trunk xyz
[from-restricted2]
;allow trunk abc
allow trunk xyz
and then assign restricted1 to extension1 and restricted2 to extension2 etc.....
I'm surprised that no one has mentioned the new Custom Contexts module - it's not part of the official distribution and is still in beta, but it will do exactly what you want and a whole lot more. For details see FreePBX Ticket #1447 at http://freepbx.org/trac/ticket/1447 and the documentation at http://aussievoip.com.au/wiki/freePBX-CustomContexts. I have a feeling this is going to become a very significant module when it becomes part of the official distribution because it makes things that used to be very hard very easy.
I have done something different all together. I am blocking extensions by their Caller ID.I Hope it helps others. Here is what i did.
First create a database key in astdb for eg.
asterisk>database put allow_call 399 1234
Here allow_call is the Database family
399 is the key and also the extension number
and 1234 is any secret which might be unknown to the user dialing out.
now i created a custom-context from [ourt-001-Longdistance] in extension_custom.conf
[ourt-001-Longdistance-custom]
exten => s,1,Noop(Authorized by extensions)
exten => s,n,Set(key=${DB(allow_call/${CALLERID(num)})})
exten => s,n,gotoif($["${key}"=""]?101:5)
The Idea here is that whenever a extension tries to make a call, the code above will check if they have a valid allow_call entry in asterisk database.
If it returns empty you can send it to any priority, or just play busy tones and hangup.
Hope it helps.
This is what I did.
I used FreePBX and set the context of the extension to from-trunk. From-trunk is only allowed to connect to something internal to Asterisk. So a user with an extension in that context is treated as an incoming call. I don't know if that's the "right" way to do it but it seems to work.
Ed
emanteuf's method seems the easiest way of restricting extensions based on my search and it works for me as well.
But my question is what happened to Custom Contexts module? It's not in included in FreePBX release yet.
Shouldn't be a problem
If strange things start happening, change it back
Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299
But I found that if I put an extension in from-trunk context, that extension cannot dial any ring group or conference room.
What's the best way to solve this problem?
see here: http://freepbx.org/news/2008-11-05/restricting-outbound-calls-in-...
Moshe Brevda, FreePBX/Schmooze Com Development Team
Copyright © 2011 Fonality
Fonality and trixbox are trademarks of Fonality. Trademark Policy. Privacy Policy.
Asterisk is a trademark of Digium, Inc. Fonality and trixbox are not affiliated with, nor endorsed by Digium, Inc.
Member Since:
2006-06-02