FreePBX stripping entire telephone number

I’ve created a route rule under “Outbound Routes”, set the route CID number (from carrier) and had it “Overirde Extension CID” just like my other Outbound Route Rules. I configured the dial pattern as 4|. and saved the new changes.

I did a trace and found out that FreePBX is stripping the whole number instead of prefix “4” only and replacing it with ‘t’ as shown in the image.

How can I sort this out?

I’m going to ask, just so we’re clear.

You’re using a fairly recent FreePBX and put in “4|” in the “Strip” column, right?

Try removing the “|”. I don’t think that syntax is used any more.

Just a guess.

Removing “|” is a no go. I still have freepbx-2.10.0rc1 installed on my machine.

Any other suggestions?

Can you post a screen shot or cut/paste of your outbound rules without any passwords/IPs? I predict that this is going to end up being something silly like a spurious underscore.

Hi cynjut,

I’m a bit lost on where to find the outbound rules configuration, can you point out where I should see that.

Thanks.

From the “System Status” screen, click the “Connectivity” pulldown. On there, click the “outbound routes”.

From there, tell us what things you have set.

For example, on my outbound route for my VOIP providers, I have a Route Type of “Emergency” set, “Call Recording” is “Don’t Care”, PIN Set is “None”.

Below that are the Dialplan Rules.

There are three (maybe four, depending on your version of FreePBX) entries for each rule.

The first column is the “Prepend” rule - this gets added to whatever matches the third column.
The second colum is “Strip” rule - anything in here gets stripped from the number as the “Internal Prefix”.
The third column is the “Match Pattern”, After the strip rule is applied, anything that matches this column get processed through this route (and the prepend gets applied).
Finally, the version specific “Caller ID”. This allows you to tailor your caller ID so that it matches a specific outbound caller ID to this specific number pattern.

So:

Let’s assume you’re in Iowa in the United States. Your VOIP provider needs ‘1’ and the area code for every outbound call and you want people to dial “9” for an outside line (because you’re pretending you’re still using a system from the 1950s) and you want everyone to be able to use 7-digit dialing for local calls. Your rules would look something like this:

Column 1 (prepend) = "1712"
Column 2 (prefix) = "9"
Column 3 (match pattern) = “NXXXXXX”

OR Assume you want everyone to dial the full 10-digit number whenever they call:
Column 1 = "1"
Column 3 = “NXXNXXXXXX”

OR assume everyone has to dial all 11 digits to call out (or you have the vTiger dialer app installed)
Column 3 = “1NXXNXXXXXX”

You can actually use ALL of these rules at the same time (except for the dial “9” for an outside line thing - that’s stupid). If the number dialed matches the rules above, this number gets sent to the trunks specified at the bottom of the page.

The idea here is to match a sequence and modify it so that all of your trunks get the same thing. In our example, this trunk is ONLY used for outbound calls. For any call, the outbound number will always be '1NXXNXXXXXX" where ‘1’ is a “1”, “N” is a digit from 1-9, and X is any valid digit.

The trunk configuration has a similar block of rules (without the caller ID). In here, the rules are used to decide if your traffic is appropriate for this trunk and (if so) how to modify the dialed number to make it correct.

Suppose that you have two VOIP providers and one is good for “domestic” calls (1+areacode+number) and one is good for international calls (011+areacode+number). All of your calls (from your outbound route rules) are sent to the trunk in the form “1NXXNXXXXXX”, so you would “prepend” a “01” onto the front of any call that matches with a ‘1NXXNXXXXXX’ for the International provider and just allow it on your other provider (match “1NXXNXXXXXX”), you are good to go.

If you only have one route out and don’t plan on doing any “abbreviated” dialing (every number is a full number, so no assumed area codes or country codes) you don’t really need any rules in either area. The system is smart enough to know about it’s own numbers and all of the dial codes (Do Not Disturb, etc.) and the local extensions. Everything else gets sent to your outbound route, which then sends everything out to your trunk. As long as you don’t do something that annoys the VOIP provider, the system should just work.

Thanks for the information. But what I don’t get is why are prefixes 3 and 5 working. I use the same dial patterns as shown in the diagram but I still get “All circuits are busy now”… prefixes 3 & 5 are working.

OK - sorry - I thought we were talking about a recent version of FreePBX. It’s been years since I messed with this interface.

Unless you are doing something in the trunk interface, the way you need to dial a “4” prefix number is ‘40117121234567’, right? After that, the trunk will take the call and process it, unless the trunk isn’t set up to accept whatever you are sending.

What “access rules” are you using in International_Prefix_Hidden_4?

Yes, we use ‘40117121234567’ when trying to call a number using prefix ‘4’ and that’s where we get “All circuits are busy”.

I’m a bit lost with the access rule. Where can I access that? I’m wondering why this prefix (4) won’t work while other prefixes (3 & 5) works just fine. I compared their Outbound settings w/c is virtually the same except for the dial patterns.

In the trunk definition, you have a box like the one for modifying the outbound numbers (strip, prepend, match). It performs pretty much the same way the editing rules in the outbound routes.

So, if you set up your outbound trunk definition to accept anything that starts with ‘011’, when a number that matches that goes by, the trunk will process it, otherwise the trunk will pass it on to the next trunk in the list.