A
Backgrounds
This document shows a demo about how to set traffic distribution routing on device.Users insert different carriers' sim cards and want to implement the traffic distribution on the device.
Environment and Prepartions
The file set a demo.Port 0-3 insert SIM cards belong to ChinaMobile, the port 4-7 insert ChinaUnicom SIM card , When traffic coming ,the destination number is ChinaMobile(138xxxxxxxx or 159xxxxxxxx) go to ChinaMobile SIM card. And the destination number is ChinaUnicom(130xxxxxxxx or 131xxxxxxxx) go to ChinaUnicom SIM card. The following picture shows the Sims information .

Operations
1.Add port groups
Click Call Configuration > Port Group Configuration. Add two port groups, including port 0-3 named ChinaMobile, port 4-7 named ChinaUnicom.As the pictures are shown


2.Add Routes
Click Call Configuration > IP->Tel. Modify the default rule as follow picture.
[Forward to port group ChinaMobile]

The setting means if the destination number prefix is 138 or 159 , it will forward to port group ChinaMobile.
[Forward to port group ChinaUnicom]
Add a new rule as follow picture.

It means if the destination number prefix is 130 or 131 , it will forward to port group ChinaUnicom.
After configuring, you can see the two routes in the device GUI.

The destination prefix, we base rule of digital map:
1. Supported objects
Digit: A digit from "0" to "9".
Timer: The symbol "T" matching a timer expiry.
DTMF: A digit, a timer, or one of the symbols "A", "B", "C", "D", "#", or "*".
2. Range []
One or more DTMF symbols enclosed between square brackets ("[" and "]"), but
only one can be selected.
3. Range ()
One or more expressions enclosed between round brackets ("(" and ")"), but
only one can be selected.
4. Separator
|: Separated expressions or DTMF symbols.
5. Subrange
-: Two digits separated by hyphen ("-") which matches any digit between and
including the two. The subrange construct can only be used inside a range
construct, i.e., between "[" and "]".
6. Wildcard
x: matches any digit ("0" to "9").
7. Modifiers
.: Match 0 or more times.
+: Match 1 or more times.
?: Match 0 or 1 times.
9. Modifiers
^m: Match any string beginning with m.
m$: Match any string endding with m.
m{X}: Match a string contains exactly X times of m.
m{X,}: Match a string contains X or more times of m.
m{X,Y}: Match a string contains between X and Y times of m.
Example:
Assume we have the following digit maps:
1. xxxxxxx | x11
and a current dial string of "41". Given the input "1" the current dial
string becomes "411". We have a partial match with "xxxxxxx", but a
complete match with "x11", and hence we send "411" to the Call Agent.
2. [2-8] xxxxxx | 13xxxxxxxxx
Means that first is "2","3","4","5","6","7" or "8", followed by 6 digits;
or first is 13, followed by 9 digits.
3. (13 | 15 | 18)xxxxxxxxx
Means that first is "13","15" or "18", followed by 8 digits.
4. [1-357-9]xx
Means that first is "1","2","3" or "5" or "7","8","9", followed by 2 digits.