Hi everyone,<div><br></div><div>What is wrong in below asterisk application? The output should be content of field booth_status from table booths:</div><div><br></div><div><br></div><div><div>[extension-status]</div><div>exten => _X.,1,MYSQL(Connect connid 127.0.0.1 root password my-extensions)</div>
<div>exten => _X.,n,MYSQL(Query allow_call ${connid} SELECT extension_status FROM mytable WHERE extension=${CALLERID(num)} ORDER BY id DESC LIMIT 1)</div><div>exten => _X.,n,NoOp(allow_call is: ${allow_call})</div>
</div>
<div><br></div><div>But I get:</div><div><b>"allow_call is: 4" </b>while it should actually be ACTIVE or INACTIVE</div><div><br></div><div>I want to read the LAST record found under column "extension" in "mytable" and do a NoOp for it's contents. But instead I am getting 4 which I think refers to the connection ID?!</div>
<div><br></div><div>***There is only one record in my table right now.</div><div><br></div><div>Thanks,</div>