You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

 

 

When you set one line manually you have to “cut”  called number in Gateway group to the pattern that you defined in “Inbound routes”.

If phone number is 02871 2397567 and you want  to let pass only last 3 digits (567) to extension 12, you have to cut off  02871 2397 and in "Inbound routes" set "Pattern" to ^(567) and "Target" to 12.

There are several forms how number can come from provider, depending on the provider. That's why you have to check all possibilities.

 

 

 

 

Prefix    

 

City prefix

 

Number 

 Comment

 

 

 

 0049

 

 2871

 

 2397   

 

 567

Called number 0049 2871 2397567

 

 

 

+49

 

 2871

 

 2397   

 

 567

Called number +49 2871 2397567

 

 

 

 49

 

 2871

 

 2397    

 

 567

Called number 49 2871 2397567

 

 

 

0

 

  2871

 

 2397   

 

 567

Called number 02871 2397567

 

 

 

 

 

 

 

 2397

 

 567

Called number 2397567

 

 

(?:

0049|\+49|49|0

)? 

 

 

   

 

 

It will be checked if 0049 or +49 or 49 or 0 is part of incomming number.

If yes, this part will be cut off.

 

(?:

 

 

 

2871

)?

 

 

 

It will be checked if 2871 is part of incomming number.

If yes, this part will be cut off.

^(?:

 

 

 

 

 

 

2397

)?

 

 It will be checked if 2397 is part of incomming number.

If yes, this part will be cut off.

 

 

 

 

 

 

 

 

 

(.*)

All numbers, who are still there, they will be saved in $1

^(?:

(?:

(?:

0049|\+49|49|0

)?

2871

)?

2397

)?

(.*)

Expression.

                                      ^(?: ( ?: (?: 0049|\+49|49|0)?2871)? 2397 )?(.*)    567 will be saved in $1 and compared to the pattern in "Inbound routes".

 

 

 

If you want to use complete number 2397567 in “Inbound routes”.

 

That should look like this:

 

 

 

Prefix

 

City prefix

 

Number

Comment

 

 

0049

 

2871

 

 2397567

Called number 0049 2871 2397567

 

 

+49

 

2871

 

 2397567

Called number +49 2871 2397567

 

 

49

 

2871

 

 2397567

Called number 49 2871 2397567

 

 

0

 

2871

 

 2397567

Called number 02871 2397567

 

 

 

 

 

 

 2397567

Called number  2397567

 

(?:

0049|\+49|49|0

)?

 

 

 

It will be checked if 0049 or +49 or 49 or 0 is part of incomming number.

If yes, this part will be cut off.

^(?:

 

 

 

2871

)?

 

It will be checked if 2871 is part of incomming number.

If yes, this part will be cut off.

 

 

 

 

 

 

(.*)

All numbers, who are still there, they will be saved in $1

^(?:

(?:

0049|\+49|49|0

)?

2871

)?

(.*)

Expression.

                        ^( ?: (?: 0049|\+49|49|0)?2871)?(.*)                      2397567 will be saved  in $1 and compared to the pattern in "Inbound routes".

 

 

Explanation:

(.*) – all numbers which still are there

$1 – is variable, in this variable will be saved all from (.*)

(?:XXXXX)? – means if XXXXX exist this part will be “cut”.

| – is "or"

 

  • No labels