[asterisk-dev] [Code Review] IAX timer not loading

Alec Davis sivad.a at paradise.net.nz
Fri May 29 17:49:18 CDT 2009


Something has changed between versions. If only svn.digium.com/view was
working, might have been able to track down what changed when, also maybe
not ....

The bug I reported https://issues.asterisk.org/view.php?id=15191 comes up as
trunk mode only on an old version SVN r178446m, but newer versions fail.

Jthurman suggests https://issues.asterisk.org/view.php?id=15191#105720
preloading timing resource in modules.conf

Added 'preload => res_timing_dahdi.so' in modules.conf, on the following,
now IAX trunk comes up as trunk mode after every asterisk restart.
SVN-trunk-r192214M 
SVN-trunk-r181371M
SVN-trunk-r178919M

I've checked SVN-trunk-r178446M and it doesn't have 'preload =>
res_timing_dahdi.so' in modules.conf, and all trunks come up in trunk mode
after every restart.

What about res_timing_pthread.so for installations without timing hardware?

My vote: 'to force the loader to preload timing modules' which will then
work for existing installations that may upgrade, where 'make samples'
probably won't be run.

Changing only the default sample file modules.conf.samples will only help
new installations, where 'make samples' probably would run.

Alec Davis



-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Russell Bryant
Sent: Saturday, 30 May 2009 9:18 a.m.
To: David Vossel; Russell Bryant; Asterisk Developers
Subject: Re: [asterisk-dev] [Code Review] IAX timer not loading


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/262/#review808
-----------------------------------------------------------


This is a tricky situation.  :-)

One thing with this patch is that while it prevents the code from accepting
trunked calls before Asterisk fully starts, it will not prevent Asterisk
from starting up outbound trunked calls.  So, there is still some potential
for failure here.

The only things that I can think of that would make this work make the patch
even more complicated and module initialization even more bizarre.

I am really liking just patching the loader to force timing modules to get
preloaded.  My current suggestion is to write a new patch that goes that
route, and then we'll see what comments show up on the code review.  It
seems like a reasonable thing to let modules assume that fundamental
subsystems, such as the timing interface, are fully initialized before they
get loaded.  Otherwise, the code is really going to get ugly.

- Russell


On 2009-05-28 09:57:40, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/262/
> -----------------------------------------------------------
> 
> (Updated 2009-05-28 09:57:40)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> When loading chan_iax2, a timer is opened.  If this timer fails to open
trunk peers/users may not be built correctly.  Depending on the order
Asterisk loads modules, the timer may or may not be loaded before chan_iax2.
If it is not loaded before hand, trunk peers/users will not be set up even
though a timing interface may be possible.  This patch waits until Asterisk
is fully booted to create the timer.  If the timer fails, all trunked
peers/users' IAX_TRUNK flags are cleared and a warning message appears.
> 
> 
> This addresses bug 15191.
>     https://issues.asterisk.org/view.php?id=15191
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 197192
> 
> Diff: http://reviewboard.digium.com/r/262/diff
> 
> 
> Testing
> -------
> 
> tested with and without loading the timer module. worked correctly.
> 
> 
> Thanks,
> 
> David
> 
>


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list