I've found a "problem" when default route changes, the SIP connections keep active with old IP adress and SIP couldn't registry with the new route.
I'm searching for a solution but I can't find, so I've tried to do this script, but its not workting...
Can someone help-me?
Code: Select all
{
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt
local newIP [file get mypublicip.txt contents ]
put $newIP
}
:local cIP;
:if ($newIP != $cIP) do={
:put "ip address $cIP changed to $newIP";
:set cIP $newIP;
/ip firewall connection remove [find];
}