With the Gizmo5 module, I was trying to enable inbound calling and was having issues with no audio. I got all the right ports forwarded (UPD 5004, 5060, 10000-20000) and then setup sip_nat.conf. Unfortunately, the externhost=xxx.dyn.dns.org does not seem to work. I f I set it as externip=xxx.xxxx.xxx.xxx then it works perfectly. Since it's dynamically updating (and not managed by the trixbox, but by my firewall) one suggestion was to use a cron job and shell script to update the sip_nat.conf file with the new ip. I searched around but couldn't find anyone with an example so I hacked a script I found (source - http://www.brandonhutchinson.com/DynDNS_update_script.html).
So, for anyone interested, below is the shell script that will update your sip_nat.conf.
You'll need to install 2 things for this to work so first:
yum install lynx bind-utils
Save the shell script somewhere (I saved it as /root/update_dyndns.sh) and set it's permissions to 755.
Be sure to change xxx.xxx.xxx.xxx to be your localnet settings.
Then set up a cron job (install and use webmin to make this easier) to run this script hourly.
#!/bin/sh # get current ip of the router CURRENT_IP=`/usr/bin/lynx -dump <a href="http://www.netins.net/dialup/tools/my_ip.shtml" title="http://www.netins.net/dialup/tools/my_ip.shtml">http://www.netins.net/dialup/tools/my_ip.shtml</a> | grep -A2 "Your current IP Address is:" | tail -n1 | tr -d ' '` # update the sip_nat.conf and re-read configs echo "externip=$CURRENT_IP localnet=xxx.xxx.xxx.xxx/255.255.255.0" > /etc/asterisk/sip_nat.conf chown asterisk.asterisk /etc/asterisk/sip_nat.conf asterisk -rx reload

Member Since:
2006-06-08