Community discussions

MikroTik App
 
kxrist
just joined
Topic Author
Posts: 8
Joined: Thu May 03, 2018 12:40 pm

Sip connection after sudden change of ip

Sat Jul 01, 2023 7:37 pm

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?
 
User avatar
jspool
Member
Member
Posts: 472
Joined: Sun Oct 04, 2009 4:06 am
Location: Oregon

Re: Sip connection after sudden change of ip

Sat Jul 01, 2023 10:30 pm

Have you tried putting the clear connection script in the dhcp-client script area?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13186
Joined: Thu Mar 03, 2016 10:23 pm

Re: Sip connection after sudden change of ip

Sun Jul 02, 2023 9:49 am

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.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 3096
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Sip connection after sudden change of ip

Sun Jul 02, 2023 11:06 am

Maybe lowering "tcp connection time" setting could help to kill obsolete open connections from SIP devices.
 
wiseroute
Member
Member
Posts: 425
Joined: Sun Feb 05, 2023 11:06 am

Re: Sip connection after sudden change of ip

Sun Jul 02, 2023 5:47 pm

@ kxrist

you might want to read this

https://wiki.freepbx.org/plugins/servle ... /100929794

hope this helps.