I am currently using AsteriskNow which include this FreePBX.
Now I am looking solution how to restrict calls.
I have extension/extension groups 100 000 - 199 999 and 200 000 - 299 999. How I can make rule that only allow internal call between 100 000 - 199 999 extensions but not can’t make call 200 000 - 299 999?
I have understand that I need to make modifications in sip_custom.conf and extensions_custom.conf?
I have found those configuration files under /etc/asterisk/ but it’s only way to edit those using SSH? I have also found that there should be something file editor in FreePBX?
it works perfectly. we use it at some schools to prevent the students from dialing the paging system. you can say that extension x cannot dial extension y which i assumed is what you were trying to do
Hmm… then I do not know how to use that module because problem is that what you are saying that when I make call like 100101 to 200101 I want that to happened.
Do I need make like paging group and that way block calls?
Because now I tested in extension_custom.conf and put these in
exten => _[23456789]XXXXX,1,playback(ss-noservice)
exten => _[23456789]XXXXX,n,Hangup()
include => from-internal
exten => _[13456789]XXXXX,1,playback(ss-noservice)
exten => _[13456789]XXXXX,n,Hangup()
include => from-internal
Please correct me if I’m wrong however my understanding is that the COS module will restrict all kinds of stuff like trunks, paging, queues etc however there is no extension to extension restrictions.
There is no way from the interface to restrict extension to extension calling.
COS will not let you restrict dialing between extension. Only between other things like ring groups, queues, feature codes and routes. But it has no ability to restrict what extensions can be called.
On the other hand, you can write a replace from “from-internal” like “from-internal-1000:” which would stop you from dialing “2xxx” numbers and “from-internal-2000” to block “1xxx” numbers.
Use “from-local” from extensions.conf as you template.
@cynjut Do you mean that I will use that from-internal-100000 and context from-internal-200000 in FreePBX extensions context?
But if I do that then nothing works because I need to also make in extension_custom.conf like this
[from-internal-100000]
exten => _[23456789]XXXXX,1,playback(ss-noservice)
exten => _[23456789]XXXXX,n,Hangup()
include => from-internal
[from-internal-200000]
exten => _[13456789]XXXXX,1,playback(ss-noservice)
exten => _[13456789]XXXXX,n,Hangup()
include => from-internal
Then I can allow extensions make calls inside 100000 and 200000 extension but also when I make more extensions like 300000 group I can make new modification in extensions_custom.conf file?
[from-internal-300000]
exten => _[12456789]XXXXX,1,playback(ss-noservice)
exten => _[12456789]XXXXX,n,Hangup()
include => from-internal
Which allow 300000 extensions makes internal call between them.
Just stay in the [from-internal-custom] context. There is no need to include the from-internal context as the custom context is executed before the from-internal context.
All you have to do to limit calls between extensions is to use something like that:
[from-internal-custom]
;disallow calls from extensions 1XXXXX to 2XXXXX
exten => _2XXXXX/_1XXXXX,1,Hangup
;disallow calls from extensions 2XXXXX to 1XXXXX
exten => _1XXXXX/_2XXXXX,1,Hangup
Insert these lines to the extensions_custom.conf file and then run the command:
Logically if the length of ${EXTEN} and ${DB(AMPUSER/${AMPUSER}/cidnum)} are both 6 and ${EXTEN:0:1} is not equal to the the first digit of the same cidnnum,` then you could, perhaps, reasonably and preemptively signal unavailable and then hangup.
This thread was a lot of help. Blocking extension to extension did not work for me though. I created a new context in extensions_custom.conf called [From-Internal-new] and added that context to a test extension. I then copied everything from the context [From-internal-additional] located in extensions_additional.conf. I started commenting out lines to see which one would stop extension to extension calling. The 2 lines that stop this is ext-findmefollow and ext-local.
I will play with this more in the future, but it worked for stopping extension to extension calls. You will probably have to make a custom From-internal like context for each group and a custom ext-local like context for each of those groups.