In this scenario, dial plan rules are used to define a range of SIP extensions for calls that must always reach the recipients, while other SIP extensions are automatically forwarded to a new destination. This can be useful to route calls from SIP intercoms to a call center during the night for example.
Scenario
- What do you want to do? During off-hours for example, calls made to SIP extensions between 4000 and 4500 must be routed normally to the requested recipients, while other calls must be forwarded to extension 1001, which can be the extension of a SIP endpoint (or SIP client) in a security office for example.
- What you need to do before defining the rule? Define the range of SIP extensions that must always be routed and the specific SIP extension to which other calls will be forwarded. You also need to have a schedule defined in Security Center to be used in the dial plan rule.
-
How can you do it? You need to define two separate rules listed in the right
order in your dial plan:
- The first rule looks for any call made to reach SIP extensions between 4000 to 4500, and route them normally.
- The second rule will take calls to any other SIP extension and forward them to extension 1001.
Example of the dial plan
The following is an example of a dial plan that accomplishes the above mentioned scenario.- Scenario6-NightRoutingNormal;DB3ABC7D-FD1B-4A92-A392-4408404F7D7B;ON;local;local;(.*);\b0*4([0-4][0-9]{2}|500)\b;(.*);(.*);
- Scenario6-NightRoutingSpecial;DB3ABC7D-FD1B-4A92-A392-4408404F7D7B;ON;local;local;(.*);(.*);(.*);1001;
Rule 1: Normal night routing
The first rule listed in the dial plan shown below tells Sipelia™ Server to look for destination SIP extensions between 4000 and 4500, and route them normally.
The value labels identified below correspond to the column labels which appear on the Dial plans page of the Sipelia plugin role.
Value letter | Value label | Description |
---|---|---|
A | Name | The name of the rule indicates that the calls are routed normally. |
B | Schedule | The schedule is set to Off-hours, meaning that the rule will be applied only during that time. |
C | Status | The status is set On, meaning that the rule is currently active. |
D | Direction from | The field is set to local to look for calls that will be originating from Sipelia™ Server. |
E | Direction to | The field is set to local because the calls will remain local to Sipelia™ Server when the rule is applied. |
F | Source | The regular expression is set to (.*), meaning that the call can be made from any SIP extension. |
G | Destination | The regular expression is set to \b0*4([0-4][0-9]{2}|500)\b,
meaning that Sipelia™ Server must
look for called SIP extensions between 4000 and 4500, as described below:
|
H | New source | The regular expression (.*) is used. This means that your extension (the source caller) on Sipelia™ Server remains unchanged. |
I | New destination | The regular expression (.*) is used. This means that the called extension remains unchanged. |
Rule 2: Special night routing
The second rule listed in the dial plan and shown below tells Sipelia™ Server to look for any call that does not match the first rule, and forward it to extension 1001.
The value labels identified below correspond to the column labels which appear on the Dial plans page of the Sipelia plugin role.
Value letter | Value label | Description |
---|---|---|
A | Name | The name of the rule indicates that the calls are following a special route. |
B | Schedule | The schedule is set to Off-hours, meaning that the rule will be applied only during time. |
C | Status | The status is set On, meaning that the rule is currently active. |
D | Direction from | The field is set to local to look for calls that will be originating from Sipelia™ Server. |
E | Direction to | The field is set to local because the calls will remain local to Sipelia™ Server when the rule is applied. |
F | Source | The regular expression is set to (.*), meaning that the call can be made from any SIP extension. |
G | Destination | The regular expression is set to (.*), meaning that the call can be made to reach any SIP extension. |
H | New source | The regular expression (.*) is used. This means that your extension (the source caller) on Sipelia™ Server remains unchanged. |
I | New destination | The regular expression 1001 is used. This means that the call will always be forwarded to SIP extension 1001. |
Result
- When the schedule is satisfied, if any SIP extension dials a number between 4000 and 4500, the call will remain local to Sipelia™ Server and will be routed normally to the requested recipient.
- When the schedule is satisfied, if any SIP extension dials any other number, the call will automatically be forwarded to SIP extension 1001.