Summary:ASTERISK-19521: chan_iax2 does not honor trunkfreq config option
Reporter:Jaco Kroon (jkroon)Labels:
Date Opened:2012-03-13 08:31:55Date Closed:2012-04-12 11:23:19
Versions: Frequency of
Environment:Attachments:( 0) asterisk-iax2-trunkfreq.patch
Description:iax2 does NOT honor the trunkfreq option.

There are actually two separate (but related) bugs here.  After tracking down http://svnview.digium.com/svn/asterisk?view=revision&revision=355746 I decided that a "quick fix" would just be to set trunkfreq=50 and wait with system upgrade until after hours.  It turns out this doesn't actually work.

Firstly, in the load_module function the ast_timer_set_rate(timer, trunkfreq); call precedes the loading of the config file, and in reload_config no call to ast_timer_set_rate is made at all.

My suggestion would be to in set_config also add a call to ast_timer_set_rate, something like:

[edited by mjordan]

Inline code removed - thanks for attaching it as a patch

This of course assumes that whatever timer implementation is in use can deal with the frequency changing ... I believe I use timerfd for the most part.

I believe that trunkfreq used to work in older versions of asterisk, unfortunately I can't remember when this change came into effect.
Comments:By: Jaco Kroon (jkroon) 2012-03-13 08:44:42.125-0500

Suggested patch (inline code got all garbled).