Asterisk
  1. Asterisk
  2. ASTERISK-5119

[patch] [post 1.2] PostgreSQL driver for Asterisk RealTime (res_config_pgsql)

    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:
      5262
    • Regression:
      No

      Description

      Port of existing MySQL driver for Asterisk RealTime to PostgreSQL.

                • ADDITIONAL INFORMATION ******

      The makefile in /res will need tweaking to supply Postgres headers and libs to link against.

      Quite a few ast_log() calls are with LOG_NOTICE - and should probably be changed to LOG_DEBUG once the code settles down a bit.

      1. Makefile.patch
        1 kB
      2. res_config_pgsq-0.40.c
        15 kB
      3. res_config_pgsql.50.c
        22 kB
      4. res_config_pgsql.51.c
        22 kB
      5. res_config_pgsql.c
        15 kB
      6. res_config_pgsql-0.39.c
        15 kB
      7. res_config_pgsql-0.42.c
        14 kB
      8. res_config_pgsql-new.c
        16 kB
      9. res_pgsql.conf
        5 kB
      10. res_pgsql.tar.gz
        6 kB

        Activity

        Hide
        Daniel Swarbrick added a comment -

        to mguesdeon:

        Be careful with your declaration of PGconn - you are not declaring it static, therefore it will be globally visible to all module. The cdr_pgsql module in Asterisk also declares a PGconn var non static, so you will clash with this. I discovered this bug a couple of months ago, and since fixing it locally, I have been running my own version of res_config_pgsql flawlessly on a production system.

        My version is availble under GPL in OpenPBX (www.openpbx.org), or attached with this bug. Since I have not signed the Digium disclaimer, nor do I intend to, my version Asterisk version of res_config_pgsql will have to live in asterisk-adddons.

        Show
        Daniel Swarbrick added a comment - to mguesdeon: Be careful with your declaration of PGconn - you are not declaring it static, therefore it will be globally visible to all module. The cdr_pgsql module in Asterisk also declares a PGconn var non static, so you will clash with this. I discovered this bug a couple of months ago, and since fixing it locally, I have been running my own version of res_config_pgsql flawlessly on a production system. My version is availble under GPL in OpenPBX (www.openpbx.org), or attached with this bug. Since I have not signed the Digium disclaimer, nor do I intend to, my version Asterisk version of res_config_pgsql will have to live in asterisk-adddons.
        Hide
        Manuel Guesdon added a comment -

        Thank you pressureman for the 'static' tip advice !

        About res_config_pgsql, I suggest we take one we can be integrated directly in asterisk.
        ssokol version and mne seems similar.

        I hope one can be integrated quickly before we have a 4th or 5th version

        Show
        Manuel Guesdon added a comment - Thank you pressureman for the 'static' tip advice ! About res_config_pgsql, I suggest we take one we can be integrated directly in asterisk. ssokol version and mne seems similar. I hope one can be integrated quickly before we have a 4th or 5th version
        Hide
        Steven Sokol added a comment -

        Uploaded version 0.50 which corrects a few fatal flaws in the version included in the tar. Specifically:

        12/12/05 - Corrected datatype in several sprintf statements. They still had the MySQL-specific datatypes declared.

        12/15/05 - Updated/corrected some of the error messages.

        Show
        Steven Sokol added a comment - Uploaded version 0.50 which corrects a few fatal flaws in the version included in the tar. Specifically: 12/12/05 - Corrected datatype in several sprintf statements. They still had the MySQL-specific datatypes declared. 12/15/05 - Updated/corrected some of the error messages.
        Hide
        Jared Smith added a comment -

        I've fixed up the patch for the Makefile so that it applies cleanly to the 1.2 branch makefile. (I'll test it on the trunk shortly.)

        I've also uploaded res_config_pgsql.51.c, which removes an unneeded MySQL header file.

        Disclaimer on file.

        Show
        Jared Smith added a comment - I've fixed up the patch for the Makefile so that it applies cleanly to the 1.2 branch makefile. (I'll test it on the trunk shortly.) I've also uploaded res_config_pgsql.51.c, which removes an unneeded MySQL header file. Disclaimer on file.
        Hide
        Matt O'Gorman (Inactive) added a comment -

        So because pressureman has no intention of submitting a disclaimer, and there is work being done on the other bug note 5637 I suggest steven and others move over there so that when we do have an implemntation that is trunk ready we can commit it.

        Show
        Matt O'Gorman (Inactive) added a comment - So because pressureman has no intention of submitting a disclaimer, and there is work being done on the other bug note 5637 I suggest steven and others move over there so that when we do have an implemntation that is trunk ready we can commit it.

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development