8 Call Route Management
Outbound and inbound rules determine how PortSIP PBX routes call on the base of certain criteria. You can configure rules to control through which trunk a call will be placed, for example, to route the calls through your trunk on the basis of least cost routing.
You can also set DID (Direct Inward Dialing) numbers to allow you to bypass the receptionist or IVR and place calls directly to a user’s extension.
Many companies provide users and/or departments with "Direct or DID numbers", which allow their contacts to bypass the receptionist and make calls directly. DID numbers is also referred to as DDI numbers in the United Kingdom and MSN numbers in Germany.
Even if you make use of a virtual receptionist, a direct line or number is often preferable because it’s more convenient for the caller.
Direct dial numbers are easily implemented by using "Inbound Rules". DID numbers is provided by your trunk provider or phone company and are virtual numbers assigned to your physical lines. Usually, you are assigned a range of numbers. Please ask your Phone Company or trunk provider for more information about DID numbers.
You have to configure at least one trunk before adding the inbound rules.
To add the inbound rule:
- 1.Sign in to the PortSIP PBX Web Portal by "System Admin" credentials, click the menu "Tenants", select a tenant then click the "Manage" button to manage this tenant to configure the inbound rule. or sign a user who has the
Tenant Admin
permission into the Web Portal to manage that tenant. - 2.From the Web Portal, select "Call Manager > Inbound Rules", and click the "Add" button.
- 3.Enter a friendly name for the rule
- 4.CID Number Mask: you can enter the CID number mask here, which the PBX will use to identify the caller. You can add the number in its entirety, identify a single caller, or use the * as a wildcard. For example,
0044**********
will identify a UK Caller and004420********
will identify a caller from London. Note: the*
digits must match the number actually digits. If the number is 3 digits, then should use***
.- The CID number mask also allows setting as a number range, for example
00442012345670-00442012345680
. - The CID number mask can be empty
- 5.In the trunk box, select which trunk you wish to be associated with this DID and inbound rule, only allow assign one provider with an inbound rule.
- 6.In the "DID/DDI Number Mask" field, enter the DID number as it will appear in the SIP "To" header (The number your trunk provider has been applied as your main, or first, DID number). PortSIP PBX will match the number inserted into this field with the "To" header of the
SIP INVITE
message which is trunk sends to PBX- The DID number can be a single number like
442012345678
- The DID number can be serial numbers range, for example:
3325261000-3325262000
,442012345600-442012345800
. - The single DID number or serial numbers range must be in the trunk DID pool range.
- The DID number and DID pool cannot begin with “+”, “0”, or “00"; if your DID number or DID pool begins with "+", "0", or "00", please remove them before entering.
- 7.Specify how you wish to forward incoming calls according to this inbound rule.
- Forward to number: permits you to enter a number and then forward the call to that number; the number can be an extension number or system extension number(ring group, virtual receptionist, meeting number, queue number) or a PSTN phone number. The number can also be a range, for example:
2000-3000
. If set "Forward to number" field as a range, this range must be serial numbers, and the "DID Number Mask" also must be a number range and both range sizes must be equal. For example, in "DID Number Mask" field fill in as442012345600-442012345800
, in "Forward to number" field set the value as1100-1300
, if the call from the trunk is to442012345600
, the PBX will route that call to the extension1100
; if the call from the trunk is to442012345698
, the PBX will route that call to the extension1198
, that's 1:1 mapping. - Forward to voicemail: The call will be routed to the voicemail service so that the caller can leave a voice message. There is an option to select an extension number for the voicemail box. For example, if you select extension 108, the voicemail will be saved in the 108's mailbox.
- Hangup: The call will be terminated by the PBX.
- 8.You can specify that an incoming call should be forwarded differently if it is received outside office hours.
- 9.you can set an inbound rule to route bulk DID numbers to bulk extensions. See above point 7.
On the "Office Hours" page, you can set the office hours for the inbound rule so that the incoming calls will be routed to different destinations on the basis of the current hour.
If "Use default Global Office Hours" is selected, the PBX will use the office hours specified by Tenant Admin;
If "Use specific Office Hours" is selected, customized office hours rules apply instead.
You can create multiple inbound rules based on the same DID number with a trunk, but all these inbound rules must have a different CID number mask.
Example: You have the DID
00442012345670
. Create two inbound rules: the CID for the first rule is 0044**********
, the DID number mask is 442012345670
, and the call is routed to "Queue 8000"; The CID for the second rule is 0033*********
, the DID number mask is 442012345670
, and the call is routed to "Queue 9000".Now let all English-speaking employees be agents of "Queue 8000", and let all French-speaking employees be agents of "Queue 9000". When the caller calls "00442012345670", callers from the UK will be routed to call queue 8000 to talk with an English agent, and callers from France will be routed to call queue 9000 to talk with a French agent.
Assuming a huge corporation with 1,000 employees and has purchased 1,000 DID numbers from a trunk service provider, serial numbers are used in these DID numbers. If you assign a DID number to each employee, your clients can reach them by dialing their DID number. However, this is an almost hard assignment because 1,000 inbound rules must be created to route 1,000 DID numbers to 1,000 extensions (each employee is an extension).
PortSIP PBX has a great feature that allows you to implement your objective with just one inbound rule.
Assuming the DID numbers are "0012012345001-0012012346000", and the employees' extension numbers are "1001-2000".
- 1.Create an inbound rule, and set the "DID Number Mask" field to "12012345001-12012346000".
- 2.Confiture the call route destination to "1001-2000"
If someone dials "0012012345001", the call will be routed to extension "1001", and if dials "0012012345005" the call will be routed to extension "1005".

An outbound rule decides through which trunk an outbound call would be placed. The rule is decided by the user/extension who is making the call, the number that is being dialed, the length of the number, or the user group to which the caller belongs.
To add outbound rules:
- From the PortSIP PBX Web Portal menu, navigate to "Call Manager > Outbound Rules" and click the "Add " button. Enter a name for the new rule in the field.
- Priority: set the priority for the outbound rule. If a call meets multiple outbound rules, a lower priority number has a higher level of priority.
- Specify the criteria that should be matched for this outbound rule to be triggered. In the "Apply this rule to below calls" section, specify any of the following options.
- Calls to numbers started with prefix: Apply this rule to all calls started with the number you specify. For example, entering "00" to specify that all calls with numbers starting with 00 should trigger this rule. Callers should dial "00xxx" to trigger this rule. You can specify more than one prefix, separated by ";". For example, "00;123;88" specifies prefixes "00" and "123" and "88". If the called number matches one of these prefixes, this rule will be triggered.
- Calls from extension(s): Select this option to define a particular extension or extension range for which this rule applies. Specify one or more extensions separated by semicolons, or specify a range by using a "-". For example 100-120.
- Calls to numbers with certain digits: Select this option to apply the rule to numbers with a particular digit length, for example, 8 digits. By this method, you can capture calls to local area numbers or national numbers without requiring a prefix.
- Calls from extension group(s): Rather than specifying individual extensions, you can select a user group.
- Now specify how to match outbound calls with the criteria. The "Make outbound calls on" section, allows select up to three routes for the call. Each defined trunk will be listed as a possible route. If the first route is not available or busy, PortSIP PBX will automatically try the second route. You can drag and drop the route to adjust the priority.
- You can transform the number that matches the outbound rule before the call is routed to the selected gateway or provider by using the "Strip Digits" and "Prepend" fields:
- Strip digits: This allows you to remove one or more digits from the called number. Use this option to remove the prefix before a call is dialed to the trunk, or provider if it is not required. For example, if the extension makes the call to 002345, if you specify to remove two digits, the prefix "00" will be removed before it is routed
- Prepend: this allows you to add one or more digits at the beginning of the number if this is required by the provider or gateway. For example, if the extension makes the call to 002345, we specify 2 in the "Strip digits" field and set "Prepend" to "+44", the final called number that PBX forward to VoIP provider/SIP Trunk will be
+442345
On the "Office Hours" page, you can set the office hours for the outbound rule so that the outgoing call will be routed to trunks or not depending on the current hour.
For example, if the current time is out of the specified office hours, the call fails even if the outbound rule is successfully matched.
If selected "Use default Global Office Hours", the PBX will use the office hours set by "Tenant Admin". If selected "Use specific Office Hours", this outbound rule will use the customized office hours.
Last modified 1mo ago