A few days ago on our FreePBX 15 system I upgraded all of the modules that had pending updates. The module “CallerID Lookup” got upgraded from 15.0.20 to 15.0.24. After that upgrade, for any number that it didn’t find in the MySQL table we have that lookup configured to check in it would show as “unknown” instead of passing thru the default caller ID info coming from the carrier.
Once this was discovered we rolled back to version 15.0.20 of that module in question and everything is working like normal again. Anyone else running into this? Do I need to submit a bug report somewhere other than here?
The way SQL lookups are done in the cidlookup module has changed recently to remove reliance on a deprecated Asterisk module. Open a ticket with your findings pls. https://issues.freepbx.org/
Can you show us your SQL request please?
See attached screen shots. Table “rhs_phones” is a custom table we created / maintain.
@fdanard from line 56 of the agi:
Source of cidlookup_mysql.agi - cidlookup - FreePBX GIT
It looks like if no sql result is found, then it sets the cnam to “Unknown”, it may be better not to set anything on that line.
Hmmm looks good for me.
SELECT CONCAT(name,’ ', number) as name FROM
number LIKE ‘[NUMBER]’
The result is correct.
Try to check the debug file and look if there is any error about the database. /var/log/asterisk/freepbx_dbug
I don’t have a file that matches the name you referenced or one like it. If you want me to try more things with the new module I’ll have to do it after hours when it’s not going to break CID functionality on our production system. We don’t have a test system.
Otherwise, you can run: fwconsole dbug
Leave it opened
Try your cidlookup
I think it will generate a /var/log/asterisk/freepbx_dbug file
I had a chance today after hours to try this module upgrade again. I upgraded it to 15.0.24 again, same issue is occurring as expected. I ran fwconsole dbug while I called from a number NOT in the “rhs_phones” table, it didn’t trigger anything to display / print in the debug file. Afterwards the only thing that showed in freepbx_dbug file is attached(unrelated I’m sure).
I rolled back to 15.0.20 and it’s working fine again now. Not sure what you’d like me to try to do next to give more details, but I won’t be able to upgrade this module until it’s fixed.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
Was a ticket ever opened for this issue?
No, I can do that now. One other thing that might be worth mentioning is we are still running on Asterisk 16.17.0. We have some custom patches we apply to the voicemail part of asterisk that need some extra work when going to versions after 16.17.0, that’s why we’ve been putting off upgrading that.
I ran into this problem, too. After the recent callerID changes, my SNOM phones stopped displaying the calling number for numbers that were not in the database. I fixed it with this workaround, but I think there could be a better solution:
DROP PROCEDURE IF EXISTS mylookup;
CREATE PROCEDURE mylookup(IN num varchar(80))
SELECT IFNULL((SELECT name FROM freepbx WHERE number LIKE CONCAT(num, '%')), CONCAT('Unknown: ', num) ) as name;
In FreePBX, I use the following query string:
did you get something like this
--- Error: name is blabla , string type expected ----
read the result to /var/log/asterisk/full or asterisk CLI
Please test the hack noted in the ticket
Sorry for my misunderstood.
I believed that when the CID was matched, it returned “Unknown”
Fixed now though. Just wait the next version .
Sorry for the inconvenience.
Marked as resolved in module versions 15.0.25 and 16.0.12. Upgrade from edge with
fwconsole ma upgrade cidlookup --edge