Func_odbc writesql statement

Hi all…

i rarely use writesql inside func_odbc …i was wondering…is there a way to know about insert result ?

On the cli i see:

Executing [s@reglettura:3] Set(“SIP/200-00000000”, “ODBC_IVRREGISTRAZIONE()=6102894,40922,1,‘2018-07-17’,2,1365,1365,‘Lett.Aut.Centr.’,5,02,99,‘MTSB032800659404’”) in new stack

but nothing about insert result…even if it goes well or bad

I don’t believe it returns anything to the dialplan. It just outputs a log message to the console.

If you want to catch the return value you will need to use shell ( ) function and Noop the value

Hi ambiorixg12…and thanks…

have you a working example to share?

Shell function will save the output of your command on a variable, so if your sql insert statement return any output it will be on that variable, In my case I used select

``same=>n,Set(did=${SHELL( mysql -h 127.0.0.1 --user=root --password=‘122233’ --skip-column-names did_timeout -e “select did from did where did=’${EXTEN}'limit 1”)})`