tm1000/Caller-ID-Superfecta — Issue #61: MySQL query for a2billing
Author: lgaetz
Created: 2012-01-18 11:59:09+00:00
State: open
Labels: module feature

From this thread: http://pbxinaflash.com/forum/showthread.php?t=12136

```
exten => s,n,Set(CALLERID(num)=1${IF($[${CALLERID(num):0:1}=1]?${CALLERID(num):1}:${CALLERID(num)})})
exten => s,n,MYSQL(Connect connid localhost root passw0rd mya2billing)
exten => s,n,MYSQL(Query resultid ${connid} SELECT cc_callerid.id_cc_card FROM cc_callerid WHERE cc_callerid.cid = ${CALLERID(num)})
exten => s,n,MYSQL(Fetch fetchid ${resultid} callernumber)
exten => s,n,Noop(CallerID is ${callernumber})
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
```