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

Min Hwan Chang minchang at gmail.com
Fri Mar 3 16:02:29 MST 2006


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



More information about the asterisk-users mailing list