SIP Priority Queues

I need to make sure that SIP has priority in the Mikrotik and on the network. I am attempting to assign a higher priority to SIP and lesser priority to everything else.

I have read quite a bit and understand the QOS but can not make it work. I don’t see a lot of information on troubleshooting this problem.

So this is what I have done.

I have a added the Layer 7 definitions to the Mikrotik (3.11)

The one for SIP is this
/firewall layer7-protocol add comment=“” name=sip regexp=“^(invite|register|cancel) sip[\t-\r -~]*sip/[0-2]\.[0-9]”

I added the mangle rule to mark the traffic.
/ip firewall mangle
add action=mark-connection chain=prerouting comment=“” disabled=no layer7-protocol=sip new-connection-mark=sip passthrough=yes
add action=mark-connection chain=prerouting comment=“” disabled=no new-connection-mark=other passthrough=yes

I have also tried the connection-type=sip

Then I went to the Queue and added the Priority. Most of this is default.

/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
set default-small kind=pfifo name=default-small pfifo-limit=10

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=657000 name=Fiber packet-mark=“” parent=office priority=8 queue=ethernet-default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=sip_queue packet-mark=sip parent=Fiber priority=1 queue=ethernet-default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=other_traffic packet-mark=other parent=Fiber priority=8 queue=ethernet-default

/queue interface
set internal queue=ethernet-default
set external queue=ethernet-default
set irvine-office queue=ethernet-default
set ids_mirror queue=ethernet-default
set ether5 queue=ethernet-default
set ether6 queue=ethernet-default

From what I could find this is what I needed. I found much more complicated information for more complicated QOS but I just need to give SIP higher priority at this point.

When I monitor the Queue it says:
queued-packets: 0
queued-bytes: 0

No matter what. I can make SIP calls and I see no increase in the counters.

It there a way to figure how traffic is flowing to troubleshoot this. Like a debug mode like some of the cisco routers use to see where traffic is going in the router so I can see why it is not working. I have studied NUMEROUS documents on the topic in the forum and the MT docs and can not find a solution that I can make work.

Thanks for your time.

Tim

Here are some quick hints:

  1. You mark the SIP connections with your first mangle rule, but then you immediately change the mark to ‘other’ with the next rule. Maybe you should try passthrough=no.

  2. You marked the connections, but you are not marking the packets. Queues work on Packet Marks not Connection Marks. You do need to mark the Connections, but you then need to mark the packets. Look at the examples in docs and Wiki.

  3. After you get all your SIP QOS working, you’ll not improve your voice quality. The SIP connections only carry call control not audio. You need to prioritize the audio streams as well.

  4. Be aware that you can only queue traffic going out an interface. Unless you have control over both sides of a link, you will only improve one half of the VoIP call.

Hi,

Have you get it to work?

I have the same Problem, I want to prioritize Sip (voip) in my Network.
Have somebody a working Example for me?

My Customers log in per PPPOE.

Thanks

No Anybody any idea?