Dial plan scenario 1: Forwarding to a SIP trunk all calls starting with a prefix - Sipelia™ 2.6

Sipelia User Guide 2.6

series
Sipelia™ 2.6
revised_modified
2017-11-13

In this scenario, a dial plan rule is used to route to a SIP trunk any call that begins with a specific prefix.

Scenario

  • What do you want to do? Your SIP extension is registered to Sipelia Server and you need to connect to SIP Server A because you want to call SIP extensions (SIP client, SIP intercom, etc.) that are registered to that SIP trunk. Doing so allows you to establish a one-way communication with SIP Server A.
  • What you need to do before defining the rule? Add a SIP trunk in Config Tool for SIP Server A and name it TrunkSIPServerA. This trunk name must be unique, so that the dial plan rule that you will create will not conflict with other rules, and your rule will be applied correctly.
  • How can you do it? To route calls to TrunkSIPServerA, you can use a dialing prefix; for example, the prefix 780. This means that SIP extensions on Sipelia Server must dial this prefix if they want to call SIP extensions on TrunkSIPServerA. The prefix approach mimics that of dialing 9 to get an outside line in a typical PBX system. The prefix can be any number that you want, as long as it is defined in your dial plan rule.

Example of the dial plan rule

The following is an example of a dial plan rule that accomplishes the above mentioned scenario.

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 calls made from Sipelia Server and starting with a prefix will be routed to the SIP trunk.
B Schedule The schedule is set to Always, meaning that the rule will always be verified.
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 TrunkSIPServerA because calls will be routed to the SIP trunk.
F Source The regular expression is set to (.*), meaning that the call can be made from any SIP extension registered to Sipelia Server. If you choose to enter a specific SIP extension, make sure that the regular expression corresponds to the caller's extension.
G Destination

The prefix ^780 is used. This means that SIP extensions on Sipelia Server must first dial 780 to be able to communicate with TrunkSIPServerA. Furthermore, the prefix is followed by the regular expression (.*) This regular expression creates a regular expression capturing group for all digits that follow the prefix.

Example: If you want to call extension 1001 on TrunkSIPServerA, you must dial 7801001. The regular expression (.*) creates a group index of extensions that begin with 1. As a result, the extension 1001 is included in this index. If you call 7801002, the extension 1002 will also be included in this index.

H New source

The regular expression (.*) is used. This means that the caller's extension on Sipelia Server remains unchanged.

Example: If the source extension registered on Sipelia Server is 6001, the dial plan rule will not cause it to change. With this rule, the same applies to all other registered extensions on Sipelia Server. However, if you enter a New source value of 7001, and you make a call from your extension (6001), the recipient sees that the incoming call is coming from extension 7001, not 6001.

I New destination

Because the New destination value is linked to the Destination field, the \1 indicates that the rule must use the value of the first regular expression group of Destination. In this scenario, the Destination value is 780(.*), so using \1 will correspond to (.*) which is actually the destination SIP extension without the prefix.

Result

Once this dial plan rule is imported into Config Tool, if any SIP extension registered to Sipelia Server dials 7801001, the extension 1001 on SIP Server A will ring.