[Home]

Summary:ASTERISK-08684: Passing a channel variable to func_odbc with comma in double quotes is parsed as two values
Reporter:Leif Madsen (lmadsen)Labels:
Date Opened:2007-01-29 13:34:56.000-0600Date Closed:2011-06-07 14:08:16
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I'm using func_odbc to write values to a database. When I perform the following in the dialplan:

Set(PARKING_RESV_SPACE(lmentinc)=701\,"${CHANNEL}")

Where CHANNEL contains:  Local/s@sub-callparking-248f,2

It seems Asterisk is parsing the comma out of the CHANNEL variable and giving it to func_odbc as a 3rd value (I should only have two ${VALx}: 701 and Local/s@sub-callparking-248f,2).

****** ADDITIONAL INFORMATION ******

The work around for this currently is if I do:

Set(PARKING_RESV_SPACE(lmentinc,"${CHANNEL}")=701

Then I get:

ARG1 = lmentinc
ARG2 = Local/s@sub-callparking-248f,2
VAL1 = 701
Comments:By: Tilghman Lesher (tilghman) 2007-01-29 14:00:29.000-0600

Solution is another set of escapes:

Set(ODBC_FOO(bar)=123\,\\"456\,789\\"\,012)

By: Tilghman Lesher (tilghman) 2007-01-29 14:01:46.000-0600

Set(PARKING_RESV_SPACE(lmentinc)=701\,\\"${CHANNEL}\\")