I recently installed the routepermissions module, but it didn’t appear to be working correctly. I finally looked directly at the routepermissions MySQL table to find that all my 10 digit extension numbers had been inserted as the same number.
Manually inserting led me to a warning that I had exceeded the int(11) max and the max number (2147483647) was inserted instead. MySQL still uses the 4 byte INT value and so routepermissions effectively limits use to 10 digit extensions somewhere in the middle of the 214 area code. Checking code and some other FreePBX tables shows that the ‘exten’ column is normally created as a varchar(20).
To fix, I uninstalled the module, dropped the routepermissions table, changed the install.php to use varchar(20) for the ‘exten’ column, and reinstalled the module from FreePBX.
Is there a reason why ‘exten’ is defined as int(11) in routepermissions instead of varchar(20)? Or have I completely missed the boat on some other part of my installation?