How to restrict one extension to outside calls to a specific number only

I have an extension 1000, which I would like to be restricted for outside calls. I am using my trunk via USB dongle.

This extension should be able to call only my mobile number (let’s say 041123456). In FreePBX I added new Oundbound Route with the following properties:

  • Route Name: 1000_restricted.
  • Trunk Sequence for Matched Route: from the drop down menu I selected my trunk gsm_dongle0.
  • Dial Patterns: here I went to the field match pattern and enter 041123456.
  • Dial Patterns: here I went to the field CallerID and entere the extension number I want to block, in my case 1000.

This outbound rule is the first one, but when I try to call some other number from extension 1000, let’s say 031654321, the call goes through.

What I am doing wrong?

My guess is you have another outbound route below “1000_restricted” that is allowing outbound route to be used.

Can you set a dial plan on the phone itself to just that 041123456 number? This should only allow that phone to dial that number and nothing else?

Yes, below “1000_restricted” is the main outbound route, allowing calls outside. However, I have done something similar for extension 4000, but there I did not set trunk sequence. That blocked outside calling for that extension completely. So I thought I can do something similar to restrict outside calls to a specific number only.

Since I am a total beginner - how can I set a dial plan on the phone itself?

BTW, under trunk settings (I have only one trunk), under Dialed Number Manipulation Rules, I have XXXXXXXXX in match pattern field).

Should I set up another trunk for this extension only?

I would accomplish this two ways. (I am not expert by any means either).

  1. Set a dial plan on the phone that only allow that number to be dialed. On my endpoints, I would log into the WebGUI of the phone and under Accounts, Dial plan clear out {x+#|xx+*|*x+|[0-7]xxx|81[2-9]xx[2-9]xxxxxx} (this is what is in my default dial plan and replace it with {041123456 }. This is only allow that phone to dial that number 041123456 and this means no internal call either.

  2. This is what I do to block calls I don’t want to be dialing (international or 900 number). Setup a 2nd custom trunk, call it blackhole or something. Then set up a 2nd Outbound Route pointing to that trunk called Blocknumbers. Trunk Sequence for Matched Routes: blackhole. Optional Destination on Congestion: Terminate Call and whichever action you want. Under Dial Pattern enter CallerID of 1000. Outbound routes are top-down matching. Meaning if x1000 calls 041123456 it will hit your first outbound route and proceed with the call. If x1000 call any other number it should match it to “blockcalls” and Terminate Call and hangup.

1 being the easiest and 2 being overkill for this situation.

So the first option means you need to change settings on a phone, not on a (FreePBX/Asterisk) server?

For me this is not an option, because I am using SIP clients on computer (softphone).

So I need to take second approach? Thanks, will try.

Depending on the softphone you are using you should be able to edit a dial plan as well. It should be in the setting somewhere.

I forgot to add in here that, you need to match the dialpattern of your country here.

OK, on my outbound route I have dial pattern: 0[12345678]XXXXXXX. But on my trunk I have Dialed Number Manipulation Rules (match pattern) set to XXXXXXXXX.

It works, but I wonder if that is OK, or should trunk have the same dial pattern in Outbound route and a Trunk?

I leave my trunk dial pattern blank. SInce only the blocknumber outbound route is the only one using the trunk.

You could use Class Of Service. Create a rule, add only x1000 and allow only the single outbound route that goes to your cellphone number.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.