Hello,<br><br> Now I'm testing func_odbc and hash. My configurations are:<br><br>func_odbc.conf<br>[GETNUMBER]<br>dsn=sqlserver<br>;mode=multirow<br>;rowlimit=10<br>readsql=SELECT number,real_number1,real_number2,status FROM ivr.dbo.numbers WHERE number=${SQL_ESC(${ARG1})}<br>
<br>extensions.conf<br>exten => s,1,Ringing<br>exten => s,n,Wait(4)<br>exten => s,n,Answer<br>exten => s,n,Set(NUMERIS=37037210602)<br>exten => s,n,Set(HASH(RESULTATAS)=${ODBC_GETNUMBER(${NUMERIS})})<br>exten => s,n,Verbose(1, Number is ${HASH(RESULTATAS, number)}.)<br>
exten => s,n,Verbose(1, Realus 1 ${HASH(RESULTATAS, real_number1)}.)<br>exten => s,n,Verbose(1, Realus 2 ${HASH(RESULTATAS, real_number2)}.)<br>exten => s,n,Verbose(1, Statusas ${HASH(RESULTATAS, status)}.)<br>
<br>And asterisk output is:<br><br>== Using SIP RTP CoS mark 5<br> -- Executing [555@from-trunk:1] Goto("SIP/sip.call.lt-01993050", "odbc-test,s,1") in new stack<br> -- Goto (odbc-test,s,1)<br> -- Executing [s@odbc-test:1] Ringing("SIP/sip.call.lt-01993050", "") in new stack<br>
-- Executing [s@odbc-test:2] Wait("SIP/sip.call.lt-01993050", "4") in new stack<br> -- Executing [s@odbc-test:3] Answer("SIP/sip.call.lt-01993050", "") in new stack<br> -- Executing [s@odbc-test:4] Set("SIP/sip.call.lt-01993050", "NUMERIS=111") in new stack<br>
-- Executing [s@odbc-test:5] Set("SIP/sip.call.lt-01993050", "HASH(RESULTATAS)=111,222,333,2") in new stack<br> -- Executing [s@odbc-test:6] Verbose("SIP/sip.call.lt-01993050", "1, Number is .") in new stack<br>
Number is .<br> -- Executing [s@odbc-test:7] Verbose("SIP/sip.call.lt-01993050", "1, Realus 1 .") in new stack<br> Realus 1 .<br> -- Executing [s@odbc-test:8] Verbose("SIP/sip.call.lt-01993050", "1, Realus 2 .") in new stack<br>
Realus 2 .<br> -- Executing [s@odbc-test:9] Verbose("SIP/sip.call.lt-01993050", "1, Statusas .") in new stack<br> Statusas .<br> -- Auto fallthrough, channel 'SIP/sip.call.lt-01993050' status is 'UNKNOWN'<br>
<br><br>As I read documentation, function hash gives posibility to get values using column name. But my test was unsuccessful. Maybe somebody can help...<br><br>Thanks<br clear="all"><br>-- <br>Pagarbiai / Best Regards,<br>
Giedrius Augys<br>