[asterisk-users] Problem loading AstDB into variable on restart

Gordon Henderson gordon+asterisk at drogon.net
Mon Feb 5 08:56:49 MST 2007


On Sun, 4 Feb 2007, Yuan LIU wrote:

> I define
>
> [globals]
> myvar = ${DB(store/myvar)}
>
> ---
> But when I want to use ${myvar} in the dial plan, I found that the variable 
> is null when Asterisk is restarted.  Only a reload would force globals to 
> read AstDB.  Other variables in globals loads fine.
>
> Any idea? (Asterisk 1.2.13)

The DB module isn't loaded at asterisk boot time when the extensions.conf 
is parsed... I have the same problem, tried to fix it by forceloading the 
database modules, but either I didn't dully understand what it was doing, 
or it just didn't work, so my /etc/init.d script now has a wait for a 
couple of seconds after asterisk -p, then a asterisk -rx 'extensions 
reload' ...

Not perfect and probably an abuse of the dialplan, but ...

Gordon


More information about the asterisk-users mailing list