Hello,<br>I have a trouble with ODBCquery mod. I am using it from <a href="http://asterisk.junyks.cz/">http://asterisk.junyks.cz/</a><br>I've installed it and it works properly, but there is a problem.<br>1. I run Asterisk.
<br>2. I connect a phone to Asterisk.<br>3. It works <br><i>-- Executing Set("SIP/2222-08b28d70", "tempbal=0") in new stack<br> -- Executing ODBCquery("SIP/2222-08b28d70", "tempbal=SELECT balance FROM sip_buddies WHERE name=2222") in new stack
<br> -- odbcquery: varname=tempbal, query=SELECT balance FROM sip_buddies WHERE name=2222<br> -- SIP Seeding peer from astdb: '2222' at 2222@192.168.7.169:29000 for 3600<br> > app_odbcexec: Query Successful!
<br> -- odbcquery: set variable tempbal to 10<br></i>4.But when I push redial on my X-Lite phone it doesn't work, see<br><i>-- Executing Set("SIP/2222-08b28d70", "tempbal=0") in new stack<br> -- SIP Seeding peer from astdb: '2222' at
2222@192.168.7.169:29000 for 3600<br> -- Executing ODBCquery("SIP/2222-08b28d70", "tempbal=SELECT balance FROM sip_buddies WHERE name=2222") in new stack<br> -- odbcquery: varname=tempbal, query=SELECT balance FROM sip_buddies WHERE name=2222
<br> > app_odbcexec: Error in PREPARE -1<br> -- odbcquery: Value not found in database.</i><br>So I need to restart my asterisk for good work.<br>That's the part of my context<br><i>[mycontext]<br>..........<br>
exten => _X.,1,Set(tempbal=0)<br>exten => _X.,2,ODBCquery(tempbal=SELECT balance FROM sip_buddies WHERE name=${CALLERIDNUM})<br>exten => _X.,3,GotoIf($[${tempbal} = 0]?30:7)<br>.............<br></i>May be this code is buggy or I do something wrong.
<i> <br></i><i><br></i>Best Regards<br>Alexandr Olekhnovich<br>