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

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


I had similar thoughts regarding David's patch about other res_* modules
depending on res_timing_*.
 
But wondered what the priority was regarding preload modules in
modules.conf, which comes first, the David's patch loading all res_* or the
preload modules in module.conf.
 
Or could it be made to work to our advantage:
    1st.   preload res_* modules that specifically need to be loaded first
and in order from modules.conf
    2nd.  preload all other res_* using David's patch.
 
Alec
 
  _____  

From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Jonathan Thurman
Sent: Saturday, 30 May 2009 11:12 a.m.
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] [Code Review] IAX timer not loading


I tested using preload to verify that it would fix the problem that I was
having with this.  I am using res_timing_pthreads.so and res_timing_dahdi.so
in my testing.  Both work just fine.

I think that David's patch to preload the res_ modules would be much more
simple, as long as none of those modules depend on res_timing_*.  The patch
should also modify the sample  modules.conf file, as the examples for
preloading res_odbc.so, res_config_odbc.so would not need to be there.  It
should probably also mention that res_* modules are loaded first in the
first comment block.

-Jonathan



On Fri, May 29, 2009 at 3:49 PM, Alec Davis <sivad.a at paradise.net.nz> wrote:


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


_______________________________________________
--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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090530/e6a2aaa4/attachment.htm 


More information about the asterisk-dev mailing list