Summary:ASTERISK-17145: IAX2 REGAUTH Failure dependent on Trunk Name
Reporter:Leo Brown (netfuse)Labels:
Date Opened:2010-12-21 10:16:54.000-0600Date Closed:2011-07-27 13:48:43
Versions:Frequency of
Environment:Attachments:( 0) mangled_regauth.pcap

I have seen intermittently on customer trunks that work the vast majority of the time, Asterisk sending incorrect REGAUTH packets back to the host.

In fact, they do not even appear in Asterisk's `iax2 set debug` output - the customer's REGISTER packet is shown as RX, but the TX packet is not.

Taking a network capture of the communication shows that Asterisk is indeed sending replies, but they are totally incorrect. If the protocol structure were followed, they are packet type 0x40 with an IE of 0x36...!

Naturally, the Asterisk at the other end ignores these packets and they don't show up in any debug views/logs.

This issue is actually resolved in this example by rebooting the customer's router (i.e. resetting the NAT port) and Asterisk seems to be able to communicate for some time again. I am presuming there is a table of IAX calls that has become corrupt. All other connections work ok though.

I have hundreds of customers running with the same automatically-generated trunk info, and only one customer has this issue, with only a different username and password. I am guessing it's because this particular customer has a longer IAX username than most and/or it contains the text "iax" at the end - the former seems more likely. The example as used in the trace is:


I have attached this in pcap format so you can see exactly how mangled the response is!



Trace taken from SVN-branch-1.6.2-r272577M, I believe this is still an issue in SVN head though.
Comments:By: Leo Brown (netfuse) 2010-12-21 10:42:10.000-0600

Sorry - mis assigned to "Addons", but can not amend it!

By: Russell Bryant (russell) 2011-07-27 13:48:37.025-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!