[asterisk-users] Asterisk Database

Steve Edwards asterisk.org at sedwards.com
Tue Apr 21 12:09:43 CDT 2009


On Tue, 21 Apr 2009, Benny Amorsen wrote:

> "Sriram" <d_r_sriram at hotmail.com> writes:
>
>> 1. I need to store the CallerId of the PSTN caller with his language
>> preference so that next time he is played the prompt in his language that
>> he chose the first time.What would be better - storing his number in the
>> Asterisk DB and using Dbput and DBget ? or storing it in MySQL from the
>> dial plan and quering it everytime to see the callers record ? how many
>> records can AstDB handle safely ? In my case the total records wont exceed
>> 20,000 since there are many repeat callers ?
>
> Asterisk DB is either an SQLite database or a Berkeley database, I
> forget which (did it change?). Either way, 20,000 should be a problem
> for the underlying database.

1.2 uses Berkeley:

 	file /var/lib/asterisk/astdb
 	/var/lib/asterisk/astdb: Berkeley DB 1.85/1.86 (Btree, version 3,
 	native byte-order)

> I'd still go for the "real" database (using Postgres, but I guess you
> can use MySQL if you feel like it), probably using func_ODBC. With
> Asterisk DB you have to go through Asterisk to view or change contents
> of the database; a real database makes management easier.

+1 for MySQL (or whatever "real" DB you know). Bet on your boss asking 
questions like: "Can I have a web page with a pretty pie graph showing the 
breakdown of who joined with one of those calendar thingies so I can 
choose a date range?"

Using the "-r -x foo" command line interface or talking to Asterisk's 
database "behind its back" both sound like bad ideas to me. Imagine if you 
muck something up and it corrupts the database and you can't restart 
Asterisk.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list