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.
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?
I would accomplish this two ways. (I am not expert by any means either).
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.
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.
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?