[Asterisk-Users] Does an entry in AstDB stay after reboot?

Douglas Garstang dgarstang at oneeighty.com
Fri Mar 3 17:25:58 MST 2006


The file is at /var/lib/asterisk/astdb

-----Original Message-----
From: Joseph Tanner [mailto:joseph at thetechguide.com]
Sent: Friday, March 03, 2006 5:17 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Does an entry in AstDB stay after reboot?


Yes, the AstDB is not erased on a reboot.  All values are saved.  I
don't know the exact location, but you can back it up and restore on
another server if you wished, useful for upgrading.

Joseph Tanner

On 3/3/06, Min Hwan Chang <minchang at gmail.com> wrote:
> I set up a call forwarding script in extensions.conf which uses the
> AstDB but I'm wondering if I reboot the server, will the entry in
> AstDB still reside?
>
> What the script does is when a call comes in, it check to see if there
> is a null value or a call forward number.  If null, it will call the
> local office connections.  If there is a number, it calls that.  Now I
> just need to know if I reboot the system, the current value will still
> be in the AstDB, I don't want to reboot the system and then find out
> the key is always getting erased.  Thanks all for the help.
>
> exten => s,1,Answer()
> exten => s,2,DBget(WHEE=CFIM/temp)
> exten => s,3,GotoIf($["${WHEE}" = "0"]?s-NoCFIM,1:s-CFIM,1)
>
> ; If call forward number in AstDB, then call that number
> exten => s-CFIM,1,DBget(WHEE=CFIM/temp)
> exten => s-CFIM,2,Dial(Zap/g0/${WHEE},20,tm)
> exten => s-CFIM,102,Voicemail,u203
> exten => s-CFIM,103,Voicemail,b203
>
> ; The 0 signifies no call forwarding.
> exten => s-NoCFIM,1,Dial(${PHONE1}&${PHONE2}&${PHONE3},10,tr)
> exten => s-NoCFIM,2,Wait(1)
> exten => s-NoCFIM,3,DigitTimeout(3)
> exten => s-NoCFIM,4,ResponseTimeout(7)
> exten => s-NoCFIM,5,Background(/var/lib/asterisk/sounds/hello)
> ;exten => s-NoCFIM5,Background(/var/lib/asterisk/sounds/vacation)
> exten => s-NoCFIM,6,Wait(1)
> exten => s-NoCFIM,7,Voicemail,u203
> exten => s-NoCFIM,8,Voicemail,b203
> exten => s-NoCFIM,9,Hangup()
>
> [call forward options]
> ; Creates a call forward
> exten => _44X.,1,DBput(CFIM/temp=${EXTEN:2})
> exten => _44X.,2,Hangup
> ; Null character.
> exten => 4455,1,DBput(CFIM/temp=0)
> exten => 4455,2,Hangup
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list