Community discussions

MikroTik App
 
tom65
newbie
Topic Author
Posts: 27
Joined: Mon Mar 18, 2019 8:24 pm
Location: South Africa

IP firewall connection

Fri Jul 22, 2022 9:48 pm

In /ip firewall connection
I would like to retrieve only "reply packets" value and store into variable.
For the life of me I cannot get it done, no "get" option.

With this I will be able to complete my script.

Kind regards...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: IP firewall connection  [SOLVED]

Fri Jul 22, 2022 11:40 pm

what did you write???
{
:local variable [/ip firewall connection get ([find where timeout>10s]->0) value-name=repl-packets]
:put $variable
}
 
tom65
newbie
Topic Author
Posts: 27
Joined: Mon Mar 18, 2019 8:24 pm
Location: South Africa

Re: IP firewall connection

Sat Jul 23, 2022 7:27 am

what did you write???
{
:local variable [/ip firewall connection get ([find where timeout>10s]->0) value-name=repl-packets]
:put $variable
}
Thanks for reply.
The aim is to store reply packets of all sip connections and check every "some" interval if the count is increased. If not, remove connection for that IP. This is for extensions that connect to cloud PBX.
In South Africa we have intermittent outages (internet) where the extension loses its registration with the PBX (UDP) and then still tries to use the old connection track entry which does not work. Clearing this track entry forces a new track entry and the registration is then successful.

Who is online

Users browsing this forum: JDF, UkRainUa and 26 guests