I have multiple FreePBX 16.0.17 instances running, all of which have trunks to our phone provider. We are losing service with this provider and as such, they have requested that all of our trunks be shut down.
Given the scale of our deployment (~80 instances across different physical locations) i am looking to create a script that can remove a specific trunk from the freePBX configuration that can just be run via CLI so we don’t need to worry about logging into every single instance and removing it via the gui.
Could you elaborate on this? where is the location of the information in the database and/or filesystem? i was able to find /etc/asterisk/pjsip.registration.conf which contains the trunk, but i tested editing this file on a test environment and was served an error page after logging back into the gui
The ‘backend’ of FreePBX is that it mostly defines it’s state in mysql tables in the ‘asterisk’ database, these are re-written to /etc/asterisk/*.conf files by the php code in FreePBX and asterisk is then
‘reloaded’ to effect these, there are lots of ‘relationships’ between trunks and routes, both inbound and outbound, that need ‘normalization’ were you to venture down that path.