[asterisk-users] func_odbc questions

Giedrius Augys voipas at gmail.com
Mon Dec 1 06:15:15 CST 2008


Hello,

  I'm working with asterisk 1.6. And I have success using func_odbc with one
row query results (SELECT source,destination from cc WHERE ... ):
exten => s,1,Ringing
exten => s,n,Wait(4)
exten => s,n,Answer
exten =>
s,n,Set(ARRAY(NUMBER,REALNUMBER1,REALNUMBER2,STATUSAS)=${ODBC_GETVARIABLES(${NUMERIS})})
exten => s,n,Verbose(1| ${NUMERIS}, ${REALNUMBER1} ${REALNUMBER1},
${STATUSAS})


But I don't know how to retrieve data, if query returns a lot of rows. In
documentation I read that need to use in config file:
mode=multirow,
and use function ODBC_FETCH. But how to get result-id variable and use
ODBC_FETCH?

And another question is, if I execute not SELECT , but stored procedure, and
this procedure will return two, three tables? Is it possible retrieve these
data from couple tables?

Thanks




-- 
Pagarbiai  / Best Regards,
Giedrius Augys
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081201/67a85573/attachment.htm 


More information about the asterisk-users mailing list