Packet8 DTA310 and Asterisk

Packet8 DTA310 and Asterisk

There are two ways to do this - one involves downgrading to an older packet8 firmware version, applying settings, then upgrading back to the newer packet8 firmware version. The easier method involves reflashing your router with an entirely different firmware version, and is a lot less hassle.

Configure SIP on your Asterisk box

In your sip.conf file, you should have an entry such as:
callerid="Dom Tuffy" <8000>

In your extensions.conf file, you should have an extry such as:
exten => 8000,1,Dial(SIP/8000)

This assumes, of course, that you want to use extension 8000.

Unlocking the DTA

The DTA310 appears to be based on the Leadtek BVA-805x series of terminal adapters. I used firmware for another Leadtek BVA-805x device, the Call-In-One. The firmware (version AR16/AR16O) is available for download on this page (but see the note below about the firmware bug in versions earlier than AR18D). Leadtek has the AR15 firmware available on their site, although I haven't tried that one yet.

Step 1 - Reflash the terminal adapter
It might be a good idea to turn off any firewall software you have on your PC at this point.

  • Download and, if necessary, unzip the firmware.
  • Plug the DTA into your router and make sure it's turned on.
  • Log into your router, take a look at the DHCP client table, and find the IP address of your terminal adapter.
  • Open a web browser, go to the IP address of the terminal adapter, and click Download on the left side of the page.
  • Click Browse, locate the firmware file, and click Start HTTP Download
  • Wait patiently until you see Download Successful, then click Restart Main Application

Step 2 - Configure the terminal adapter
This bit is fairly straightforward. Open the config page in your browser (note that the terminal adapter may have pulled a different IP address from the DHCP server this time around) and click on SIP. One configuration example can be found on the following page:

Using Packet8's firmware

NOTE: If you followed the directions in the previous section, don't pay attention to this section.

When I did this, I was using Asterisk 1.0.3. I assume that it will work with other versions. Probably anyone could figure this out based on this thread on Broadband Repots, but since it wasn't already in this Tiki, I figured I'd add it.

The two versions of the firmware you need can be downloaded from the link below,11903027~mode=flat

Now you need to connect to the web admin page on your DTA310. Do this by typing in the IP address of your DTA310 into a web browser.

You need to change the firmware on unit to the older 1111 version, which has an unlocked SIP page. I found this file I believe on the Broadband Repots message boards. Once you have this, flash the unit using the Download page either via TFTP or HTTP and reset it.

Now when it starts up you can enter in your Asterisk server IP address, the port as 5060, Phone Number=8000, CallerID Name=8000, Port=5060, AEC On=Off (no idea what this is), Username=8000, Password=1234. For the Domain name, I entered in default. Save this and restart the unit.

When it comes back up, you need to flash it to a newer version. I used 12.34, as this was the newest that I found on the message board that was reported to maintain the old settings when flashing. Once this has been flashed and the adapter reboots, you should be all set.

Alternative way to convert your proprietary Packet8 DTA-310

Steps that I did to convert my "locked" Packet8 DTA-310 into an "open" SIP ATA:

1) Received my DTA with a very old firmware - bought used from eBay for around US$ 35 including shipping to the USA;

2) Using the latest .EXE application (0.14.10) from Packet8 update page, I upgraded the firmware to the latest Packet8 proprietary version - 0.14.10;

3) Then I downgraded to an older proprietary firmware - in my case, 0.12.39;

4) I downloaded the from Broadband Reports

5) Done! Now, just change your sip.conf and extensions.conf files.

ADVICE: Don't EVER attempt to unlock your DTA-310 if it is running a firmware other than 0.12.34, 0.12.35 or 0.12.39. You will make your DTA a costly paper weight. rcilink wrote: "No one has proven it yet, but it appears that the newer firmwares offered by Packet8 may actually break the dta310 if loaded with the AR16O or the 11.11 firmware. It could be coded to destruct, or random occurance".

NOTE: Another viewpoint on the above, I was able to take a unit that indicates that it has "Downloader Code Version: 1.0 US (8x8 010113) checksum 6fc7" and upgrade it to the LDTK AR17I firmware, which is one version after the AR16O that most others seem to be using. However, I could NOT get it to take the AR18D firmware, which is what I really wanted (because AR18D supposedly fixes the "Content To Short" bug described below). If ANYONE has been able to upgrade to AR18D, PLEASE insert a note showing the Downloader Code Version you are running.

If the unit appears to be "bricked"

Before you give up on the unit, try Restoring Factory Defaults as described in the Leadtek Quick Installation Guide (link is to a .pdf file):

  1. Unplug the power.
  2. Connect the telephone to PHONE 1 PORT.
  3. Lift the handset off the telephone (off-hook).
  4. Use a pin to push the RESET button at the back of the device. Hold it while you plug the power back to the device. The Power LED should be flashing rapidly.
  5. Continue to hold the RESET button until you see four of the six LEDs flashing several times in pairs. Release the pin and wait until all LEDs stop flashing. This whole process may take up to 10 seconds.
  6. Put the handset back on the telephone (on-hook).
  7. The factory defaults should have been restored.

Once you have successfully completed the factory reset, you will hopefully be at the last "good" firmware version, and at that point you may be able to download new firmware as described in the sections above.

Pros and Cons of this device:

  • Very low cost ATA, with one FXS port
  • Good device (some believe the DTA-310 is the functional equivalent of a Leadtek BV8051S, but without a PSTN jack)
  • Codecs: G729, G711 (alaw and ulaw) and G723.1

  • Not easy to upgrade
  • If you do something wrong, you can end with a costly paper weight
  • If your adapter will not accept the latest firmware (AR18D, which probably 99% of all units with NOT accept according to posted user experiences) it should still work, but may constantly send SIP response 400 "Content To Short" back to your Asterisk server unless you apply a workaround that disables voicemail notifications (see below).

20 Character SIP password length

Note that the Leadtec firmware imposes a 20 character SIP password length. If you cut and paste your "SIP Secret" from FreePBX, only the first 20 characters will be input.
Make sure to shorten up your SIP password to 20 characters or less in both FreePBX and the ATA, or your attempts to get the ATA to authenticate will be futile.

Firmware bug produces SIP response 400 "Content To Short"

There is a problem that occurs if you are running a firmware version earlier than AR18D (from Leadtek), that causes the adapter to continually return the following message at regular intervals:

-- Got SIP response 400 "Content To Short" back from [ip address]

The problem is discussed in this message thread. The basic problem is that earlier versions of the firmware were not in compliance with RFC3842 (a message waiting indicator compliance specification) and when Asterisk sends out a message waiting status notification, the adapter doesn't recognize it as valid.

The problem is compounded by the fact that although there is newer firmware available that specifically addresses this problem (the AR18D version mentioned above), virtually all available adapters of this model will refuse to load it. According to a message found in this thread, an adapter will only take the AR18D firmware if it shows this downloader code version on the adapter home page:

Downloader Code Version: 010208 (P8VO US) checksum 22af

The person who posted this information observed that Packet8 firmware releases update the downloader, while Leadtek firmware releases do not, as per the Leadtek web site and his trial. Unfortunately, no one has yet managed to identify which Packet8 firmware version, once loaded, will install downloader code version 010208 - or if such a firmware version even actually exists (if anyone knows which version will do this, please modify this text accordingly).

As a workaround, for extensions that do not need to have a voicemail box associated with them, do not include any "mailbox=" definition in that extension's configuration. FreePBX users should open the page associated with the extension, look under "Device Options", find the "mailbox" field (note that this field will not appear during initial creation of an extension, but once you save the extension information and then re-select that extension, additional fields will appear, including the "mailbox" field), and delete the contents of that field so that it is totally blank. Asterisk will not try to send voicemail message waiting notifications to devices that do not have a "mailbox=" definition, therefore the error messages will not appear. Note that blanking out the "mailbox" field apparently does not disable the ability to have a voicemail box associated with the extension (at least it does not do so in FreePBX), but it does mean that no message waiting notifications will be sent to the device. However, per a conversation spotted in the #freepbx-dev IRC channel, in FreePBX 2.2.0rc1 and later it is not possible to leave the "mailbox" field blank if voicemail is enabled, even if only for voicemail-to-email (FreePBX will fill in a blank "mailbox" field with the default information if voicemail is enabled), but using just a single space character in the "mailbox" field instead will stop FreePBX from filling it in, and has the same effect as leaving it blank (you can examine the file /etc/asterisk/sip_additional.conf to see the result, but do not edit this file directly because FreePBX will overwrite it).

The other approach to correcting this problem is to patch Asterisk itself. Apparently Asterisk sends either the string "Voice-Message:" or "Voice-messages:", and the adapters with this issue want to see the string "Voicemail:" instead (which was possibly supported in an earlier standard, but not in RFC3842). This approach has several drawbacks - it could break message waiting functions to other types of adapters in use on the same Asterisk box, the location to patch likely changes in each new version of Asterisk, and many users will not know how or will not want to recompile Asterisk to make this change. Therefore, it would be most desirable if someone could figure out where to obtain and install the proper downloader code that would then allow the AR18D firmware to be installed, OR could offer a patch to the AR18D binary itself that would enable it to be successfully loaded by any of the recent downloader code versions.

Dial Plan

The character assignments for the dial plan for these devices appears to be very similar to, but slightly different than that used in some other popular adapters (e.g. Sipura/Linksys models). Here is a basic dial plan that I have used on some devices in the U.S.A. that had the AR17I firmware:


The plan above passes valid U.S.A./Canada 7 and 11 digit numbers immediately. All other patterns are passed only after a timeout, UNLESS the # key is pressed at the end of the dialing sequence (in which case, the number is passed immediately after the # is pressed).

After looking at a document that describes the Leadtek dial plan (in a somewhat less than clear manner), and after some deduction I have concluded that the following characters can be used in the dial plan:

  • 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, *, #, A, a, B, b, C, c, D, d - matches only that individual digit, character or symbol (the letters A, B, C, D in uppercase or lowercase match the "fourth column" of keys on the relatively rare 16-key touch tone keypad).
  • x or X - matches any digit 0-9.
  • z or Z - matches any digit 0-9, or the * or # key.
  • [n-n] (where n = any numeric character) - matches any digit within a range of digits.
  • [ccc] (where c = any character) - matches any individual digit, character or symbol in the list, e.g. [2368] would match on any one of those digits.
  • t or T - if used, may ONLY be placed at the end of pattern. Indicates a four second timeout, that is, if the number dialed to that point could be a match for the pattern, wait four seconds to see if the user dials any additional digits.
  • . (period character) matches ZERO or more occurrences of the previous character. In other words, 47. would match 4, 47, 477, 4777, etc. As another example, Z. would match any dialed number (including * and # characters) of any length, but to make it useful you would need to add either a Timeout indicator (such as Z.T) or an explicit pattern terminator (Z.# would cause a match when the user dials a #, but note that the # will be passed to Asterisk as part of the dialed number! To use the # as a terminator but not send it to Asterisk, you can use Z.<#:> if firmware versions AR16O and newer).
  • <!:!> (where ! is replaced by any valid pattern) allows for pattern replacement. This appears to work exactly as it would in Sipura Dial Plans. ! can be replaced with "nothing" on either side of the colon. You can also use this to add a leading 1+area code to a seven digit number, for example <:1989>[2-9]xxxxxx would add 1 + 989 to the start of any valid seven digit number. Note that pattern substitution appears to be available in newer firmware versions (AR16O and newer) only.
  • | - use the | character to separate dial individual dial plan patterns.

Note that if you want to be able to end a number (with a variable number of digits) either by a timeout or by explicitly pressing the # key, you should enter the pattern twice, but in the first instance end it with a T and in the second instance with <#:>. As mentioned above, these adapters by default treat the # key as a dialable digit, not a pattern terminator, so the second construct (when used to end a pattern) matches on the # but does not pass it to Asterisk as part of the dialed number. Most sample dial strings you see posted on the Web do not include the <#:> terminator because this would not have been valid in firmware versions before AR16O, but if you do not (or cannot) use this then you will not be able to abort a timeout wait by pressing the # key.

Created by: dolson, Last modification: Sat 14 of Oct, 2017 (05:31 UTC) by kingbeetle
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+