[Home]

Summary:ASTERISK-20963: Document that chan_iax2 requires a timing source post 1.8.19.0; ensure a timing source is loaded
Reporter:sdolloff (sdolloff)Labels:
Date Opened:2013-01-18 16:51:21.000-0600Date Closed:2017-12-19 05:10:30.000-0600
Priority:CriticalRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:1.8.19.0 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-23992 IAX peering fails without sufficient logging if res_timing_pthread.so is not loaded
is duplicated byASTERISK-21011 Asterisk to Asterisk IAX2 trunk registration does not register
Environment:centos 5.2Attachments:( 0) consolecapture.txt
( 1) iax.conf-modified
( 2) iax18.pcap
( 3) iax19.pcap
( 4) iax20.pcap
( 5) iax2_debug_11.0.1.txt
( 6) myconfigs.tgz
( 7) ttyIAX000-modified.txt
Description:using iaxmodem to connect to asterisk peers on localhost. asterisk shows no data from 'iax2 set debug on'.  tcpdump shows no response to registration packets to asterisk.  works in 1.8.18.0 but not 1.8.19.0-rc1 or subsequent versions.  iax.conf entry:  

{noformat}
; fax001
[fax001]
callerid=Fax001 <0000000000>
secret=somesecretword
context=mycontext
type=friend
host=dynamic
transfer=no
qualify=no
requirecalltoken=no
{noformat}
Comments:By: Matt Jordan (mjordan) 2013-01-19 15:30:14.596-0600

A few things:
# There is not enough information on this issue to determine what is actually occurring. Please attach a pcap with the IAX2 traffic.
# From the release summaries, there does not appear to be any changes that were made to {{chan_iax2}} between 1.8.18.0 and 1.8.19.0.
# Asterisk does not silently reject registrations. On top of that, it does not drop or hide packets when the appropriate channel technology debug is enabled. This, combined with the lack of changes in {{chan_iax2}}, makes me suspect that there is a configuration issue here.

Please at least provide a pcap, which should illustrate whether or not there is a network condition affecting the traffic. Please also provide a DEBUG 5 log with 'iax2 set debug on' enabled so that we can verify the lack of packets.

By: sdolloff (sdolloff) 2013-01-24 10:49:00.921-0600

I will get the packet captures for you.

By: sdolloff (sdolloff) 2013-01-24 14:03:56.458-0600

console capture showing iax debug for different versions

By: sdolloff (sdolloff) 2013-01-24 14:07:15.123-0600

pcap for iax registrations to asterisk 1.8.18.0 using sudo /usr/sbin/tcpdump -Avvv -s1500 -i lo port iax -w iax18.pcap

By: sdolloff (sdolloff) 2013-01-24 14:09:19.803-0600

added console capture showing output from 3 versions and individual pcap files for each version

By: David Brillert (aragon) 2013-01-29 10:51:44.681-0600

sdolloff you have to use the enter feedback option to get this ticket out of feedback status...

By: sdolloff (sdolloff) 2013-01-29 10:52:58.052-0600

pcaps and console captures are attached

By: Matt Jordan (mjordan) 2013-01-29 12:26:43.409-0600

Are your iax2 peers configured using realtime?

By: sdolloff (sdolloff) 2013-01-29 12:40:17.606-0600

no, iax2 configuration is is iax.conf. sample in original description.  general settings are:

[general]
context=restrictedcontext
disallow=all
allow=ulaw
dtmfmode=inband
tos=ef
transfer=no
maxregexpire=900


By: Shishir (shishir) 2013-02-04 12:27:07.020-0600

We also had the exact same issue with asterisk 1.8.20.1 where iax2 was not responding to the registration packets. We down graded it to asterisk 1.8.18.0 and now its responding. Its kind of weird but just for record its happening on asterisk 1.8.20.1 as well.

By: Jonathan Rose (jrose) 2013-02-06 13:20:23.801-0600

So I've been trying to get either of the two noteworthy versions (1.8.18.0 and 1.8.19.0-rc1) for this issue to behave in the manner described to be working here without luck. In both versions for me, it appears to register properly using the configurations provided for the peer and the general settings (and nothing else in the configs), but there is a key discrepency between how it's working for me and how it is described to be working in 1.8.18.0 by sdolloff.

When Asterisk receives the first REGREQ from fax001 (identical to the ones in your pcap), Asterisk responds with a CTOKEN response instead of a REGAUTH. I'm under the impression that this isn't meant to be needed since you explicitly set the option requirecalltoken=no, but using the configuration blocks you provided, that appears to be how it is responding and that seems to be a somewhat notable discrepancy between the response I'm seeing and the one I expected per your description. Right now the only reason I can think for that initial response to be different for the same request is if the configs you provided differ from the ones you are using.

If you could, please provide a full iax.conf that you are confident reproduces the dialog as you've shown it and then change sensitive data like passwords and ip addresses as necessary.

By: David Brillert (aragon) 2013-02-07 10:15:23.625-0600

I'm attaching set iax2 debug on from back to back systems with related iax.conf info.  This is from 11.0.1

By: David Brillert (aragon) 2013-02-07 10:19:48.439-0600

As a humble reporter I'm just wondering why I am the assignee for this bug report? ;)

By: Jonathan Rose (jrose) 2013-02-07 10:27:42.220-0600

That's a good question.  It should have been assigned to sdolloff... something must have gotten bugged when I requested feedback.

By: David Brillert (aragon) 2013-02-07 10:32:43.034-0600

Jonathan, were you able to look at my 11.0.1 iax.conf and trace?

By: Jonathan Rose (jrose) 2013-02-07 11:34:40.339-0600

You mean iax2 debug 11.0.1.txt? I looked at it, but it doesn't really pertain to this issue does it?  As far as I can tell, the registrations going on in there are working fine right? And the version isn't actually a 1.8 version either.  On a slightly less important note, it doesn't look like you actually posted an iax.conf file. It just looks like the peer definitions are just included in the log dump.

But yeah, that's not important because I don't think this was ever your problem to start with :P. What I actually need for this issue is sdolloff's iax.conf in full. I'm trying to figure out why his IAX dialogs don't include CTOKEN responses in the version he was describing as not being regressed.

By: David Brillert (aragon) 2013-02-07 11:47:04.832-0600

Jonathan, yes all that isn't important since I was just trying to show how everything was working in an older release.  My same iax.conf will not work with 11.2.x
I have a different bug report open for 11.2 at asterisk-21011 so I put my iax2 debug 11.0.1.txt there
I'm happy to see that you are debugging...


By: sdolloff (sdolloff) 2013-02-08 11:44:09.725-0600

I have attached the full iax.conf and the tty file for a iaxmodem instance that is the registering entity.  

Something to note, when first logging into the console after the upgrade, the iax2 peers do show up, but then then expire.  Here is a sample cli output from a peer before it expires.

*CLI> iax2 show peer fax01

* Name       : fax01
 Secret       : <Set>
 Context      : outboundcontext
 Parking lot  :
 Mailbox      :
 Dynamic      : Yes
 Callnum limit: 0
 Calltoken req: No
 Trunk        : No
 Encryption   : No
 Callerid     : "Fax01" <8886039009>
 Expire       : 2
 ACL          : No
 Addr->IP     : 127.0.0.1 Port 4571
 Defaddr->IP  : 0.0.0.0 Port 4569
 Username     :
 Codecs       : 0x4 (ulaw)
 Codec Order  : (ulaw)
 Status       : Unmonitored
 Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

By: Jonathan Rose (jrose) 2013-02-14 11:55:41.585-0600

Today I tried using your faxmodem and iax configs and still could not reproduce this.  I tried using both res_timing_dahdi and res_timing_timerfd timing sources. Every time iaxmodem attempts to register, Asterisk accepts the registration and responds appropriately. I have yet to see a case where Asterisk just plain does not respond. At this point I don't think I'm going to be able to reproduce this issue with the information given.

One thing I'd like to know is your timing source.  If it's res_timing_dahdi, could you test with res_timing_timerfd instead? Vice-versa as well.

Aside from that I'm just going to funnel my relevant configurations to you. Compare and see if you can't find anything that could be the source.  If that doesn't work, see if you can reproduce the problem on another machine. If you can still reproduce the problem, I might be able to replicate your setup locally that way.  If not, maybe it'll provide some insight.

By: sdolloff (sdolloff) 2013-02-15 11:11:04.265-0600

I don't think i'm using either of these sources right now.  Was there one by default prior to 1.8.19?

By: Rusty Newton (rnewton) 2013-02-20 09:24:46.822-0600

I believe there has been a default since 1.6.1.X

Can you post the output of the CLI command "module show like res_timing" ?

Do you have any timing modules noloaded in modules.conf ?

https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces

By: sdolloff (sdolloff) 2013-02-20 12:25:59.770-0600

I checked my menuselect and the only res_timing option currently available to me on these systems is pthread.  Adding load => res_timing_pthread.so in modules.conf and restarting asterisk solved the problem.

It seems like the iax2 modules should throw an error if it now requires a timing source and one isn't available. I've never loaded one before and this has been working across various versions for years.

By: David Brillert (aragon) 2013-02-27 19:33:29.695-0600

I had a few systems in the field where IAX2 was broken.  Funny but the timer problems also affected DTMF transfers... causing hangups instead of transfers.
The typical cause was a bad dahdi install but after fixing dahdi the timing started working again and IAX2 also started working again.

The command 'timertest' was kind enough to tell me the timer was broken in one case.  But the root cause being a timing issue wasn't obvious at all.  Happy its working again though :)

By: David Brillert (aragon) 2013-02-27 19:40:22.227-0600

My last 2 cents.
It sure would be nice if DTMF transfers or IAX2 would spit out a notice message if the timer was broken.
Finding the broken timer wasn't easy... in some cases the only way to fix was to reinstall dahdi.

By: sdolloff (sdolloff) 2015-05-20 15:26:58.291-0500

No longer relevant for me since I stopped using IAX

By: Rusty Newton (rnewton) 2015-08-14 17:51:03.020-0500

Re-opening as the issue is still relevant to the community and hasn't been fixed.

What we probably need is to make sure chan_iax2 requires a timing source OR complains loudly when it doesn't have one.

By: Sean Bright (seanbright) 2017-02-21 14:35:08.557-0600

{{chan_iax2}} should only require a timing source if IAX2 trunking is configured. If a trunk is configured and there is no timing source, a warning is written to the logs.

By: Joshua C. Colp (jcolp) 2017-12-19 05:10:30.307-0600

I'm suspending this issue. We do have a log message now if a timing source is not available and trunking is wanted.