Trunk management with 3CX
Zero Admin
With the new Dashboard
Bulletproof Security
With SSL certs and NGINX
Install on $200 Appliance
Intel MiniPC architecture
New, Intuitive Windows Client
More themes, more UC
More CRM Integrations
Scripting Interface to add your own
Improved Integrated Web Conferencing
iOS and Android apps included
Run On-Premise or in the Cloud
Google, OVH, Windows & Linux

Trunk management with 3CX

Trunk Management

On this topic

Trunk Management

Introduction

Creating Outbound Call Rules

Creating DID Numbers / Inbound Rules

Adding DID’s

Configuring Different Office Hours per DID

Troubleshooting DID Numbers

Exporting & Importing DIDs

Exporting DIDs

Importing DIDs

Caller ID Reformatting (Caller ID Re-Write)

See Also

Introduction

Outbound and inbound rules dictate how 3CX Phone System routes calls based on certain criteria. You can, for example, configure rules to control through which VoIP gateway or provider a call will be placed through, based on least cost routing, so that local calls go through your ISDN lines and international calls through your VoIP provider. You can also create DID (Direct Inward Dialing) numbers which will allow you to place calls directly to a user’s extension, bypassing the receptionist or IVR.

Creating Outbound Call Rules

An outbound rule denotes through which VoIP gateway/provider an outbound call should be placed. Based on who is making the call, the number that is being dialled or the length of the number.

When configuring a VoIP Gateway or a VoIP Provider, you will be asked to create an outbound rule that will be used to route calls to the Gateway or Provider. You can also edit these rules or create new ones from the outbound rules node.

To create an outbound rule:

  1. From the 3CX Management Console menu under select Outbound Rules” > “Add Outbound Rule”, and enter a name for the new rule.
  2. Specify the criteria that should be matched for this outbound rule to be triggered with. In the “Apply this rule to these calls” section, specify any of the following options:
  • Calls to numbers starting with prefix – Apply this rule to all calls starting with the number you specify. For example, enter 9 to specify that all calls starting with a 9 are outbound calls and should trigger this rule. Callers should dial “9123456” to reach number “123456”.
  • Calls from extension(s) – Select this option to define a particular extension or extensions range for which this rule applies. Specify one or more extensions separated by commas, or specify a range using a -, for example 100-120.
  • Calls to Numbers with a length of – Select this option to apply the rule to numbers with a particular digit length, for example 8 digits. This way you can capture calls to local area numbers or national numbers without requiring a prefix.
  • Calls from extension group – Rather than specifying individual extensions, you can select an extension group.
  1. Now specify how outbound calls matching the criteria should be handled. In the “Make outbound calls on section, select up to three routes for the call. Each defined gateway or provider will be listed as a possible route. If the first route is not available or busy, 3CX Phone System will automatically try the second route.

The alternative Outbound Routes will have to be configured in order for calls to take these routes, when the first is unavailable. By default the second and third routes Block Calls.

  1. You can transform the number that matches the outbound rule before the call is routed to the selected gateway or provider using the Strip Digits and Prepend fields:
  • Strip digits – Allows you to remove one or more digits from the called number. Use this to remove the prefix before a call is dialled on the gateway or provider if it is not required. In the example above, you would specify to remove one digit, in order to remove the prefix “9” before it is dialled.
  • Prepend – Allows you to add one or more digits at the beginning of the number if this is required by the provider or gateway.
  1. You can configure these options per outbound rule, since a rule that applies to a VoIP gateway connected to the local PSTN would normally require different criteria than a rule that applies to a VoIP Provider.

See our Outbound Rules – A Complete Example of how to create an outbound rule in 3CX Phone System.

Creating DID Numbers / Inbound Rules

Many companies provide users and/or departments with “Direct or DID numbers”, which allow their contacts to call them directly, bypassing the receptionist. DID numbers are referred to as DDI numbers in the United Kingdom and as MSN numbers in Germany. Even if you make use of a digital receptionist, a direct line / number is often preferable because it’s more convenient for the caller.

Direct dial numbers are easily implemented using “Inbound Rules”. DID numbers are provided by your VoIP provider or Phone Company and are virtual numbers assigned to your physical lines. Usually you are assigned a range of numbers, which are linked to an existing BRI/T1/E1. There will be an extra charge per number or per range, but this will be a fraction of the cost of adding physical lines. Enquire with your Phone Company or VoIP provider for more information about DID numbers.

Adding DID’s

To add a DID:

  1. From the 3CX Management Console, select  “Inbound Rules” > “Add DID.
  2. Enter a name for the DID (for example Sales). Note: The DID name can be prepended or appended to the Caller ID so as to identify on which number a caller has called you from. You can enable this from the “Settings” > “General” > “Global options” page under “Inbound name to Caller ID”.
  3. Under the new “Inbound Rule”, the “Inbound Rule Type” allows you to  choose between a DID/DDI or caller ID number mask.
  4. In the “DID/DDI Number/mask” field, enter the DID number as it will appear in the SIP “to” header (The number your provider has supplied as your main, or first, DID number). 3CX Phone System will match the number inserted in this field with the “to” header, starting from the last part of the received string, thus avoiding any differences in the format of the number. For example, if you are based in the UK and your DID number is 0845-2304024, then you can enter the number *2304024. This will match any DID number inserted in the “to” field ending with these numbers, including +448452304024, 08452304024, 00448452304024, and, of course, *2304024.
  5. Select for which Gateway or Provider ports you wish to add this DID to. If the DID number is associated with multiple ports, then you must select each port. An inbound rule will be created for each port that you select.
  6. Specify where you wish to direct calls made to this DID:
  • End Call
  • Connection to extension
  • Connect to Queue/Ring Group
  • Connect to Digital receptionist
  • Voicemail for extension
  • Forward to outside number
  • Send fax to email of extension
  1. You can specify that an incoming call is routed differently if it is received outside office hours. De-select the “Same as during office hours” option to specify a different route.
  2. Click “OK” to create the DID / Inbound rule.

Configuring Different Office Hours per DID

Businesses working globally across different time zones, will want to configure different office hours and holidays per DID.

To do this:

  1. From the 3CX Management Console menu, click “Add” > “DID / Inbound route”.
  2. Give the rule a descriptive name. This will be used to identify which DID has been used when troubleshooting, as it can be seen in the logs. It will also be used for identifying which DID is being used to to make the call, and will be displayed in the Caller ID of the destination phone. This option can be selected, in the Global Options, to prepend the name of the DID.
  3. In the DID number/mask type in the number. This can be a whole number, or a wildcard, both formats will be considered for processing. For example 1235551234 or *234.

  1. Choose the provider/gateway port. This is used to identify over which line the call will be coming in from. A VoIP provider will only have one available port. A VoIP (PSTN) Gateway, will have one port for each physical line, depending on the make and model. FXO gateways for example will have one port for each line. E1/T1 gateways will only have one port per gateway.

  1. In order to enable custom DID opening hours, uncheck the “Apply the same routing logic Outside of office hours” box.

  1. Choose where you want to route out of office hours calls in the “Outside Office Hours” section.

  1. Check “Set up Specific Office Hours”. This option will only be enabled if you disable “Apply the same routing logic Outside of office hours”. Click “Set up Specific Office Hours” to open up the dialog box.

  1. Set your office hours and click “OK”.
  2. Check “Play Holiday Prompt on Public Holiday” to play the holiday prompt whenever there is a holiday.
  3. Click “OK” to accept the configuration of both the routing of the call as well as the opening hours of the DID.
  4. Go to the “Settings” node > “General”.

  1. In the “Office Hours” section click on “Configure Holidays”. This will open up a special dialog box, where you can define holidays and record or select pre recorded .wav files to play for the holidays.

  1. Give the Holiday a name, for example, “New Year”.
  2. Choose the date for the holiday, for example 1 January. Since New Years Day recurs every year, you can choose “each” instead of a year. Holidays with a steady date each year can be defined like this. Dates which do not have a steady date each year can be defined as and when a holiday occurs, for example a bank holiday, you can define the current year or the next year.
  3. Choose a prompt to play for the Holiday. Click “Add”.
  4. Choose a prompt from the list of files already in the repository, and click “OK”.
  5. Click “Add” to add the holiday and prompt to the PBX.
  6. Click “OK” to exit the holiday configuration
  7. Click “OK” in the General Settings to save the configuration.

Troubleshooting DID Numbers

If you have created the DIDs, but calls are not being forwarded as expected, do the following:

  1. Go to the Server Activity log node in the 3CX Management Console. The Server Status screen lists current server activity and logs calls that are being received and for which number they were received on.
  2. Call the DID number that you configured, and monitor the Server Status log. You will see a line similar to:
    Incoming call from 1000 to <sip:789456123@3CXPhone System>
    where “1000” is the internal number of the line configured to receive calls from the VoIP Gateway or VoIP Provider and <sip:789456123@3CXPhone System> is the content of the “To” header of the INVITE, i.e. the intended recipient. (Note logging level should be set to Medium or Verbose to see additional messages.)
  3. Now analyse the To header carefully and ensure that the DID number you have dialled is present in the To header: <sip:789456123@3CXPhone System>.
  4. If you see a text ‘Review invite & adjust source identification’, you need to configure Source identification. See the chapter Configuring a VoIP Provider / SIP Trunk for more information.

Exporting & Importing DIDs

Exporting DIDs

If you need to export your Inbound Rules to a .CSV file format to either save them as backup or to make changes to them, follow these steps:

  1. Log into the 3CX Management Console.
  2. Click on the “Inbound Rules” node and select the DID’s that you want to export.
  3. Click on the “Export” button to begin exporting your DID rules.
  4. Select a location and a file name for your exported DID rule file and click Save. Your rules will be exported and saved in the CSV file.

Importing DIDs

If you want to create multiple DID rules you can do so by creating the necessary fields on a CSV file using the correct format, then importing them back into 3CX by using the import function.

To import your DIDs into 3CX from a CSV file follow these steps.

  1. Log into the 3CX Management Console.
  2. Click on the “Inbound Rules” node and click on the “Import” button.
  3. Browse to the file that contains the DID rules that you want to import, select it and click “Open”.
  4. The rules will be imported in 3CX Phone System.

See Creating and Importing DIDs for more information.

Caller ID Reformatting (Caller ID Re-Write)

Here you can find more information about Caller ID Reformatting 

See Also

You might also be interested in:

<