Asterisk -C not loading modules

Hi all,
I need to change my asterisk configuration files’ directory.
I saw that asterisk -C command is meant to allow that, however, when I launch asterisk with:
“asterisk -C /path/to/asterisk.conf” Some modules are not loaded, such as SIP, IAX2… (these are the ones I use most). In my asterisk.conf file in the “/path/to/” directory I’ve set:

astetcdir => /path/to/

And all my configuration files are in the same directory.

I’ve realised that modules are being loaded once I add any file (e.g. sip.conf) in /etc/asterisk/ so I guess asterisk is not getting the configuration from the asterisk.conf file I want.

Moreover, I checked “core show settings” and I get:

  Configuration file:          /path/to/asterisk.conf
  Configuration directory:     /etc/asterisk

Am I missing something?

I’m using Asterisk

Any help will be much appreciated!


No one?

as i remember, (!) at the end of section comments this section out.
try to remove it

Thanks so much elphssp!! I was about to go crazy and it had such a simple solution!

Thank you!