Local prefix rules let customers dial the same destination in familiar formats. MagnusBilling can normalize a number entered with a leading zero, an area code or only the local subscriber number before routing the call.
How a rule is written
Separate multiple rules with commas. Each rule has two or three parameters separated by a slash.
- First parameter: the value to replace. Use * to match any beginning.
- Second parameter: the value that replaces the first parameter or is added to the beginning.
- Third parameter (optional): apply the rule only when the dialed number has this many digits. Without it, the digit count is not considered.
Example: country code, area code or local number
For Brazil (country code 55) and São Paulo (area code 11), this rule accepts numbers beginning with 0 as well as local numbers with eight or nine digits:
- 0/55 replaces a leading 0 with 55, regardless of the total length.
- */5511/8 adds 5511 before any eight-digit number.
- */5511/9 adds 5511 before any nine-digit number.
0/55,*/5511/8,*/5511/9Also accept numbers that already include the area code
Add rules for ten- and eleven-digit Brazilian numbers:
- */55/10 adds country code 55 before a ten-digit number.
- */55/11 adds country code 55 before an eleven-digit number.
0/55,*/5511/8,*/5511/9,*/55/10,*/55/11Test before production
Replace country code 55 and area code 11 with the values required by your operation. Test local, mobile, national and already-normalized numbers on a test route before applying the rule to customers.
