Asterisk
  1. Asterisk
  2. ASTERISK-4925

[patch] [post 1.2] Simple SQL queries from the dialplan

    Details

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

      Description

      This function allows templated SQL queries to be made from the dialplan.

        Activity

        Hide
        Tilghman Lesher added a comment -

        The other reason I'm not willing to set ODBCROWS in the case of a read is that you can have multiple functions within the execution of a single application. In that case, the meaning of ODBCROWS is ambiguous as to which function call return it refers to.

        Show
        Tilghman Lesher added a comment - The other reason I'm not willing to set ODBCROWS in the case of a read is that you can have multiple functions within the execution of a single application. In that case, the meaning of ODBCROWS is ambiguous as to which function call return it refers to.
        Hide
        hristo added a comment -

        Just wanted to confirm that ODBCROWS is now correctly set to -1 if DB is down.

        I have noticed something else (not directly related to func_odbc) - asterisk fails to reconnect to the database when DB is up again. It reconnects after you issue "odbc show" in the CLI, but not if a function (or even ARA enabled SIP, dialplan, etc) tries to use the odbc connection. I guess this is for another bug but just wanted to mention it as it is somewhat related.

        Show
        hristo added a comment - Just wanted to confirm that ODBCROWS is now correctly set to -1 if DB is down. I have noticed something else (not directly related to func_odbc) - asterisk fails to reconnect to the database when DB is up again. It reconnects after you issue "odbc show" in the CLI, but not if a function (or even ARA enabled SIP, dialplan, etc) tries to use the odbc connection. I guess this is for another bug but just wanted to mention it as it is somewhat related.
        Hide
        wlloyd added a comment -

        I've also noticced the reconnect issue. I was wondering if it was just something in my setup. The ODBC server in my case is Postgres. If I restart the postgres daemon asterisk is never able to handle a dialplan query, cdr update etc. Maybe we should open a second bug.

        Show
        wlloyd added a comment - I've also noticced the reconnect issue. I was wondering if it was just something in my setup. The ODBC server in my case is Postgres. If I restart the postgres daemon asterisk is never able to handle a dialplan query, cdr update etc. Maybe we should open a second bug.
        Hide
        Tilghman Lesher added a comment -

        You are correct in that it is a separate unrelated issue.

        Show
        Tilghman Lesher added a comment - You are correct in that it is a separate unrelated issue.
        Hide
        Tilghman Lesher added a comment -

        Committed to trunk

        Show
        Tilghman Lesher added a comment - Committed to trunk

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development