[asterisk-users] #exec in #include'd file

Philipp Kempgen philipp.kempgen at amooma.de
Tue Jul 14 15:35:20 CDT 2009


Tilghman Lesher schrieb:
> On Monday 13 July 2009 17:19:15 Philipp Kempgen wrote:

>> Is there a specific reason not to permit #exec in AEL files?
> 
> It wasn't coded that way, and it's parsed in a completely different way than
> any other Asterisk configuration file.  I don't know the reason Murf didn't
> do '#exec' specifically, but I suspect it has to do with the complexity
> thereof.

Thanks for the clarification.
I was under the (false) assumption that #include and #exec were some
kind of "preprocessor directives" which would be evaluated before any
parsing is done, bu that is not true, at least not for extensions.ael.

>> Is any *.conf file (which permits #exec) guaranteed to be read before
>> extensions.ael? It would then be possible to (ab)use an #exec in there
>> to trigger my generator script (which must not output anything then of
>> course). extconfig.conf? logger.conf? modules.conf? Ugly workaround
>> but doable.
> 
> No, but you can force it by doing an explicit load of a particular module in
> modules.conf.  Explicitly loaded modules are loaded before all
> automatically-loaded modules.

I'm thinking about the options in following:
a) load => extconfig   ; possible?
   #exec in extconfig.conf.
b) #exec in modules.conf itself

Need to figure out if load is enough or if I should preload the module.

And that raises the question how often Asterisk will reload
extconfig.conf and modules.conf.
It certainly reads modules.conf twice on startup and reads
extconfig.conf on startup and reload.
Do any other events make Asterisk re-read these files?


    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 



More information about the asterisk-users mailing list