Dial pattern issues

Hi. I am setting up a FreePBX system (FreePBX 17.0.21.3) On a Raspberry PI5 and after a bunch of trials and errors got it working with flowroute for incoming and outgoing calls. this morning I tried and it worked only with 11-digit numbers. So, I looked at the dial plans of the outbound route and the trunk, and noticed that the pattern for a 10-digit number was missing. So, I deleted the patterns and tried to use the wizard to add them back. To my surprise, the outgoing calls didn’t work anymore. A 10-digit dial ends up with “call cannot be completed as dialed”, an 11-digit dial ends up with “All systems busy”.
I then looked at the log, and saw that the 11-digit call was initiated with the correct 11 digits. But the call to Flowroute seems to show only 7 digits. I am not sure how that happens.

Here is the dialplan from the outbound route:

(Please note that the 10-digit pattern (NXXNXXXXXX) is missing, and I can’t add it. If I add it, I can submit and apply, but when I look at the dial plan again, it is not there)

Here is the dial plan for the trunk:

Note that the 10-digit pattern is probably not correct, as a “1” should be added. More about that later)

My understanding is that when a number is dialed, the system goes through this list and matches the dialed number with the first pattern. If it is a match, it eiter adds or deletes numbers (based on the settings of prepend and prefix) and passes it on. So, in this case, when I dial an 11-digit number, the first pattern is a match, and the outbound route should pass it unchanged to the trunk.
The trunk sees an 11 digit number which does not match the first pattern. So it hands it to the second pattern, for which it is a match. The trunk should then the 11-digit number to pass it over the trunk.
But the log shows that only the last 7 digits are passed over the trunk to flowroute, so the call fails.

Am I not understanding this correctly?

Back to the 10-digit pattern.

When I add a rule for a 10-digit number to the outbound route, like this:
image

Submit, Apply config, and go back to the dial plan, the line I just added is not there. It’s as if I had done nothing. Is that correct?

You noticed above that the lin IS present in the trunk, but when I add a 1 to the prefix, and click on Submit, this happens:


and a message pops up “Dial Pattern is invalid”.

I don’t understand what’s going on here. What am I missing?

I believe that you may be confusing how the “prepend” and the “prefix” fields work. On a dial plan in FPBX when you “prepend” it will add the prepend field info before the entered dial string. When you “prefix” it will strip from the beginning of the presented dial string whatever is in the prefix field.

I posted our setup in the previous post topic thread that you can find here:

There are screenshots of our use of the Dial Manipulation with explanation.
Our use of the 911 and 933 dial string is captured with a separate Outbound Route that is setup as an Emergency Route. The 911 Outbound Route has a higher priority than the regular route.

With the Outbound Route dial Manipulation you have in your example, the only call (using Flowroute and their 11-digit dial string) that should work is if you dial 1NXXNXXXXXX, 911, or 933. All of the others will not yield a valid Flowroute dial string.

Here is a screenshot of our list of Outbound Routes for references regarding 911 handling.

Yes, indeed. I confused the prefix and prepend. I am pretty sure I saw somewhere an explanation that was opposite to what they do …

So that is all sorted out now, I can place and receive calls. I also set up postfix and can now send myself emails that contain the message as a .wav file. Hint: I had some real trouble setting that up. manually I could send emails, but Freepbx would not. It turns out that was some issue with permissions. Apparently FreePBX did not have the permission to read the main.cf file. that was an easy fix in the end:

chmod postfix set-permissions

I have one issue still that is intermittent: most of the time I can call the system, and it responds, but occasionally I just hear 2 beeps and don’t get connected. Usually, I get through after another try without any changes. What could that be?

Many thanks for all your help.