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.<br><br> I think that David&#39;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.<br>
<br>-Jonathan<br><br><br><div class="gmail_quote">On Fri, May 29, 2009 at 3:49 PM, Alec Davis <span dir="ltr">&lt;<a href="mailto:sivad.a@paradise.net.nz">sivad.a@paradise.net.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Something has changed between versions. If only <a href="http://svn.digium.com/view" target="_blank">svn.digium.com/view</a> was<br>
working, might have been able to track down what changed when, also maybe<br>
not ....<br>
<br>
The bug I reported <a href="https://issues.asterisk.org/view.php?id=15191" target="_blank">https://issues.asterisk.org/view.php?id=15191</a> comes up as<br>
trunk mode only on an old version SVN r178446m, but newer versions fail.<br>
<br>
Jthurman suggests <a href="https://issues.asterisk.org/view.php?id=15191#105720" target="_blank">https://issues.asterisk.org/view.php?id=15191#105720</a><br>
preloading timing resource in modules.conf<br>
<br>
Added &#39;preload =&gt; res_timing_dahdi.so&#39; in modules.conf, on the following,<br>
now IAX trunk comes up as trunk mode after every asterisk restart.<br>
SVN-trunk-r192214M<br>
SVN-trunk-r181371M<br>
SVN-trunk-r178919M<br>
<br>
I&#39;ve checked SVN-trunk-r178446M and it doesn&#39;t have &#39;preload =&gt;<br>
res_timing_dahdi.so&#39; in modules.conf, and all trunks come up in trunk mode<br>
after every restart.<br>
<br>
What about res_timing_pthread.so for installations without timing hardware?<br>
<br>
My vote: &#39;to force the loader to preload timing modules&#39; which will then<br>
work for existing installations that may upgrade, where &#39;make samples&#39;<br>
probably won&#39;t be run.<br>
<br>
Changing only the default sample file modules.conf.samples will only help<br>
new installations, where &#39;make samples&#39; probably would run.<br>
<font color="#888888"><br>
Alec Davis<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</a><br>
[mailto:<a href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</a>] On Behalf Of Russell Bryant<br>
Sent: Saturday, 30 May 2009 9:18 a.m.<br>
To: David Vossel; Russell Bryant; Asterisk Developers<br>
Subject: Re: [asterisk-dev] [Code Review] IAX timer not loading<br>
<br>
<br>
-----------------------------------------------------------<br>
This is an automatically generated e-mail. To reply, visit:<br>
<a href="http://reviewboard.digium.com/r/262/#review808" target="_blank">http://reviewboard.digium.com/r/262/#review808</a><br>
-----------------------------------------------------------<br>
<br>
<br>
This is a tricky situation.  :-)<br>
<br>
One thing with this patch is that while it prevents the code from accepting<br>
trunked calls before Asterisk fully starts, it will not prevent Asterisk<br>
from starting up outbound trunked calls.  So, there is still some potential<br>
for failure here.<br>
<br>
The only things that I can think of that would make this work make the patch<br>
even more complicated and module initialization even more bizarre.<br>
<br>
I am really liking just patching the loader to force timing modules to get<br>
preloaded.  My current suggestion is to write a new patch that goes that<br>
route, and then we&#39;ll see what comments show up on the code review.  It<br>
seems like a reasonable thing to let modules assume that fundamental<br>
subsystems, such as the timing interface, are fully initialized before they<br>
get loaded.  Otherwise, the code is really going to get ugly.<br>
<br>
- Russell<br>
<br>
<br>
On 2009-05-28 09:57:40, David Vossel wrote:<br>
&gt;<br>
&gt; -----------------------------------------------------------<br>
&gt; This is an automatically generated e-mail. To reply, visit:<br>
&gt; <a href="http://reviewboard.digium.com/r/262/" target="_blank">http://reviewboard.digium.com/r/262/</a><br>
&gt; -----------------------------------------------------------<br>
&gt;<br>
&gt; (Updated 2009-05-28 09:57:40)<br>
&gt;<br>
&gt;<br>
&gt; Review request for Asterisk Developers.<br>
&gt;<br>
&gt;<br>
&gt; Summary<br>
&gt; -------<br>
&gt;<br>
&gt; When loading chan_iax2, a timer is opened.  If this timer fails to open<br>
trunk peers/users may not be built correctly.  Depending on the order<br>
Asterisk loads modules, the timer may or may not be loaded before chan_iax2.<br>
If it is not loaded before hand, trunk peers/users will not be set up even<br>
though a timing interface may be possible.  This patch waits until Asterisk<br>
is fully booted to create the timer.  If the timer fails, all trunked<br>
peers/users&#39; IAX_TRUNK flags are cleared and a warning message appears.<br>
&gt;<br>
&gt;<br>
&gt; This addresses bug 15191.<br>
&gt;     <a href="https://issues.asterisk.org/view.php?id=15191" target="_blank">https://issues.asterisk.org/view.php?id=15191</a><br>
&gt;<br>
&gt;<br>
&gt; Diffs<br>
&gt; -----<br>
&gt;<br>
&gt;   /trunk/channels/chan_iax2.c 197192<br>
&gt;<br>
&gt; Diff: <a href="http://reviewboard.digium.com/r/262/diff" target="_blank">http://reviewboard.digium.com/r/262/diff</a><br>
&gt;<br>
&gt;<br>
&gt; Testing<br>
&gt; -------<br>
&gt;<br>
&gt; tested with and without loading the timer module. worked correctly.<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; David<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
<br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br>