In fact, into Asterisk SIP Settings an old IP address was shown, ( being a dynamic address dsl line) , once refreshed with “detect network settings” button and reload , problem seems solved.
Shouldn’t that IP address setting be updated automatically in case of public IP change ?
Not a system expert, but it should be one of simplest things a linux system would be capable of…
i.e. a routine checking external ip address changes periodically, like you hit “detect network settings” button every X minutes…
I wonder whether pjsip makes use of it. This module kind of looks neglected & hasn’t many friends.
All the functions are built into FreePBX’s command line tool fwconsole; you just have to write a script to do that and add it to crontab at a reasonable interval.
#!/bin/bash
CURR_EXT_IP=$( fwconsole kvstore --action get --key externip Sipsettings )
REAL_EXT_IP=\"$( fwconsole extip )\"
# echo "CURR_EXT_IP is $CURR_EXT_IP"
# echo "REAL_EXT_IP is $REAL_EXT_IP"
if [ $CURR_EXT_IP == $REAL_EXT_IP ] ; then
# echo "No change in IP"
exit
else
# echo "External IP changed"
fwconsole kvstore --action set --key externip --value $REAL_EXT_IP Sipsettings
fwconsole r
# do the following if you have PJSIP transport reload disabled - need to restart asterisk
asterisk -rx "core restart when convenient"
fi