Caller ID Lookup Mysql
I ve been trying to get CIDlookup to work with mysql with no luck
I created a CID lookup source in freepbx pointing to a mysql database
using this query
select name from users where phone1 = '[NUMBER]' ( this is tested with command line and it works )
but
-- Executing Gosub("Zap/4-1", "cidlookup|cidlookup_1|1") in new stack
-- Executing MYSQL("Zap/4-1", "Connect connid 192.168.100.49 root password c
id") in new stack
-- Executing MYSQL("Zap/4-1", "Query resultid select name from users where
phone1 = '306945370192' ") in new stack
-- Executing MYSQL("Zap/4-1", "Fetch fetchid CALLERID(name)") in new stack
-- Executing MYSQL("Zap/4-1", "Clear ") in new stack
-- Executing MYSQL("Zap/4-1", "Disconnect ") in new stack
-- Executing Return("Zap/4-1", "") in new stack
-- Executing GotoIf("Zap/4-1", "0 ?cidok") in new stack
-- Executing Set("Zap/4-1", "CALLERID(name)=XXXXX370192") in new stack <-- XXXX are my additions
any hints ???
I found a "bug" in freepbx
it was creating the query string wrong
in /var/www/html/admin/modules/cidlookup
file functions.inc.php
changed ( on line 172 mysql sql replacement strings ) to
$replacements = array (
'\\' => '\\\\',
'"' => '\\"',
'\'' => '\\\'',
' ' => '\\ ',
',' => '\\,',
'(' => '\\(',
')' => '\\)',
'.' => '\\.',
'|' => '\\|',
';' => '\\;'
);
actually the only thing I added was the last line with the semicolon sub
it now gets generated correctly and works fine
G.


Member Since:
2006-11-04