Inbound route pattern


#1

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.


(Communication Technologies) #2

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


#3

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.


(Communication Technologies) #4

Are you using?

_05551234[34]XX

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


#5

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


(Communication Technologies) #6

You need to use

_05551234[34]XX

To match 05551234…


#7

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

00125551234300

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


(Communication Technologies) #8

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.


#9

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

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


#10

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

This would not match if a country code were present.


#11

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


(Communication Technologies) #12

__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.


(Lorne Gaetz) #13

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


(Communication Technologies) #14

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


(system) closed #15

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