Summary:ASTERISK-07311: safe_asterisk should stop if a configuration error occurs.
Reporter:Niels Basjes (basjes)Labels:
Date Opened:2006-07-09 06:09:35Date Closed:2011-06-07 14:03:14
Versions:Frequency of

Ik just downloaded Asterisk (packaged as RPM) from http://www.atrpms.net/dist/fc5/asterisk/ ans installed it on Fedora Core 5.

I started asterisk with the safe_asterisk script (from the original Digium dist). Actually this is what is called by the "service asterisk start" implementation that is packaged with this Fedora Specific RPM.

Now asterisk terminates with an error because I have not yet setup the configuration correctly (happens). Most of the configuration files are missing.....

The problem is that at this time the ONLY way to stop safe_asterisk is by killing the script explicitly using 'ps' and 'kill'.

Feature Request: If asterisk terminates because of a configuration error (like missing config file or syntax error in config file, etc.) then safe_asterisk should not retry to start the server.


This is the output when I try to run asterisk manually. This gives you an idea of the errors I have (yes, they're mine to fix) and what kind of errors I mean with this request.

[root@storage ~/Asterisk]# asterisk -gc
Asterisk, Copyright (C) 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'show license' for details.
[ Booting...Unable to open logger.conf: No such file or directory
Jul  9 13:08:32 NOTICE[8627]: manager.c:1678 init_manager: Unable to open management configuration manager.conf.  Call management disabled.
Jul  9 13:08:32 NOTICE[8627]: cdr.c:1191 do_reload: CDR simple logging enabled.
.......Jul  9 13:08:32 WARNING[8627]: res_musiconhold.c:1217 load_module: No music on hold classes configured, disabling music on hold..Jul  9 13:08:32 WARNING[8627]: pbx_ael.c:1146 ast_ael_compile: Unable to open '/etc/asterisk/extensions.ael': No such file or directory
Jul  9 13:08:32 WARNING[8627]: pbx.c:3762 ast_merge_contexts_and_delete: Requested contexts didn't get merged
..Jul  9 13:08:32 WARNING[8627]: pbx.c:3762 ast_merge_contexts_and_delete: Requested contexts didn't get merged
.Jul  9 13:08:32 ERROR[8627]: pbx_dundi.c:4574 set_config: Unable to load config dundi.conf
....Jul  9 13:08:32 NOTICE[8627]: chan_agent.c:1036 read_agent_config: No agent configuration found -- agent support disabled
..Jul  9 13:08:32 WARNING[8627]: chan_iax2.c:9599 load_module: Unable to open IAX timing interface: No such file or directory
Jul  9 13:08:32 ERROR[8627]: chan_iax2.c:8633 set_config: Unable to load config iax.conf
Jul  9 13:08:32 NOTICE[8627]: iax2-provision.c:515 iax_provision_reload: No IAX provisioning configuration found, IAX provisioning disabled.
..Jul  9 13:08:32 NOTICE[8627]: chan_mgcp.c:4113 reload_config: Unable to load config mgcp.conf, MGCP disabled
.Jul  9 13:08:32 NOTICE[8627]: chan_oss.c:1380 load_module: Unable to load config oss.conf
Jul  9 13:08:32 WARNING[8627]: loader.c:414 __load_resource: chan_oss.so: load_module failed, returning -1
Jul  9 13:08:32 WARNING[8627]: loader.c:554 load_modules: Loading module chan_oss.so failed!

Comments:By: Serge Vecher (serge-v) 2006-07-10 09:04:20

basjes: thanks for filing the bug, but the bug tracker is not the best tool for feature requests without patches. I suggest the following:
1) mail the asterisk-dev list mentioning those specifications and this bug #.
2) Also, if you have any funds available, please post a bounty for this feature on wiki at voip-info.org.
3) If, as a result of above steps, you have a disclaimed patch for latest trunk (new features don't go into release brances), please ask a bug-marshall or developer on #asterisk-bugs IRC channel or asterisk-dev mailing list to reopen this issue and attach the patch for review.