Summary:ASTERISK-06240: crush asterisk
Reporter:kent (kent)Labels:
Date Opened:2006-02-02 10:27:57.000-0600Date Closed:2007-06-29 12:22:07
Versions:Frequency of
Environment:Attachments:( 0) chan_h323.c.patch
Description: when load chan_h323.so  without exist h323.conf asterisk crush
Comments:By: opsys (opsys) 2006-02-02 10:40:18.000-0600

That is expected. If the module cannot get its configuration it will not load and as a result Asterisk will not load. Or did I miss something?

By: kent (kent) 2006-02-02 10:52:50.000-0600

if the module can't get own configuration it will not unload correct -> as result the crush asterisk

By: kent (kent) 2006-02-03 06:36:09.000-0600

i'am upload file(not patch) with changes to remove crush
 rewrite or apply to 1.2.3 and trunk version *

By: opsys (opsys) 2006-02-03 06:48:51.000-0600

Quickly looking at your patch, you have removed the test for checking if config is there. What perpose will be served by loading a modules that has no config file to tell it what to do.

Or an I missing what your problem is?

Can you give an example?

By: kent (kent) 2006-02-03 07:05:08.000-0600

Quickly looking at chan_sip i can't find what module chan_sip do if not find sip.conf

By: opsys (opsys) 2006-02-05 10:22:46.000-0600

You are correct, If sip.conf does not exist Asterisk starts but does not load any configs, therefore making SIP useless.

However if zapata.conf is not found it fails, Even a zero length zapata file will have asterisk load.

Question is, What is the correct behavior, Do we want asterisk to ignore missing config files, or do we want it to fail on load until module is removed??

Looking at chan_zap.c we have a function that looks for the config file, however it just checks for existance of 'a' file not a valid config file.

       cfg = ast_config_load(config);

       /* We *must* have a config file otherwise stop immediately */
       if (!cfg) {
               ast_log(LOG_ERROR, "Unable to load config %s\n", config);
               return -1;

Is this something that we should have on each channel??

This is not a critical error but more of a housekeeping issue, This will also be impacted by the use of RealTime and dymanic configs. I will let others deside if it is better to add checks to each module, or remove(gasp) the check at load time.

By: Joshua C. Colp (jcolp) 2007-06-29 12:22:06

This issue should already be fixed.