I am trying to set up Freepbx 16 via a post-installation script in Terraform.
Is it possible to set SIP settings → NAT settings → External Address (from the GUI) using fwconsole? I can run fwconsole setting -l but I cannot find any value related to that.
Or would I rather need to run an INSERT query in the database? What would be in that case the relevant table and column(s)?
you can adjust mysql kvstore tables and fwconsole reload after. you can also modify using fwconsole kvstore but you can absolutely mess up your system if you don’t know what you’re doing
Thanks a lot for all the great hints.
The complete solution looks as follows:
fwconsole kvstore --action set --key externip --value ${publicip} Sipsettings
fwconsole kvstore --action set --key localnets --value '[{"net":"${subnet}","mask":"24"}]' Sipsettings
(in case it may help anyone in the future).
The ${variable} syntax is the way how variables are passed in terraform from the “azurerm_virtual_machine_extension” resource to a custom script.