[asterisk-users] func_odbc and hash problem

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Dec 2 09:29:53 CST 2008


On Tuesday 02 December 2008 01:21:46 Giedrius Augys wrote:
> Hello,
>
>   Now I'm testing func_odbc and hash. My configurations are:
>
> func_odbc.conf
> [GETNUMBER]
> dsn=sqlserver
> ;mode=multirow
> ;rowlimit=10
> readsql=SELECT number,real_number1,real_number2,status FROM ivr.dbo.numbers
> WHERE number=${SQL_ESC(${ARG1})}
>
> extensions.conf
> exten => s,1,Ringing
> exten => s,n,Wait(4)
> exten => s,n,Answer
> exten => s,n,Set(NUMERIS=37037210602)
> exten => s,n,Set(HASH(RESULTATAS)=${ODBC_GETNUMBER(${NUMERIS})})
> exten => s,n,Verbose(1, Number is  ${HASH(RESULTATAS, number)}.)
> exten => s,n,Verbose(1, Realus 1  ${HASH(RESULTATAS, real_number1)}.)
> exten => s,n,Verbose(1, Realus 2  ${HASH(RESULTATAS, real_number2)}.)
> exten => s,n,Verbose(1, Statusas  ${HASH(RESULTATAS, status)}.)

Kill the space after the comma.  You're looking for fields whose names are
" number" and " status", which, of course, don't exist.

-- 
Tilghman



More information about the asterisk-users mailing list