Summary: | ASTERISK-14177: func_odbc is broken in 1.4.25 | ||
Reporter: | Alex Hermann (alexh) | Labels: | |
Date Opened: | 2009-06-12 06:15:07 | Date Closed: | 2009-07-13 09:56:36 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Functions/func_odbc |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I upgraded from 1.4.23 to 1.4.25 and now func_odbc is broken. The first query returns a result, but with a superfluous backslash at the end. The second query returns nothing. The following dialplan an log snippets demonstrate the problem: [to-customer] ; Retrieve accountname exten = _X.,1,Set(account=${CRM_GET_ACCOUNT(${EXTEN})}) exten = _X.,n,Verbose(account=${account}) ; If account is empty, try again exten = _X.,n,Set(account=${IF($[ "${account}" = "" ]?${CRM_GET_ACCOUNT(${EXTEN})}:${account})}) exten = _X.,n,Verbose(account=${account}) log: VERBOSE[3472] logger.c: -- Executing [1234567890@from-proxy:2] Goto("SIP/proxy-081db9d0", "to-customer|1234567890|1") in new stack VERBOSE[3472] logger.c: -- Goto (to-customer,1234567890,1) DEBUG[3472] pbx.c: Function result is '1234567890' DEBUG[3472] pbx.c: Function result is 'testaccount\' DEBUG[3472] pbx.c: Launching 'Set' VERBOSE[3472] logger.c: -- Executing [1234567890@to-customer:1] Set("SIP/proxy-081db9d0", "account=testaccount\") in new stack DEBUG[3472] pbx.c: Launching 'Verbose' VERBOSE[3472] logger.c: -- Executing [1234567890@to-customer:2] Verbose("SIP/proxy-081db9d0", "account=testaccount") in new stack VERBOSE[3472] logger.c: account=testaccount DEBUG[3472] pbx.c: Expression result is '0' DEBUG[3472] pbx.c: Function result is '1234567890' DEBUG[3472] pbx.c: Function result is 'testaccount\' DEBUG[3472] pbx.c: Function result is '' DEBUG[3472] pbx.c: Launching 'Set' VERBOSE[3472] logger.c: -- Executing [1234567890@to-customer:3] Set("SIP/proxy-081db9d0", "account=") in new stack DEBUG[3472] pbx.c: Launching 'Verbose' VERBOSE[3472] logger.c: -- Executing [1234567890@to-customer:4] Verbose("SIP/proxy-081db9d0", "account=") in new stack VERBOSE[3472] logger.c: account= The SQL function in func_odbc.conf always returns exactly 1 result: [SQL](!) dsn=telephony prefix=CRM [GET_ACCOUNT](SQL) readsql=SELECT `username` FROM `extensions` WHERE `extension` = '${SQL_ESC(${ARG1})}' ORDER BY `extension` DESC LIMIT 1 | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-06-12 08:42:16 Temporary workaround: if you have no commas in your data, you can set 'escapecommas=no' and it will work as before. By: Digium Subversion (svnbot) 2009-06-29 14:36:02 Repository: asterisk Revision: 204170 U branches/1.4/funcs/func_odbc.c U branches/1.4/funcs/func_strings.c ------------------------------------------------------------------------ r204170 | tilghman | 2009-06-29 14:36:01 -0500 (Mon, 29 Jun 2009) | 3 lines Revision 189537 was supposed to make 1.4 more correct. Instead, it broke func_odbc. Reverting. (closes issue ASTERISK-14177, issue ASTERISK-13703) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204170 By: Digium Subversion (svnbot) 2009-06-29 14:36:58 Repository: asterisk Revision: 204171 _U trunk/ ------------------------------------------------------------------------ r204171 | tilghman | 2009-06-29 14:36:57 -0500 (Mon, 29 Jun 2009) | 9 lines Blocked revisions 204170 via svnmerge ........ r204170 | tilghman | 2009-06-29 14:36:01 -0500 (Mon, 29 Jun 2009) | 3 lines Revision 189537 was supposed to make 1.4 more correct. Instead, it broke func_odbc. Reverting. (closes issue ASTERISK-14177, issue ASTERISK-13703) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=204171 |