[asterisk-dev] modules.conf - loading modules

Olle E. Johansson oej at edvina.net
Thu Nov 5 07:55:30 CST 2009


5 nov 2009 kl. 14.49 skrev Tzafrir Cohen:

> On Thu, Nov 05, 2009 at 07:35:08AM -0600, Kevin P. Fleming wrote:
>> Olle E. Johansson wrote:
>>
>>> If I add a load= directive for a module in asterisk's modules.conf,
>>> and it doesn't load Asterisk proceeds happily.
>>> I would like a new statement where if Asterisk can't load the module
>>> for some reason - bad config, bad compilation or something else,
>>> Asterisk fails utterly and fails to start.
>>
>> This should not be true; if the module's load_module() function  
>> returns
>> AST_MODULE_LOAD_FAILURE, the loading process will be stopped and
>> Asterisk will not continue starting up. The only way for the module  
>> to
>> let Asterisk continue loading is for that function to return one of  
>> the
>> other AST_MODULE_LOAD_<xxx> values.
>
> Maybe this is something similar to what Olle meant:
>
> Should Asterisk bail out if UDP port 5060 is busy?
>
> Normally: nah.
>
> But in some cases it would be a fatal error.
>

That's a module configuration issue that takes it even farther.

I was still at the basic level. If a module is loaded because I have  
"autoload=yes" and it fails, nevermind.

If I have load= I think Asterisk should fail. But since it doesn't do  
that today we need a new configuration option for it,
like "require=".

Level 2 would be to implement clauses for a module to fail in the  
module configuration. If manager is enabled and the port can't be  
opened for some reason in a call center environment - FAIL. If I have  
configured SIP for multiple sockets and one fails - then it's up to  
the configuraiton to decide if this is a critical failure. As a  
minimum I should get a manager event.

/O



More information about the asterisk-dev mailing list