Summary: | ASTERISK-29452: Invalid Input Value for enum yesno_values in SQL Query | ||||
Reporter: | Michael Reinisch (reinisch) | Labels: | ari postgresql sorcery | ||
Date Opened: | 2021-05-26 08:07:35 | Date Closed: | 2021-05-26 08:48:44 | ||
Priority: | Minor | Regression? | |||
Status: | Closed/Complete | Components: | Core/Sorcery | ||
Versions: | 16.18.0 18.3.0 18.4.0 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | OS: Debian 10 PostgreSql version: 11.12 | Attachments: | ( 0) asterisk_schema.sql | ||
Description: | I configured Asterisk 18.4 with a realtime pgsql and ari.
The schema was created via alembic with the config file asterisk-18.4.0/contrib/ast-db-manage/config.ini-sample. I just changed the sqlalchemy url. I tried to add a new entry to the aor table via the ARI, using : http://ari.asterisk.org/#!/asterisk {noformat} [May 26 09:35:05] VERBOSE[578] res_ari.c: <--- ARI request received from: XX.XX.XX.XX:37326 ---> Host: XX.XX.XX.XX:8088 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0 Accept: */* Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/json Content-Length: 108 Origin: http://ari.asterisk.org Connection: keep-alive Referer: http://ari.asterisk.org/ api_key: asterisk:asterisk body: { "fields": [ { "attribute": "max_contacts", "value": "1" }, { "attribute": "support_path", "value": "yes" } ] } {noformat} Error Message: {noformat} [May 26 09:35:05] DEBUG[578] res_config_pgsql.c: PostgreSQL RealTime: Update SQL: UPDATE ps_aors SET minimum_expiration = '60', default_expiration = '3600', qualify_timeout = '3.000000', mailboxes = '', support_ path = 'true', voicemail_extension = '', max_contacts = '1', authenticate_qualify = 'false', contact = '', maximum_expiration = '7200', qualify_frequency = '0', remove_existing = 'false', outbound_proxy = '' WHE RE id = '9100' [May 26 09:35:05] DEBUG[578] res_config_pgsql.c: PostgreSQL query attempt 1 [May 26 09:35:05] ERROR[578] res_config_pgsql.c: PostgreSQL RealTime: Failed to query 'ps_aors@asterisk'. [May 26 09:35:05] ERROR[578] res_config_pgsql.c: PostgreSQL RealTime: Query Failed: UPDATE ps_aors SET minimum_expiration = '60', default_expiration = '3600', qualify_timeout = '3.000000', mailboxes = '', suppor t_path = 'true', voicemail_extension = '', max_contacts = '1', authenticate_qualify = 'false', contact = '', maximum_expiration = '7200', qualify_frequency = '0', remove_existing = 'false', outbound_proxy = '' W HERE id = '9100' [May 26 09:35:05] ERROR[578] res_config_pgsql.c: PostgreSQL RealTime: Query Failed because: ERROR: invalid input value for enum yesno_values: "true" LINE 1: ...eout = '3.000000', mailboxes = '', support_path = 'true', vo... ^ (PGRES_FATAL_ERROR) [May 26 09:35:05] DEBUG[578] res_config_pgsql.c: PostgreSQL query attempt 1 {noformat} The schema for yesno_values is the following: {noformat} create type yesno_values as enum ('yes', 'no'); {noformat} | ||||
Comments: | By: Asterisk Team (asteriskteam) 2021-05-26 08:07:36.795-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur. Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/]. By: Asterisk Team (asteriskteam) 2021-05-26 08:07:38.240-0500 The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process. By: Michael Reinisch (reinisch) 2021-05-26 08:10:37.230-0500 Attached File : Alembic exported SQL-Schema By: Michael Reinisch (reinisch) 2021-05-26 08:45:00.220-0500 Why did you closes this issue? The other Issue has as affected Version one that is EOL and is open since 14/Sep/17. By: Asterisk Team (asteriskteam) 2021-05-26 08:45:00.390-0500 This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable. By: Joshua C. Colp (jcolp) 2021-05-26 08:48:24.287-0500 It's the same issue, applicable to latest versions as well. The issue just hasn't been updated to reflect that. |