Dial patterns

To start off I seem to be confused about what or how the dial patterns configuration works. You have support for them in trunks and in outbound routes.

What takes precedence, trunks or outbound routes?
Well my real problem is this, I have configured a dial rule that looks like this 1317+NXXXXXX (btw, this can only be done in trunks with the wizard and entered in by hand into outbound routes).
I will dial a number of the format NXXXXXX and it will never hit the rule.

It returns with two lines of erros and stating that it is unable to make the call.

At the moment I can enter in a rule that allows 1NXXXXXXXXX dialing and it works. I can call using 10 digits and things work fine. I have done this with dialplans of my own making without freepbx and it works great. Hardcoded area code in my dialplan.

I have no other rules for dialplans setup only the above rule, one at a time (KISS).

If someone can help me understand why the fixlocalprefix agi is not running on this rule, or actually why the dial rule never sees 7 digit calls as a valid call please let me know.

Also if I dial an extension like 6700 it will fail with other reasons.
I am sure this is because there are no rules for local extensions, but not understading freepbx completely, I am not sure.

I am running 2.3.0beta1-2.1 something updated today.
Asterisk 1.4.5

Thanks

oop -sorry, typo in the localprefixes.conf file name, you should be able to do a new update to get a fix for this within 10 minutes or so when the mirror picks up the change.

Cheers for fixing it.

All working ok again,

Thanks

Matthew

Since applying the latest core and framework updates this morning, this problem has reappearred.

As before, its ignoring the outgoing dialling rules, so the calls to the trunk fail.

hope this helps iron out the problem.

Many thanks

Matthew

I’ve got the same problem here.

Upgraded from 2.2 to 2.3 beta 1.

It seems to be ignoring the “outgoing dial rules” in the trunk setting.

The dial patterns in the Outbound route seem to work.

If I dial my cellphone 07973XXXXXX, the dial pattern…

“0|7.” trims it to “7973XXXXXX”

The Outgoing Dial rules…

0044+XXXXXXXXXX
0044+XXXXXXXXXXX
00441827+XXXXXX
00441827+XXXXX

This should give me-

00447973XXXXXX

Instead it tries to dial 7973XXXXXX, which the trunk will not accept!

Any ideas why this should fail with the beta version?

Same problem applies to all trunks and all outgoing calls!

Thanks

Matthew

sorry, I broke fixlocalprefix with a syntax error in the comment, should be fixed now. The hard coded paths are also wrong here and in a few others. I fixed the paths to phpagi.php. There are other hardcoded paths that need to be dealt with, see ticket 2042.

Many thanks Philippe!

An amazingly quick response.

All working now.

Thanks again,

Matthew

Here is the problem line from fixlocalprefix:

define(“AGIBIN_DIR”, “/usr/share/asterisk/agi-bin”);

This should be pulled from the configuration in /etc/asterisk or whatever is defined for asterisk.

It having been hardcoded is why it did not function.

I would think this to be a bug. Please verify for me.

Thanks

I understand that placing the 1777+NXXXXXX should replace the 7 digit dialed number with a 11 digit number.

And from what your saying this should be work (I have never used 2.2 before all rules have been create by hand)

I place the rule into the dialplan for trunks and it should work.

But something is amiss. If I can create a rule that allows a full 11 digit dial to work but not this a this 7 digit replace.

Plus I can create a rule of NXXXXXX and it will dial out (it fails at the providers side, due to no area code)

So what makes this rule not match?

If there are dependencies for this rule it should be stated so in the tool tips and so on.

Thanks again.

nothing has changed wrt to route/trunk dialpatterns in 2.3 at this point. Take a look at the tooltips to help understand how it works as well as try the main forum (searching, posting for help).