Before reporting as a bug, I’d like to check with you if I am doing something wrong. When using an ODBC function, if any of the fields contains a double quote, the field ordering and value results are wrong. I have tried with the use of the ARRAY and HASH function
If I use a simple function like:
[QUERY_BUG]
dsn=asterisk1,asterisk2
synopsis=Get a double quote
readsql=SELECT "George \“o Neal” as name,987897 as number from DUAL
With a simple dialplan
9998 => {
NoOp(This is a test);
Set(ARRAY(name,number)=${ODBC_QUERY_BUG()});
NoOp(The name value is ${name} and the number value is ${number});
Set(HASH(varhash)=${ODBC_QUERY_BUG()});
NoOp(The varhash name value is ${HASH(varhash,name)} and the varhash number value is ${HASH(varhash,number)});
Hangup();
}
The result is not what is expected:
-- Executing [9998@authenticated:1] NoOp("PJSIP/104-DEVEL-000000cc", "This is a test") in new stack
-- Executing [9998@authenticated:2] Set("PJSIP/104-DEVEL-000000cc", "ARRAY(name,number)=George "o Neal,987897") in new stack
-- Executing [9998@authenticated:3] NoOp("PJSIP/104-DEVEL-000000cc", "The name value is George o Neal,987897 and the number value is ") in new stack
-- Executing [9998@authenticated:4] Set("PJSIP/104-DEVEL-000000cc", "HASH(varhash)=George "o Neal,987897") in new stack
-- Executing [9998@authenticated:5] NoOp("PJSIP/104-DEVEL-000000cc", "The varhash name value is George o Neal,987897 and the varhash number value is ") in new stack
Is there a way to get around this problem?