[asterisk-users] #exec in #include'd file
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Tue Jul 14 16:49:43 CDT 2009
On Tuesday 14 July 2009 15:35:20 Philipp Kempgen wrote:
> 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?
For modules.conf, no, but extconfig.conf is re-read upon a 'module reload
extconfig' command. This permits changing realtime settings without
restarting Asterisk.
--
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)
More information about the asterisk-users
mailing list