In this scenario, a dial plan rule is used to remove the prefix used in source SIP extensions for calls received from a SIP trunk, so that it is not displayed to the recipients. This scenario can be combined with scenario 1 to have the source extensions displayed with no prefix when received by the recipients registered to SIP Server A.
- What do you want to do? Remove the prefix included in source SIP extensions when calls are received from a SIP trunk.
- 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. You also need to know the prefix used by the SIP trunk for its extensions.
- How can you do it? Create a rule that takes any call from a SIP trunk and remove the prefix used in the source SIP extension.
Example of the dial plan ruleThe 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 it will remove the prefix from source SIP extensions received from 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 TrunkSIPServerA to look for calls that will be originating from the SIP trunk.|
|E||Direction to||The field is set to local to route the calls to Sipelia™ Server.|
|F||Source||The regular expression is set to ^551(.*) to look for any source SIP extension that begins with prefix 551.|
|G||Destination||The regular expression is set to (.*), meaning that the call can be made to reach any SIP extension.|
The regular expression is set to \1, which indicates that the rule will use the value of the first regular expression group, which was defined in the Source value. This means that the prefix will be discarded and the source SIP extension becomes (.*).
|I||New destination||The regular expression (.*) is used. This means that the called extension remains unchanged.|
Once this dial plan rule is imported into Config Tool, any source SIP extension with prefix 551 received from TrunkSIPServerA will be displayed without the prefix to the recipients. For example, if a call received from the SIP trunk is made from extension 5513005, the recipient registered to Sipelia™ Server will only see 3005.