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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Jul 14 12:47:23 CDT 2009


On Monday 13 July 2009 17:19:15 Philipp Kempgen wrote:
> Tilghman Lesher schrieb:
> > On Monday 13 July 2009 01:03:48 pm Philipp Kempgen wrote:
> >> Philipp Kempgen schrieb:
> >> > Is Asterisk supposed to evaluate #exec's in an #include'd file?
> >
> > The directive "#exec" is not permitted in an AEL configuration file.
>
> I see, that would explain why it doesn't work. :-)
>
> But in that case it's a documentation issue. The extensions.conf
> sample says: "The #exec command works on all asterisk configuration
> files." I guess it should read "The #exec command works on all
> asterisk *.conf files except for asterisk.conf."
>
> 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.

> 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.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)



More information about the asterisk-users mailing list