[Home]

Summary:ASTERISK-15753: Using func_odbc.conf
Reporter:Giridhar (giridharp)Labels:
Date Opened:2010-03-05 08:00:40.000-0600Date Closed:2011-06-07 14:00:52
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Functions/func_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Dear Experts

I created a simple SQL statement in func_odbc.conf and called the same from dial plan.

I am not able to get the values returned by Select statement.

Can some one help me in this. I am not getting any error too. Please assist.

I am copying all the files for your reference.

Thanks

Giridhar

****** ADDITIONAL INFORMATION ******

/etc/func_odbc.conf

[FindStore]
dsn=asterisk
readsql=SELECT ${ARG1} FROM SCTbl_RetailersStore WHERE storePh = '${SQL_ESC(${ARG2})}'

/etc/res_odbc.conf

[asterisk]
enabled => yes
dsn => asterisk-connector
username => giri
password => Giri123
pre-connect => yes

/etc/extension.conf

[GetVoucherdetails]
exten => s,1,Set(${Try}=FindStore(STOREID,${StoreNumber}))
exten => s,n,SayNumber(Try,m)

CLI screen logs

-- Executing [s@GetVoucher:2] GotoIf("SIP/6001-00000000", "0?lbl_GetVoucher_1:") in new stack
   -- Executing [s@GetVoucher:3] Playback("SIP/6001-00000000", "5105a") in new stack
   -- <SIP/6001-00000000> Playing '5105a.gsm' (language 'en')
   -- Executing [s@GetVoucher:4] Goto("SIP/6001-00000000", "GetVoucherdetails,s,1") in new stack
   -- Goto (GetVoucherdetails,s,1)
   -- Executing [s@GetVoucherdetails:1] Set("SIP/6001-00000000", "=FindStore(STOREID,0755001100)") in new stack
   -- Executing [s@GetVoucherdetails:2] SayNumber("SIP/6001-00000000", "Try,m") in new stack
   -- <SIP/6001-00000000> Playing 'digits/0.gsm' (language 'en')
   -- Executing [s@GetVoucherdetails:3] GotoIf("SIP/6001-00000000", "0?:lbl_GetVoucherdetails_0") in new stack

Comments:By: Jason Parker (jparker) 2010-03-05 11:10:50.000-0600

This is not an appropriate place to get help with configuration issues.

The problem is very clearly in your use of Set() (hint: read the dialplan output you pasted here)