December 7, 2011 – 6:58 pm | 16 Comments

3CX is pleased to announce a new release of 3CX Phone System 10, build 22686. Service Pack 5 fixes numerous 3CX Wallboard issues and also adds a new and important caller ID feature. To download …

Read the full story »
Releases

3CX Product Releases

VoIP How To

Technical tips to run your VoIP PBX more efficiently

Events

3CX Trainings and Webinars around the world

Docs & FAQ

3CX Documentation how to and FAQ

Phone configuration

3CX, Aastra, Cisco, Yealink, Grandstream, Polycom configs

Home » Docs & FAQ, VoIP How To

Configuring a Draytek 2820 Router for 3CX with QoS configuration

Submitted by on May 24, 2010 – 11:47 am9 Comments

In this article we will describe the configuration of a hardware router with a very attractive quality-price ratio. The Draytek 2820 is a ADSL 2/2+ Router/Firewall with advanced features such as the capability to establish 32 VPN connections, a robust object-based firewall, QoS Management, Bandwidth Management, and Dual-WAN cabilities.

We will look into NAT configuration for 3CX and QoS configuration to prioritize SIP and RTP traffic. The firmware version tested was version 3.3.3 dated 23 October 2009.

NAT Configuration

  • Browse to the Router’s Web Interface (the device’s default IP Address is 192.168.1.1).
  • Go to the “NAT -> Open Ports” menu

In this example, 3CX PhoneSystem is installed on a server with IP Address 192.168.1.200, and the Draytek is connected to the Internet via the WAN1 interface. Go to the first free position in the “Open Port” menu, and configure as follows:
  • Ensure the “Enable Open Ports” checkbox is enabled
  • Set the “Comment” field to “3CX”
  • Set the “WAN Interface” field to “WAN1″
  • Set the “Local Computer” field to the IP Address of the 3CX PhoneSystem machine (in this example 192.168.1.200)
  • Set the first line as follows:
    • Set the “Protocol” field to “TCP/UDP”
    • Set the “Start Port” and “End Port” fields to “5060″
  • Set the second line as follows:
    • Set the “Protocol” field to “TCP/UDP”
    • Set the “Start Port and “End Port” fields to “5090″
  • Set the third line as follows:
    • Set the “Protocol” field to “UDP”
    • Set the “Start Port” field to “9000″ and the “End Port” field to “9049″
  • Set the fourth line as follows:
    • Set the “Protocol” field to “UDP”
    • Set the “Start Port” field and the “End Port” field to “10000″
  • Click on the “OK” button at the bottom of the page.

This will send you back to the “Open Ports” summary page.

QoS Configuration

  • Browse to the Router’s Web Interface (the device’s default IP Address is 192.168.1.1).
  • Go to the “Bandwidth Management -> Quality of Service” menu

First we need to define the ports and services used by 3CX PhoneSystem. Proceed as follows:

  • Click the “Edit” link under the “Service Type” heading.
  • Click on “Add”, and insert the following service:  Name: “3CX SIP”, Service Type: “TCP/UDP”, Type: “Single”, Port Number:  ”5060″
  • Click on “Add”, and insert the following service:  Name: “3CX Tunnel”, Service Type: “TCP/UDP”, Type: “Single”, Port Number:  ”5090″
  • Click on “Add”, and insert the following service:  Name: “3CX RTP”, Service Type: “UDP”, Type: “Range”, Port Number:  ”9000 – 9049″
  • Click on “Add”, and insert the following service:  Name: “3CX FAX”, Service Type: “UDP”,  Type: “Single”,  Port Number:  ”10000″

  • Click the “Cancel” button to go back to the previous page

Now we need to create a “Class Rule”:

  • Click on the “Edit” link in the “Class 1″ row under the “Rule” header
  • Set the “Name” field to “3CX VOIP”
  • Click on the “Add” button
  • Set the “ACT” field to Enabled
  • Set the “Local Address” field to the IP Address of the PBX Machine (in this example 192.168.1.200)
  • Ensure the “Remote Address” field is set to “Any”
  • Ensure the “DiffServ Codepoint” field is set to “Any”
  • Set the “Service Type” field to “3CX SIP”
  • Click the “OK” button
  • Repeat the last 6 steps for each of the 3 remaining service types, changing the “Service Type” field to “3CX Tunnel”, “3CX RTP”, and “3CX FAX” respectively.

  • Click on the “OK” button to save the Class Rule.

This will take you to the QoS Main Page.

Now we need to instruct the router what priority level to assign to traffic of class “3CX VOIP”.

  • Click on the “Setup” link on the “WAN1″ row.
  • Set the “Enable the QoS Control” checkbox, and set the traffic direction to “BOTH”
  • Set the “Reserved_bandwidth Ratio” field for traffic of class “3CX VOIP” to 70%
  • Set the “Reserved_bandwidth Ratio” field for traffic of Class 2 and Class 3 to 10%
  • Click on the “OK” button to complete the configuration

Note that the “Reserved_bandwidth Ratio” percentage value does not reserve bandwidth at all times, but only when other traffic types are competing with “3CX VOIP” class traffic for bandwidth.

9 Comments »

  • [...] Follow this link: Configuring a Draytek 2820 Router for 3CX with QoS configuration [...]

  • Graham Hill says:

    Good to see this article, as we have been using Draytek Routers on voice and data networks for many years. The V2820 is a very robust and powerful router that we can thoroughly recommend. It is also notable that this router can give you dual-WAN connection (2 x load-shared ADSL) and alternate connection via GSM USB wireless.

  • Tonnie says:

    Normal the draytek can be a little messy with it’s sip_alg (most of the times on hosted voip systems) so we always put the settings off.
    how?

    Quote from the manual:
    “> sys sip_alg ? usage: sys sip_alg [value]
    0 – disable SIP ALG 1 – enable SIP ALG current SIP ALG is disabled”

  • [...] 3CX VoIP blog » Configuring a Draytek 2820 Router for 3CX with QoS configuration [...]

  • [...] Draytek Vigor 2820 http://www.3cx.com/blog/voip-howto/draytek-firewall-voip/ [...]

  • Brian Campbell says:

    “Set the “Start Port” field to “5060″ and the “End Port” field to “5090″”

    Why are you opening Ports 5060 to 5090? Should it not just be Ports 5060(Sip) & 5090(3CX Tunnel)?

  • Kevin says:

    Hi Tonnie

    The document assumes that you start off from factory defaults. By default the SIP ALG should start disabled.

    It should be left disabled.

    However you can manually disable the SIP ALG by logging onto the Draytek using telnet, and issuing the command:

    sys sip_alg 0

    Regards

  • Kevin says:

    Hi Brian

    Yes, opening only ports 5060 and 5090 would be more accurate – thanks for pointing this out.

    I have updated the blog post accordingly.

    Regards

  • Fred Fremaux says:

    For many years, Draytek has been our choice for VoIP routers for many of the same reasons. Some may find this helpful, in your last figure, WAN 1 General Setup, bottom right corner is the option Online Statistics – this is an excellent graphic tool to help you test and verify that your QOS settings are working as planned – or not.