Manually editing NAT settings outside of GUI

Hi Guys,

I need some help in finding the location where the below settings are stored on the MySQL DB or any other location on the FreePBX GUI.

Settings -> Asterisk SIP Settings ->

  • General SIP Settings -> External Address
  • Chan_SIP Settings -> Override External IP
  • Chan_PSIP Settings -> External IP Address

What I am trying to do is to detect the external IP via a script, update these values to the DB before I start configuration of the PBX. Think of this like a PBX initialization script that I would like to run before starting to build the PBX.

The values above gets stored on the following config files.

/etc/asterisk/pjsip.transports.conf: external_media_address=192.168.1.1
/etc/asterisk/pjsip.transports.conf: external_signaling_address=192.168.1.1
/etc/asterisk/sip_general_additional.conf: externip=192.168.1.1

Regards