Sip connection after sudden change of ip

Hi all,

I have dynamic ipv4 from my isp and use freepbx to register sip.
When there is a change of ip i see that previous 5060 connections still appear in connections table. This is the reason i can’t register my sip with the new ip and therefore appear offline.
When i delete connections manually or through a script that i run once a day then it automatically reconnects.
This is not the correct way.

Is there anything i can do so to automatically drop previous connections and re-establish new ones?

Have you tried putting the clear connection script in the dhcp-client script area?

Using src-nat with action masquerade is supposed to clear connection tracking table if WAN IP changes. Any other src-nat action doesn’t do it and you have to script around it.

Maybe lowering “tcp connection time” setting could help to kill obsolete open connections from SIP devices.

@ kxrist

you might want to read this

https://wiki.freepbx.org/plugins/servlet/mobile?contentId=100931067#content/view/100929794

hope this helps.