Extensions between calls blocking

hi friends!! i was searching for make a custom context for block calls between extensions

Scenario:

Lets supose that we have in the range A: extensions from 100 to 199 and in range B: 200 to 299 and in C 1000 to 1999

i was looking in the forum and i found this context:

[from-group-15xx]
exten => 1[012346789]XX,1,playback(ss-noservice)
exten => 1[012346789]XX,n,Hangup()
include => from-internal

as i read in the article they said that it is blocking all the extensions but not the 15xx im trying to do my own but it is not working let me cut and paste my code:

[from-group-1x]
exten => 1[013456789]X,1,playback(ss-noservice)
exten => 1[013456789]X,n,Hangup()
include => from-internal

[from-group-2x]
exten => 1[0123456789]X,1,playback(ss-noservice)
exten => 1[0123456789]X,n,Hangup()
include => from-internal

thanks in advance!!

You are on the right track, but you are missing one critical part. When trying to match an extension by pattern in Asterisk, you must prefix the pattern with an underscore. Your context should look like this:

[from-group-1x]
exten => _1[013456789]X,1,playback(ss-noservice)
exten => _1[013456789]X,n,Hangup()
include => from-internal

thank you!!! im testing the context, i will put now how i made it to work (obviouslly with your help:
we will block with this all the extensions diffeent from  100 domain
[from-group-10x]
exten => _[23456789]XX,1,playback(ss-noservice)
exten => _[23456789]XX,n,Hangup()
include => from-internal

;we will block with this all the extensions diffeent from 200 domain
[from-group-20x]
exten => _[13456789]XX,1,playback(ss-noservice)
exten => _[13456789]XX,n,Hangup()
include => from-internal

now one question! lets suppose that i want to block the 110 and above the context will be:

[from-group-10x-decimal]
exten => _[23456789][123456789]X,1,playback(ss-noservice)
exten => _[23456789][123456789]X,n,Hangup()
include => from-internal

can be? or it is my immagination only?

best regards!

23456789 = 2-9 for convience also = n

mmphpmh (smoking and thinking)

[from-group-10x-decimal]
exten => _[2-9][1-9]X,1,playback(ss-noservice)
exten => _[2-9][1-9]X,n,Hangup()
include => from-internal

something like that? (sounds like a “perl array” ) =)

hey

I’m having some problems getting this configure in Box this is my first time attempting to edit any files in asterisk DIR
Question 1
-the file that i need to edit is extensions_custom.conf ?

What im attempting con accomplish

I have 9 range of extinctions that i need to block My range are 20xx , 30xx, 40xx 50xx 60xx 70xx 80xx 90xx
I dont want this ranges to communicate internally.

Base on the information i have been reading this is what i have don but is not working for me

[from-group-20xx]
exten => _[13456789]XXX,1,playback(ss-noservice)
exten => _[13456789]XXX,n,Hangup()
include => from-internal

[from-group-30xx]
exten => _[12456789]XXX,1,playback(ss-noservice)
exten => _[12456789]XXX,n,Hangup()
include => from-internal

Any Help Please

Hi

I new to free pbx and i have the same problem im flowing the blog but im a bit lost … in what file do i need to make this changes ?