• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
   AsteriskGuru Archives Forum Index -> Asterisk-Dev
View previous topic :: View next topic  
Author Message
dvossel at digium.com
Guest





PostPosted: Thu May 28, 2009 2:06 pm    Post subject: [asterisk-dev] [Code Review] IAX timer not loading

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

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
Back to top
russell at digium.com
Guest





PostPosted: Fri May 29, 2009 8:32 pm    Post subject: [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:
Quote:

-----------------------------------------------------------
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
Back to top
dvossel at digium.com
Guest





PostPosted: Fri May 29, 2009 9:15 pm    Post subject: [asterisk-dev] [Code Review] IAX timer not loading

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

(Updated 2009-05-29 17:03:02.664803)


Review request for Asterisk Developers.


Changes
-------

This patch modifies the module load order to load all modules starting with "res_" first.


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 (updated)
-----

/trunk/main/loader.c 197680

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
Back to top
sivad.a at paradise.net.n
Guest





PostPosted: Fri May 29, 2009 9:59 pm    Post subject: [asterisk-dev] [Code Review] IAX timer not loading

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@lists.digium.com
[mailto:asterisk-dev-bounces@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:
Quote:

-----------------------------------------------------------
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.
Quote:


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
Back to top
jthurman42 at gmail.com
Guest





PostPosted: Fri May 29, 2009 10:21 pm    Post subject: [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@paradise.net.nz (sivad.a@paradise.net.nz)> wrote:
Quote:
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@lists.digium.com (asterisk-dev-bounces@lists.digium.com)
[mailto:asterisk-dev-bounces@lists.digium.com (asterisk-dev-bounces@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


Back to top
sivad.a at paradise.net.n
Guest





PostPosted: Sat May 30, 2009 1:33 am    Post subject: [asterisk-dev] [Code Review] IAX timer not loading

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@lists.digium.com [mailto:asterisk-dev-bounces@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@paradise.net.nz (sivad.a@paradise.net.nz)> wrote:
Quote:
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@lists.digium.com (asterisk-dev-bounces@lists.digium.com)
[mailto:asterisk-dev-bounces@lists.digium.com (asterisk-dev-bounces@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:
Quote:

-----------------------------------------------------------
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.
Quote:


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


Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Dev All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™