Hello,
I just noticed a weird behavior when using ODBC functions. If the content
of any of the paramter has a "=" inside, then the function is not processed
correctly by asterisk.
Let's take for example the following ODBC function in func_odbc.conf
[LOG_SMS]
dsn=asterisk1,asterisk2
synopsis=Log the route of a SMS
writesql=INSERT INTO
sm_smslogs(sm_te_id,sm_date,sm_direction,sm_sourceraw,sm_destraw,sm_from,sm_to,sm_body,sm_fullresult,sm_response)
values
('${ARG1}',NOW(),'${ARG2}','${ARG3}','${ARG4}','${ARG5}','${ARG6}','${SQL_ESC(${ARG7})}','${SQL_ESC(${ARG8})}','${SQL_ESC(${VAL1})}')
When it is called using:
[2015-08-31 16:35:16] VERBOSE[29562][C-00000001] pbx.c: Executing
[103@astsms:37] Set("Message/ast_msg_queue", "ODBC_LOG_SMS(1,ONNET,<
sip:[email protected];transport=UDP>,sip:[email protected];transport=UDP,102,103,Second
test 4,)=SUCCESS") in new stack
Asterisk interprets the first "=" as assignment. In the debug log I found:
Variable: ODBC_LOG_SMS(1,ONNET,<sip:[email protected];transport
AppData: UDP>,sip:[email protected];transport=UDP,102,103,Second test
4,)=SUCCESS
And the ODBC function is not executed.
Is there a way, beside using REPLACE, to avoid this problem?
Leandro
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users