Inbound route pattern

Can any one tell me why the following pattern doesn’t work with CID under inbound routes?

_5551234[34]XX

I’m looking to create an inbound route based on this pattern so when I’m called from the following numbers (examples) routing is different from when called from other numbers:

05551234300
05551234411
05551234499

If I “hard code” one of the numbers the inbound route does work, so there seems something wrong in either the pattern or the inbound route just not accepting it.

555 doesn’t match 0555 (your _555… pattern).
_0555…

2 Likes

I have also tried 05551234[34]XX as pattern, this also doesn’t work. I have added _ in case the country number is included somehow.

Are you using?

_05551234[34]XX

_ indicates a pattern, you need it for pattern entries.

No, currently I’m using _5551234[34]XX

You need to use

_05551234[34]XX

To match 05551234…

Ok thanks that does work. But will it also match:

00125551234300

? So adding a country code and not having the first 0?

https://wiki.freepbx.org/display/PHON/Dial+Patterns

No, I have attached a link to the wiki, I recommend reading it as it will tell you what you need to do.

So what about _ what does that do? Don’t see it in the documentation.

Tested the following which does work: _X5551234[34]XX

I believe that you need
_.5551234[34]XX
though I haven’t tested it.

This would not match if a country code were present.

Nope, this doesn’t work. I’ll stick with _X5551234[34]XX which does.

__X5551234[34]XX will only work if there is one number (0-9) ahead of the 555, if you have multiple numbers ahead of the 555, that pattern will not work.

The underscore tells asterisk to treat the string as a pattern.

Here is a better explanation:
http://the-asterisk-book.com/1.6/einleitung-regex.html

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.