configuring simple route - blue

5
6/1/13 Configuring Simple Route - blue.box - Confluence wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 1/5 Configuring Simple Route New route configuration In this example we will make a new call route that will match calls to destinations that begin with the number 1. We will also tell the system to strip down that first digit (in this example it's 1). Since Simple Route module supports both Short Hand and Regex digit matching we will show you both configurations. Also at the bottom of the page we will describe some other matching patterns. 1. The Simple Route main page (Picture 1) shows all the currently available (sample data installation) routes. Click on the Add Route button to open the Create Simple Route page. Picture 1 2. On the Create Simple Route page (Picture 2) we will name the route Dial 1 out. 3. Route description is External calls. 4. Since there are two types of supported matching patterns we will show them both in this example, but you can only choose one of them. 5.1. If you have selected Short Hand route type then, in the Pattern 1 field, enter 1(X.) as shown on Picture 2. 5.2. If you have selected Regex route type then, in the Pattern 1 field, enter ^1(\d+)$ as shown on Picture 3. You can find more information and descriptions about both pattern expressions in the last sections of this page. 6. Click on the Save button to save the new route.

Upload: addo

Post on 30-Nov-2015

145 views

Category:

Documents


0 download

DESCRIPTION

Configuring Simple Route - Blue

TRANSCRIPT

Page 1: Configuring Simple Route - Blue

6/1/13 Configuring Simple Route - blue.box - Confluence

wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 1/5

Configuring Simple Route

New route configuration

In this example we will make a new call route that will match calls to destinations that begin with the number 1.

We will also tell the system to strip down that first digit (in this example it's 1).

Since Simple Route module supports both Short Hand and Regex digit matching we will show you both configurations.

Also at the bottom of the page we will describe some other matching patterns.

1. The Simple Route main page (Picture 1) shows all the currently available (sample data installation) routes.

Click on the Add Route button to open the Create Simple Route page.

Picture 1

2. On the Create Simple Route page (Picture 2) we will name the route Dial 1 out.

3. Route description is External calls.

4. Since there are two types of supported matching patterns we will show them both in this example, but you can only choose one of

them.

5.1. If you have selected Short Hand route type then, in the Pattern 1 field, enter 1(X.) as shown on Picture 2.

5.2. If you have selected Regex route type then, in the Pattern 1 field, enter 1̂(\d+)$ as shown on Picture 3.

You can find more information and descriptions about both pattern expressions in the last sections of this page.

6. Click on the Save button to save the new route.

Page 2: Configuring Simple Route - Blue

6/1/13 Configuring Simple Route - blue.box - Confluence

wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 2/5

Picture 2

Page 3: Configuring Simple Route - Blue

6/1/13 Configuring Simple Route - blue.box - Confluence

wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 3/5

Picture 3

You can see the new route on the Simple Route main page (Picture 4).

Page 4: Configuring Simple Route - Blue

6/1/13 Configuring Simple Route - blue.box - Confluence

wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 4/5

Picture 4

Matching patterns

When adding or editing a route via Connectivity/Simple Route the following apply to a route type of regex

When adding or editing a route via Connectivity/Simple Route the following apply to a route type of short hand.

These are basic regex patterns. More examples of freeswitch regexs can be found at http://wiki.freeswitch.org/wiki/Regular_Expression ---------------------------------------------------------------- ̂ - beginning of a regular expression (required)( - beginning of a regular expression block - blocks are important to define inner expressions so they can be referenced by the variables $1, $2, $3, etc\+1|1? - indicates an optional digits '+1' or '1' (the ? sign defines the literal as optional)) - closes the block5 - matches the literal number '5'00|22|44 - matches 00 or 22 or 44, the | sign is the OR operator [1-6] - matches one number in the range from 1 to 6 (1, 2, 3, 4, 5, and 6), the [] pair defines a range (other range examples: [0-9] matches 0 to 9; [a-z] matches a, b, c, ..., z) \d - matches any valid digit (same as [0-9]){4} - defines a number of occurrences for the previous definition i.e. exactly 4 digits in the range 0-9 variable number of occurrence, for example to match a sequence of 2 to 8 digits: {2,8}, or to match at least $ - end of the regular expression (required)---------------------------------------------------------------- Example 1 --------------------------------------------------------------- Pattern = ̂(\d{8})$ Number Dialed = 83759374 As Sent to Trunk = {trunk_prepend}83759374 --------------------------------------------------------- In this case you must dial an 8 digit number, to match the route. Example 2 --------------------------------------------------------------- Pattern = ̂9(\d{10})$ Number Dialed = 95558675309 As Sent to Trunk = {trunk_prepend}5558675309 --------------------------------------------------------- In this case you must dial 9 first, then exactly 10 digits. 9 will NOT be sent to the trunk.

Page 5: Configuring Simple Route - Blue

6/1/13 Configuring Simple Route - blue.box - Confluence

wiki2.2600hz.com/display/bluebox/Configuring+Simple+Route 5/5

Patterns---------------------------------------------------------------- X,A matches any digit from 0-9 P matches any digit from 0-8 Z matches any digit from 1-9 N matches any digit from 2-9 [1237-9] matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9) . wildcard, matches one or more characters ! wildcard, matches zero or more characters immediately ( ) Creates the number group used to dial out ? makes the preceding number optional Important Notes --------------------------------------------------------------- -> Use the parentheses to group the numbers you want to use for outbound dialing. If you do not have a group the entire pattern will be used. -> For convience you may place spaces in the patterns, these will be removed for you -> If you are are attempting to include any of the above pattern charaters (such as X), you must escape it via \ example \X. -> All patterns must be provided as uppercase (where appropriate) Example 1 --------------------------------------------------------------- Pattern = 1?(XXXXXXXXX) Number Dialed = 15558675309 As Sent to Trunk = {trunk_prepend}5558675309 --------------------------------------------------------- In this case the first 1 is optional (as indicated by the explanation point after it) and if present is outside the number groups used to send to the trunk. Example 2 --------------------------------------------------------------- Pattern = 91?(XXXXXXXXX) Number Dialed = 95558675309 As Sent to Trunk = {trunk_prepend}5558675309 --------------------------------------------------------- In this case you must dial 9 first, then an optional 1 followed by exactly 10 digits. Both the 9 and, if present, the 1 will NOT be sent to the trunk.