[asterisk-users] asterisk -C option not honored 100%

David Siefert dsiefert at grubhub.com
Tue Apr 28 14:19:38 CDT 2009


Tzafrir Cohen wrote:
> On Tue, Apr 28, 2009 at 01:19:08PM -0500, David Siefert wrote:
>   
>> Hello,
>>
>> I am trying to get a repeatable build setup for asterisk.  Part of doing 
>> so involves using the -C option to specify the master config file.  The 
>> problem is that asterisk reads the config file location that i specify, 
>> however it still tries to read two other config files, namely:
>>
>> * /etc/asterisk/extconfig.conf, and
>> * /etc/asterisk/logger.conf
>>
>> I have specified in my config file that the astetcpath maps to 
>> ${ENV(PWD)}/dev/etc/asterisk.  Sounds like these two files might be 
>> hard-coded paths in the distro?  Any way to fix this or work-around?
>>
>> I am running Asterisk 1.4.21.2~dfsg-1ubuntu3 on Ubuntu 8.10.
>>     
>
> That sounds odd.
>
> I've just tested it with the package from Debian Lenny (which is
> practically the sample package)
>
> mkdir /tmp/asterisk
> mkdir /tmp/asterisk/log
> mkdir /tmp/asterisk/run
> mkdir /tmp/asterisk/lib
> mkdir /tmp/asterisk/mods
> cp /etc/asterisk/logger.conf /etc/asterisk/extconfig.conf /tmp/asterisk
> cat <<EOF >/tmp/asterisk/asterisk.conf
> [directories]
> astetcdir => /tmp/asterisk
> astmoddir => /tmp/asterisk/mods
> astvarlibdir => /tmp/asterisk/lib
> astagidir => /usr/share/asterisk/agi-bin
> astspooldir => /var/spool/asterisk
> astrundir => /tmp/asterisk/run
> astlogdir => /tmp/asterisk/log
> EOF
> chown -R asterisk /tmp/asterisk
> asterisk -C /tmp/asterisk/asterisk.conf # -c , -r , -v, whatever
>
> However I did notice that the package is shipped with a bogus
> asterisk.conf that has [globals] instead of [directories] . Will be
> fixed.
>
> Anyway, please report bugs in packages to the packager (use reportbug).
>
>   

Yes, my asterisk.conf was using [globals] context rather than 
[directories].  That resolved the issue for me.  Thanks a ton!

${ENV(/var/)} however does not work in this config (like it should in 
dialplan config).  Is there a separate way of using environment 
variables in the master config, or should I just do some 
text-search-and-replace?

Thanks,
David



More information about the asterisk-users mailing list