Script to remove connections required

Hi,
I’m in desperate need of a script that will compare the ip of a given interface with the “reply dst-address” of a connection and remove the connection if they differ.
I have a scenario where I dedicate a particular adsl line to voice traffic but unfortunatly often when the modem gets an ip update the old connection remains causing registration to my sip provider to fail. I need to manually remove the connection.

A way to expire the connection automatically would be better but I don’t know of one.
One solution is turning off/on connection tracking which will remove all the connections but this is not an option as I don’t want to break connections running down the other lines which are mainly citrix sessions.
Another solution is a static ip which is not yet an option.
My plan to put a script in place that either runs on a schedule or is triggered by an ip update (is this possible?) seems the only option.

I seem to be having problems when trying to get connection info from the cli or script
the option to remove only takes a line number as input.
also I’m getting no joy when using the find command.
any help with such a script would be appreciated.

Mikrotik x86&rb450 3.22