Astdb is an internal database of Asterisk used to perform basic operations, so we are not forced to install a more complex and heavy database such as MySQL, PostgreSQL or any other. The Asterisk database is organized by families, in each family there are keys that are the final values.
-
Write:
exten => _X.,n,Set(DB(${PEER}/parking)=${PARKINGEXTEN}})
-
Leer:
exten => _X.,n,Set(PARKING=${DB(${PEER}/parking)})
-
Borrar:
exten => 457,1,DBdel(test/count) --> Borra la llave exten => 457,1,DBdeltree(test) --> Borra la familia
Un ejemplo podrÃa ser el siguiente:
exten => *301,1,Answer()
exten => *301,n,GotoIf($["${DB(survey/activated)}" = "1"]?activated)
exten => *301,n,Set(DB(survey/activated)=1)
exten => *301,n,Playback(beep)
exten => *301,n,Hangup()
exten => *301,n(activated),Set(DB(survey/activated)=0)
exten => *301,n,Playback(beep)
exten => *301,n,Hangup()