Setting up SIP Trunk for International and National Calls

INTRODUCTION

SIP trunks are a VoIP service that can be provided from an ITSP (Internet Telephony Service Provider) to extend telephony features beyond IPPBX local area. SIP trunks can carry voice calls, video calls, instant messages, multimedia conferences, and other SIP-based, real-time communications services. Using SIP trunks helps to reduce call rates especially when making long distance calls, since VoIP providers can offer better calling rates compared to local ISP using analog lines. UCM6xxx series support two types of SIP trunks: “Register SIP trunks”, mainly used to connect with provider’s trunk and “Peer trunks”, that can be used to interconnect multiple IP-PBXs. UCM6xxx series support up to 200 SIP trunks. This guide describes needed configuration to set up register trunk (with provider) and peer trunk (between two UCM6xxx).

The figure above shows a typical scenario using two UCM6xxx between main and branch offices (connected via peer trunk), and main office UCM6xxx connected to provider via register SIP trunk.

REGISTER SIP TRUNKS

In this guide, we will take company ABC as example. The company has purchased two SIP trunks; the first one will be used for International calls, while the second will be used of national ones. The ITSP provider gave following trunk information to the company ABC in order to register their trunks.

Setup considerations:

  • Extensions range on UCM6xxx in main office is 1000 – 1999.
  • Dialing to international numbers should be prefixed with 99 with no size limits.
  • National numbers start with 06 with 10-digit length.
  • Configuration

    Below steps to configure SIP Trunk 1 on Main office UCM6xxx. Same steps apply to configure Trunk 2.

    1. Access UCM6xxx web GUI → Extension / Trunk → VoIP Trunks.

    2. Click on + Add Sip Trunk, in the following screenshot type in Trunk 1 credentials:

  • Select “Register SIP Trunk” as Type.
  • Type in a reference name for Provider Name. For example: “Provider_1”.
  • Enter provider’s FQDN/IP address in Host Name field. In this example: “sip.provider.com”.
  • Enter Username to register to the provider. In this example: “0655441000”.
  • Enter Authenticate ID to register to the provider. In this example: “0655441000”.
  • Enter Password associated with username. In this example: “admin123”.
  • 3. Click and to store and apply the configuration.

    Above steps describe basic configuration needed to register a SIP trunk. Depending on providers, users may need to adjust their settings to successfully register a SIP trunk.

    The table below describes main parameters available for Register SIP Trunks:

    After saving the new VoIP trunk, it will be displayed under Web UI → Extension / Trunk → VoIP Trunks

    as shown below. Press pen icon to edit trunk settings if needed.

    Once the trunk has been created, users can check its registration status under System Status → Dashboard page.

    Note: If status shows “Rejected”, it means that UCM6xxx didn’t get registered with the provider. Verify that provider’s server is reachable from UCM6xxx and double confirm trunk credentials.

    DID / DOD Configuration

    Direct Inward Dialing (DID)

    DID (Direct Inward Dialing) is a service provided by the ITSP to subscribers using IP-PBX, adding possibility to route incoming calls to a specific DID to a specific extension. Using DIDs, it will allow extensions to be reachable from outside directly without going through main office number.

    In this example, following DIDs have been provided with first trunk “Provider_1”: 0655441000 / 0655441001 / 0655441002 / 0655441003 / 0655441004 / 0655441005 / 0655441006 / 0655441007 / 0655441008 / 0655441009 / 0655441010.

    Company wants to redirect incoming calls to specific extensions using provided DIDs. UCM6xxx in main office is using extensions range: 1000 – 1999.

    Note: Make sure DID Mode is set correctly under trunk advanced settings. Provider may include DID number in “Request-line” or “To-header”.

    Following configuration can be done to achieve this:

    1. Access UCM6xxx Web UI → Extension/Trunk → Inbound Routes. Select “Trunk 1” and press “Add” button.

    2. In DID Pattern field, enter “_0655441XXX”.

    3. Configure ByDID as Default Destination and check “Extension” in “DID Destination” options.

    4. Configure Strip field. In this example: Strip=6 to remove first 6 digits from incoming number and keep last 4 digits. If call is coming to 0655441007, UCM6xxx will strip 065544 and keep 1007.

    5. Click save and apply changes to apply configuration.

    Direct Outward Dialing (DOD)

    The UCM6xxx provides Direct Outward Dialing (DOD) which is a service of a local phone that allows extensions within a company ABC’s UCM to connect to outside lines directly.

    We will use Company’s ABC trunk 0655441000 with 11 DIDs associated to it. At the moment when a user makes an outbound call their caller ID shows up as the main office number which is 0655441000. This create a problem as the CEO would like that his calls to comes from his direct line. This can be accomplished by configuring DOD for the CEO’s extension. Other group member also can benefit from DOD to have their own line showed when making calls.

    Steps on how to configure DOD on the UCM6xxx:

    1. To setup DOD go to UCM6xxx Web UI → Extension/Trunk → VoIP Trunks page.

    2. Click to access the DOD options for the selected SIP Trunk.

    3. Click "Create a new DOD" to begin your DOD setup.

    4. For "DOD Number", enter one of the numbers (DIDs) from your SIP trunk provider. In this example, we will enter in the number for the CEO's direct line (0655441000).

    5. If extension number need to be appended to the DID number click on “Add Extension”.

    6. Select an extension from the "Available Extensions" list. Users have the option of selecting more than one extension. In this case, we would select the CEO's extension. After making the selection, click on the forward > button to move the extension(s) to the "Selected Extensions" list.

    7. Click save and apply changes to apply configuration.

    Users can press “Edit DOD” to check/add/delete extensions that are associated to a particular DOD.

    Create Outbound/Inbound Routes

    In this section we will give an example of creating Outbound and Inbound Rules for trunk 1 “Provider_1” to allow receiving incoming calls and to be redirected to IVR and to allow outgoing calls to be made.

    Create Inbound Routes

    1. Access UCM6xxx Web UI → Extension/Trunk → Inbound Routes. Select “Trunk 1” and press “Create New Inbound Rule”.

    2. In DID Pattern field, enter “_X.”. This allows all incoming calls to be received.

    3. Set IVR as Default Destination. (Assuming IVR is pre-configured).

    4. Click save and apply changes to apply configuration.

    For time condition based Inbound route, please refer to TIME CONDITION.

    Create Outbound Routes

    1. Go to Web UI → Extension/Trunk → Outbound Routes.

    2. Click on “Add” button to create a new outbound route.

    3. Enter the Calling Rule Name, Pattern and choose “Provider_1” in Use Trunk.

    In below figure, we set “Pattern” to “_06XXXXXXXX” to allow only dialed numbers with leading 06 and 10- digit length to be accepted. Extensions with privilege “Internal” or higher can use this route/trunk.

    Note: Users can add comments to a dial plan by typing “/*” and “*/” before and after each comment respectively, in our example we can set the pattern to: “_06XXXXXXXX /*route1*/

    Another outbound route should be set using “Provider_2” with following parameters:

  • Pattern: “_99X.” (to allow only dialed numbers with leading 99 to be authorized).
  • Privilege: International for instance.
  • Strip: “2” (to remove prefix 99 before calling out).
  • To dial international numbers such as 0016175669300, users need to have privilege “International” in used extension and dial 990016175669300.

    Note: For time condition based Outbound Routes, please refer to TIME CONDITION.

    PEER TRUNK

    In this chapter, we will consider that company ABC has a branch office equipped with UCM6xxx, and they want to be able to communicate between the two offices.

    Assuming following:

  • Both UCM6xxx have public IP addresses;
  • Or both UCM6xxx are on the same LAN/VPN using private or public IP addresses;
  • Or both UCM6xxx can be connected through a router using public or private IP addresses (with necessary port forwarding or DMZ).
  • UCM6xxx in main office is using extensions range 1XXX, while UCM6xxx in branch office is using extensions range 2XXX.
  • Configuration

    Following steps need to be done on both UCM6xxx in both locations:

    1. Access UCM6xxx’s web GUI → Extension / Trunk → VoIP Trunks.

    2. Click on + Add Sip Trunk, and enter following parameters:

  • Select “Peer SIP Trunk” for Type.
  • Enter a reference name. In this example: toBranch.
  • In Host Name field, enter the IP address/domain of the other UCM6xxx. In this case “ucm2.abd.com” is the domain name of the branch office.
  • 3. Click save and apply changes to apply configuration.

    The tables below describe basic and advanced parameters available for PEER trunks:

    After clicking Save the new VoIP trunk will be displayed under “Web UI → Extension / Trunk → VoIP Trunks” as shown below.

    Press the pen icon and go to “Advanced Settings”. Check “Enable Heartbeat Detection” option to allow UCM6xxx to monitor the status of each other sending regularly SIP OPTIONS to check if it’s still online.

    Click save and apply changes to apply configuration.

    Once the trunk has been created and Enable Heartbeat Detection is set, users can view the status of the peered trunk by navigating to the Status page.

    Outbound Routes Configuration

    On the main office UCM6xxx web GUI under “Web UI → Extension/Trunk → Outbound Routes”, click on + Add button. This would allow the extensions on main office to reach extensions on Branch Office.

    Configure using following parameters:

    1. Calling Rule Name: This is for reference purposes so we choose to use “toBranch”.

    2. Pattern: The pattern used in this example is _2XXX since the Branch Office is using extension range 2XXX.

    3. Privilege Level: Configured as “Internal”. User can change it to another privilege depending on the use case.

    4. User Trunk: Select the SIP Trunk to Branch.

    5. Click save on then Apply Changes.

    In figure 15, the pattern “_2XXX” means that whenever a user on the main office call an extension that starts with 2 and have 4 digits, this trunk will be used for the call.

    Notes:

  • These steps will also apply when configuring the outbound route from Branch Office UCM6xxx. The pattern used will be _1XXX since the extension range on the Main Office is 1XXX.
  • Users also could create Time based Condition to use Outbound Routes on a specific time, please refer to TIME CONDITION for more details.
  • Inbound Routes Configuration

    To create an inbound rule, on the UCM webGUI, under “Web UI → Extension/trunk → Inbound Routes” click on + Add button.

    For this example, Main Office UCM6xxx inbound rule needs be configured so that when an extension on the Branch Office dials, it will be routed to the specified user. Configure using following parameters:

    1. Trunks: Select the toBranch trunk.

    2. DID Pattern: Enter in the pattern “_1XXX” | “_2XXX” as shown in below figure

    3. DID Destination: By DID.

    4. Click on save then apply changes.

    With this inbound rule configured, if the Main Office UCM6xxx receives a call from any extension with a leading 2 and containing 4 digits to any extension with a leading 1 and contains 4 digits it will be redirected by DID to corresponding extension.

    Notes:

    Those steps will also need to be applied to the Branch Office.

    Users also could create Time based Conditions to use Inbound Routes on specific times, please refer to [TIME CONDITION] for more details.

    TIME CONDITION

    Users can set time condition on Inbound/Outbound rules in order to use each route on a specific time.

    Supposing that Time Conditions are already set, if more details are needed, please refer to the following guide: UCM6XXX Time Condition Guide

    Users can setup time conditions for trunks by following below steps:

    1. Access the UCM6xxx Web UI → Extension / Trunk → Outbound Routes.

    2. Navigate to time condition section.

    3. Select the time condition when to use this trunk. (Office Time in this example)

    4. Click on “Add” to add the time condition.

    The example above shows that on the Office Time, calls will be made using Provider_1 trunk.

    The example above shows that on Out of Office Time, calls will be made using Provider_2 trunk.

    TRUNK GROUPS

    Starting from firmware 1.0.20.17 users can create VoIP Trunk Groups to register and easily apply the same settings on multiple accounts within the same SIP server.

    This can drastically reduce the amount of time needed to manage accounts for the same server and improve the overall cleanliness of the web GUI.

    Once creating the new trunk group and configuring the SIP settings, users can add multiple accounts within the configured SIP server by pressing button + and configuring the username, password and authentication ID fields as show in below figure:

    FAILOVER TRUNK

    Failover trunks can be used to make sure that a call goes through an alternate route, when the primary trunk is busy or down.

    UCM6xxx will use Failover trunks in following scenarios:

  • No response from first trunk after 32 seconds.
  • If UCM6xxx receives 403/407/408/503/603 SIP responses from primary trunk.
  • If primary trunk is disabled.
  • If primary trunk is an analog trunk and it’s busy or not connected.
  • Users can setup failover for peer and register trunks by following below steps:
  • 1. Go to PBX→Basic/Call Routes→Outbound Routes.

    2. Click on “Click to add failover trunk”.

    3. Select then the trunk to be set as failover as shown in the below figure.

    4. Strip and prepend digits if needed.

    Post a Comment

    Previous Post Next Post