Executing a Dialplan function on startup

Hello all !

I am running * in an embedded system (OpenWRT) with some * config stored in non volatile RAM.
I would like to read the config on * startup but can’t find how to run a dialplan function on * startup ?

The problem is that right now i must test on the 1st call if the config has been read and if not, do it before answering the call, and this takes a few seconds … and require the test function to be used in many locations …
I would rather read it on startup which would remove the need to test …

Any suggestion on how to tun a dialplan function (AGI) on startup ?
Or can anyone suggest another way ?

Thanks for any help …

Noël

Don’t know how to start Asterisk without reading config. But anyway, you can certainly use a script to start Asterisk - probably already do. In that script, run “asterisk -rx reload” or the like after server start.

Hello Valley …

I may not have explained properly …
I want asterisk to start normally, reading it’s config etc …
but then before a 1st call comes in i would need to read the config from NVRAM and set global variable in * so that the dialplan can use it.

So what i would need is to run a dialplan function that would call a script to read in the variable … when asterisk starts …
That’s what it does now but only when it gets the 1st call … i would want to do it at startup …

Tnx

Noel

If the only concern is global variables, set

[quote=“modules.conf”]preload => pbx_functions.so
[/quote]

Then use whatever function in [general] section.