Re: [asterisk-users] #exec in #include'd file
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) ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
On Tue, Jul 14, 2009 at 11:47 AM, Tilghman Lesher tilgh...@mail.jeffandtilghman.com wrote: 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. I didn't exclude the #exec for any particular reason. I think it just wasn't in the original AEL (1.2) code, so I missed it... (or it escaped my all-powerful eyes somehow). If someone files a bug, I might be able to code up something to handle it in future releases. (just as a reminder for me). I guess you could, for the time being, put your #exec stuff in an extensions.conf file, and use the modules.conf tricks to preload the extensions.conf file first, if that is a requirement, as previously suggested... murf 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) ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Steve Murphy ParseTree Corp ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
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) ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
Tilghman Lesher schrieb: 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 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 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. Just found out that even a simple `asterisk -r` causes extconfig.conf to be re-read. That rules extconfig.conf out for what I am trying to do since I don't want to re-generate extensions.ael every time some- body connects to the Asterisk console. Looks like I should go for modules.conf then and implement a mechanism to avoid re-generating extensions.ael on the second pass in modules.conf. E.g. I could make the script not do anything if extensions.ael was modified less than 5 seconds ago. That's not perfect but should do the trick. Alternatively I could use load = pbx_config.so and put the #exec in extensions.conf as murf suggested. Need to play around a bit. Thanks to both of you and sorry for hijacking my own thread a bit. :-) 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] #exec in #include'd file
Hi, Is Asterisk supposed to evaluate #exec's in an #include'd file? 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
Philipp Kempgen schrieb: Is Asterisk supposed to evaluate #exec's in an #include'd file? I should probably add that it doesn't work for me in case that wasn't obvious. NOTICE[14143]: ael.flex:878 setup_filestack: --Read in included file /e-globals.ael, 1999 chars ERROR[14143]: ael.y:812 ael_yyerror: File: /e-globals.ael, Line 53, Cols: 8-58: Error: syntax error, unexpected word, expecting '=' The line in question is #exec /e-globals.ael.php execincludes is enabled. 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
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? I should probably add that it doesn't work for me in case that wasn't obvious. NOTICE[14143]: ael.flex:878 setup_filestack: --Read in included file /e-globals.ael, 1999 chars ERROR[14143]: ael.y:812 ael_yyerror: File: /e-globals.ael, Line 53, Cols: 8-58: Error: syntax error, unexpected word, expecting '=' The line in question is #exec /e-globals.ael.php execincludes is enabled. The directive #exec is not permitted in an AEL configuration file. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
Just out of curiousity (haven't got to AEL yet), should these exec's be re-written as AGI calls? -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tilghman Lesher Sent: Monday, July 13, 2009 4:17 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] #exec in #include'd file 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? I should probably add that it doesn't work for me in case that wasn't obvious. NOTICE[14143]: ael.flex:878 setup_filestack: --Read in included file /e-globals.ael, 1999 chars ERROR[14143]: ael.y:812 ael_yyerror: File: /e-globals.ael, Line 53, Cols: 8-58: Error: syntax error, unexpected word, expecting '=' The line in question is #exec /e-globals.ael.php execincludes is enabled. The directive #exec is not permitted in an AEL configuration file. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
On Mon, 13 Jul 2009, Danny Nicholas wrote: Just out of curiousity (haven't got to AEL yet), should these exec's be re-written as AGI calls? An exec is executed when the file is reloaded by Asterisk. An AGI, well, you know :) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
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? BTW: That's a good example of something to run in /etc/asterisk/startup.d/*.sh. Thread: http://lists.digium.com/pipermail/asterisk-users/2009-May/232318.html http://lists.digium.com/pipermail/asterisk-users/2009-May/232709.html The story is that I already have a script which recursively evaluates #include's and #exec's in AEL files and then writes extensions.ael. I wanted to get rid of the script because there's no clean way to have it run automatically before asterisk is about to be started but now I can't. 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. 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
Danny Nicholas schrieb: Just out of curiousity (haven't got to AEL yet), should these exec's be re-written as AGI calls? I don't think so. #exec's and AGI() are two entirely different concepts. 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] #exec in #include'd file
Steve Edwards schrieb: On Mon, 13 Jul 2009, Danny Nicholas wrote: Just out of curiousity (haven't got to AEL yet), should these exec's be re-written as AGI calls? An exec is executed when the file is reloaded by Asterisk. Except that in the case of AEL the #exec is not executed at all. :-) An AGI, well, you know :) 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 -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users