I have a question about SIP, maybe somebody can help.
We have a Mikrotik CCR v6.43.8 running as a PPPoE server with number of PPPoE clients. Each client is a simple SOHO router (not Mikrotik, not managed by us).
What I need is to recognize SIP packets when they are sent from those PPPoE clients to outside world.
If I simply watch ports UDP / TCP 5060-5061 on dynamic PPPoE interfaces, I can see packets. This bit is not a problem. The problem is if an unknown port is used.
Is there any way to recognise a SIP packet regardless TCP / UDP port?
I found the following in one of the forums:
Code: Select all
/ip firewall layer7-protocol
add comment="" name=sip regexp=\
"^(invite|register|cancel) sip[\t-\r -~]*sip/[0-2]\\.[0-9]"
/ip firewall mangle
add action=mark-packet chain=prerouting comment=\
"SIP Packets" disabled=no in-interface=all-ppp\
layer7-protocol=sip new-packet-mark=sip_packet passthrough=yes
It worked like that only:
Code: Select all
/ip firewall layer7-protocol
add comment="" name=sip regexp="^(invite|register|cancel)"
/ip firewall mangle
add action=mark-packet chain=prerouting comment=\
"SIP Packets" disabled=no in-interface=bridge-lan\
layer7-protocol=sip new-packet-mark=sip_packet passthrough=yes
However, if a SIP client is behind a PPPoE router, that mangle rule is not working, therefore I can’t see SIP packets forwarded from PPPoE interfaces to a remote SIP server…
Changing chain from prerouting to forward in the mangle rule doesn’t help
Sorry if the description is a bit confusing.
Thank you in advance