Extension to extension call block

Hi,

I have 20 extensions on my freepbx, some starts with 1501, 1502 etc and some starts with 1601, 1602 etc… I want to block call between them so that they can not call each other. 150X ext can not call 160X ext and 160X ext can not call 150X ext.

Please help on this.

Open extensions_custom.conf in the config editor. Add the from-group-15 and from-group-16 contexts to the bottom of the file. Make them look like this.

[from-group-15]

exten => _16XX,1,playback(ss-noservice)
exten => _16XX,n,Hangup()
include => from-internal

[from-group-16]

exten => _15XX,1,Playback(ss-noservice)
exten => _15XX,n,Hangup()
include => from-internal


That should do it.

Hi,

I tried this but doesnt work.please help

This won’t work, of course, because asterisk will use the longest match patterns. For example, you’ve got extension 1501, 1502 and 1603, 1604. You can do like this:

  • Change the context field of 1501, 1502 to from-internal-15x
  • Change context of 1603, 1604 to from-internal-16x
  • Add these context into extension_custom.conf
    [from-internal-15x]
    exten => _150X, 1, goto(from-internal, ${EXTEN}, 1)

[from-internal-16x]
exten => _160X, 1, goto(from-internal, ${EXTEN}, 1)

That should solve the problem.

Hi,

Thanks for your reply

I tried this and reload but they are still able yto call each other.

Please help

I’m supposing you want to allow 15XX users only to call 15XX extensions, so what you have to do is create a context for the 15XX group that bans any call to 10XX, 11XX, etc, except 15XX. It would be as follow:

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

In this way you can configure a PBX hosting multiple companies without mixing them. The companies wouldn’t be able to make calls between them, although they could receive external calls, make outbound calls and make internal calls only to the extensions you have assigned to them.

Hmm I 2 got a look a like probleem

lets say
we have the 4 teachers and the 24 students…
the 24 students have a extension of 30x
and the teachers 40x
Teachers must call the students
Students must call the teacher
Teachers must call teachers
But Students to students may not happen
i am running pbx in a flash. i have a little knowledge about the .conf file. can you help me

I also have the same problem, I can already block group 1 and group 2 to call extensions only within the same group. And group 3 can also call group 1 and 2. All I’m lacking is for group 1 and 2 to call group 3. Have I explained it clearly? =)

Is this possible?

Does anyone have an idea about this problem

Bora - This thread is full of ideas. You need to explain completely. Half sentences don’t get responses.

My problem is same to lilsoldier problem.

**** Hmm I 2 got a look a like probleem
lets say
we have the 4 teachers and the 24 students…
the 24 students have a extension of 30x
and the teachers 40x
Teachers must call the students
Students must call the teacher
Teachers must call teachers
But Students to students may not happen