[Freeswitch-users] FS DB

seven dujinfang at gmail.com
Mon Mar 16 19:01:09 PDT 2009


In default configuration, all DB is located in FS/db/. It's sqlite DB,  
so if you have sqlite installed

# apt-get install sqlite3
$ cd /usr/local/freeswitch/db
$ sqlite3 core.db
SQLite version 3.4.2
Enter ".help" for instructions
sqlite> .help
.bail ON|OFF           Stop after hitting an error.  Default OFF
.databases             List names and files of attached databases
.dump ?TABLE? ...      Dump the database in an SQL text format
.echo ON|OFF           Turn command echo on or off
.exit                  Exit this program
.explain ON|OFF        Turn output mode suitable for EXPLAIN on or off.
.header(s) ON|OFF      Turn display of headers on or off
.help                  Show this message
.import FILE TABLE     Import data from FILE into TABLE
.indices TABLE         Show names of all indices on TABLE
.load FILE ?ENTRY?     Load an extension library
.mode MODE ?TABLE?     Set output mode where MODE is one of:
                          csv      Comma-separated values
                          column   Left-aligned columns.  (See .width)
                          html     HTML <table> code
                          insert   SQL insert statements for TABLE
                          line     One value per line
                          list     Values delimited by .separator string
                          tabs     Tab-separated values
                          tcl      TCL list elements
.nullvalue STRING      Print STRING in place of NULL values
.output FILENAME       Send output to FILENAME
.output stdout         Send output to the screen
.prompt MAIN CONTINUE  Replace the standard prompts
.quit                  Exit this program
.read FILENAME         Execute SQL in FILENAME
.schema ?TABLE?        Show the CREATE statements
.separator STRING      Change separator used by output mode and .import
.show                  Show the current values for various settings
.tables ?PATTERN?      List names of tables matching a LIKE pattern
.timeout MS            Try opening locked tables for MS milliseconds
.width NUM NUM ...     Set column widths for "column" mode
sqlite> .tables
aliases     calls       channels    complete    interfaces  tasks
sqlite> .schema channels
CREATE TABLE channels (
    uuid  VARCHAR(255),
    created  VARCHAR(255),
    created_epoch  INTEGER,
    name  VARCHAR(255),
    state  VARCHAR(255),
    cid_name  VARCHAR(255),
    cid_num  VARCHAR(255),
    ip_addr  VARCHAR(255),
    dest  VARCHAR(255),
    application  VARCHAR(255),
    application_data  VARCHAR(255),
    dialplan VARCHAR(255),
    context VARCHAR(255),
    read_codec  VARCHAR(255),
    read_rate  VARCHAR(255),
    write_codec  VARCHAR(255),
    write_rate  VARCHAR(255)
);
CREATE INDEX uuindex on channels (uuid);
sqlite> select * from channels
    ...> ;
sqlite>

On Mar 17, 2009, at 12:46 AM, Ali Al-Rubaie wrote:

>
> Actually, I'm trying to explore what data is stored in the DB and  
> how can we retrieve it, if it is posible. You may write some scripts  
> to retrieve the data and use it in other supporting application.
>
>
> Message: 7
> Date: Mon, 16 Mar 2009 12:24:34 -0400
> From: Michael Jerris <mike at jerris.com>
> Subject: Re: [Freeswitch-users] FS Database
> To: freeswitch-users at lists.freeswitch.org
> Message-ID: <1BF9A176-1CE8-4D53-894B-E456DA8897A0 at jerris.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Which data?
>
> On Mar 16, 2009, at 11:58 AM, Ali Al-Rubaie wrote:
>
> > Hi,
> >
> > Is it possible to access FS DB to retrieve data? Where can i find
> > details about that?
> -------------- next part
>  --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090316/d0d0a1b0/attachment.html
>
>
> ------------------------------
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> End of Freeswitch-users Digest, Vol 33, Issue 67
> ************************************************
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090317/a7cc7e13/attachment-0002.html 


More information about the FreeSWITCH-users mailing list