Asterisk
  1. Asterisk
  2. ASTERISK-2352

[post-1.0] [patch] res_sqlite, adds sqlite_switch, cdr engine, cli tools and SQL dialplan application by anthm

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Core/General
    • Labels:
      None
    • Mantis ID:
      2384
    • Regression:
      No

      Description

      This adds a load of features to asterisk.

      sqlite_switch:

      switch => SQlite/table

      sqlite_cdr: (no need to explain)

      sqlite_cli:

      Now you can do SQL queries from the asterisk CLI.

      sqlite_dialplanapp:

      the SQL application will let you do an SQL query from the Dialplan. This app blows away DBget/DBput. Its 10000% more flexable and powerful.

      exten => 555,1,SQL(SELECT balance,total,date FROM blah WHERE id=\'$

      {IDNUM}

      \')

      This will instantly pull balance, total and date into ${balance], $

      {total}

      and $

      {date}

      .

      All this thanks to anthm and Asterlink.com, be sure to visit our booth at Astricon.

      bkw

        Activity

        Hide
        florian added a comment -

        ScaredyCat pointed this one out to me tonight. One of the things that I'm concerned with is the locking when writes are being executed. SQLite appears to lock the entire file for writing when an update or insert is run. How would an asterisk box behave if users could use *<foo> codes to insert data into the SQLite database ? What if there's many users all toying with this ?

        Show
        florian added a comment - ScaredyCat pointed this one out to me tonight. One of the things that I'm concerned with is the locking when writes are being executed. SQLite appears to lock the entire file for writing when an update or insert is run. How would an asterisk box behave if users could use *<foo> codes to insert data into the SQLite database ? What if there's many users all toying with this ?
        Hide
        Brian West added a comment -

        Go read sqlite.org it has the info about this... It shouldn't be an issue.

        Show
        Brian West added a comment - Go read sqlite.org it has the info about this... It shouldn't be an issue.
        Hide
        scaredycat added a comment -

        I'm not usre you're quite right there bkw918 - res_sqlite doesn't appear to use SQLITE_BUSY (except in config_sqlite/sqlite_log), sqlite_busy_handler() or sqlite_busy_timeout().

        From sqlite.org

        Locking in SQLite is very course-grained. SQLite locks the entire database. Big database servers (PostgreSQL, Oracle, etc.) generally have finer grained locking, such as locking on a single table or a single row within a table. If you have a massively parallel database application, you should consider using a big database server instead of SQLite.

        When SQLite tries to access a file that is locked by another process, the default behavior is to return SQLITE_BUSY. You can adjust this behavior from C code using the sqlite_busy_handler() or sqlite_busy_timeout() API functions. See the API documentation for details.

        edited on: 10-01-04 04:57

        Show
        scaredycat added a comment - I'm not usre you're quite right there bkw918 - res_sqlite doesn't appear to use SQLITE_BUSY (except in config_sqlite/sqlite_log), sqlite_busy_handler() or sqlite_busy_timeout(). From sqlite.org Locking in SQLite is very course-grained. SQLite locks the entire database. Big database servers (PostgreSQL, Oracle, etc.) generally have finer grained locking, such as locking on a single table or a single row within a table. If you have a massively parallel database application, you should consider using a big database server instead of SQLite. When SQLite tries to access a file that is locked by another process, the default behavior is to return SQLITE_BUSY. You can adjust this behavior from C code using the sqlite_busy_handler() or sqlite_busy_timeout() API functions. See the API documentation for details. edited on: 10-01-04 04:57
        Hide
        Mark Spencer added a comment -

        This bug has been updated.

        Show
        Mark Spencer added a comment - This bug has been updated.
        Hide
        Russell Bryant added a comment -

        not included in the 1.0 branch

        Show
        Russell Bryant added a comment - not included in the 1.0 branch

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development