Same problem here: Blacklist module does not working. The post was older than 30 days so I couldn’t post my fix since the original author didn’t post a fix/resolution.
When opening the blacklist module, you’re greeted with
“SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation ’ IN ’
File:/var/www/html/admin/modules/blacklist/Blacklist.class.php:788”
I’m sharing resolution:
Make sure you have a good backup. We’re going to do a drop operation on the black list to fix it.
- Goto Bulk Handler
- Select Export in the Bulk Handler
- Click Blacklist
- Export
- Open with Excel or your choice of CSV editor.
- There were unreadable characters in the phone number column that were not 0 through 9. Use global find/replace to remove these characters. You may have variations of unreadable characters and may need to do mulitple iterations to clean the list up.
- Save the CSV
- Open command line to your Asterisk box.
- Start the Asterisk CLI (asterisk -rv)
- Enter the following command to drop the blacklist table:
database deltree blacklist
- Your old blacklist will be dropped from the database table with the invalid characters. Type “quit” and press enter to leave the CLI. Exit out of the linux shell.
- Go back into the Bulk Handler and click Import.
- Select Blacklist (if it is not already selected)
- Click the ‘Browse’ button and select the modified/updated CSV file
- Click Submit
- Click Import in the lower right hand corner (leave all defaults and the read-in blacklist as-is)
- Data validation will take place. Go get a cup of coffee. This can take some time if you have a large blacklist.
- Once validation has completed, click the ‘Finished’ button in the lower right hand corner.
- Navigate to your black list and it will show again without the SQL error as mentioned in the previous post.