We have been stumbling with this for too long, and as a result have double the dialing patterns that should truly be required.
This is related to NPANXXXXXX (US/CA) termination (outbound routes) only.
Due to the nature of US and Canada termination, a great many NPANXX have higher rates and therefor route differently than others.You also have to take in to count dialing or not dialing 1 before a number.
We have already optimized our patterns where possible: ie: 40321[023456789]XXXX
We have tried to use | as an OR option in FreePBX outbound route patterns, but it reports as invalid.
As such, the above example pattern is required twice (once for dialing 1+ and another for without 1+):
PREPEND:
PREFIX: 1
PATTERN: 40321[023456789]XXXX
PREPEND:
PREFIX:
PATTERN: 40321[023456789]XXXX
How can we have an OR in the pattern?
ie (so the pattern is accepted with or without the leading 1) :
PREPEND:
PREFIX: |1
PATTERN: 40321[023456789]XXXX
Your feedback/assistance is greatly appreciated.