Hello Everyone!
I got a situation using a mikrotik a failover enviroment and a cloud-based PABX system. When the failover occurs, our IP telephones stop workin, this happens due to the sync conecction between the phone and the VOIP server, so, when i restart the Mikrotik, everything work. A solution that occur to me is to drop every telephone conection so the SYNC with the server restarts. However i don’t know how to do this on mikrotik and if the mikrotik allows me to. Can i drop every conecction in the sip port or the server proxy for example?
Thanks for the attention.
Hello!
You actually have access to the list of tracked connections in
/ip/firewall/connection
You can e.g. print them like:
print where protocol=udp
You can also remove them with something like:
remove [ find where protocol=udp ]
But the above doesn’t (always) work. The magic incantation is:
:foreach i in=[ find where protocol=udp ] do={ :onerror e in={ remove $i} do={} }
Of course you’ll have to figure out the filtering criteria for your case and when to call the script. Just a tip: the connection-mark of connections is also available to filter on for remove, so it’s usually easier to mark the connections in the firewall and then use them for easy/quick purging from the conntrack table.