Most routers and firewalls ship with SIP ALG turned on. It tries to help voice calls through NAT, but in our experience it rewrites them wrongly: phones lose registration, or calls have one-way audio where you can hear the caller but they cannot hear you. This guide turns it off on a Fortinet FortiGate.
What you'll need
- An administrator sign-in for the FortiGate
- The FortiGate's CLI console, opened from its dashboard
- A quiet moment: step 5 ends any call in progress
Turn off SIP ALG
Stop the FortiGate using SIP ALG
By default every SIP call goes through the SIP ALG. Hand SIP to the simpler session helper instead, which the next steps then remove:
config system settings set default-voip-alg-mode kernel-helper-based endFind the SIP session helper
List the session helpers and find the one named
sip, on port 5060. It is usually number 13, but check, because it can differ:show system session-helperLook for an entry like this one:
edit 13 set name sip set protocol 17 set port 5060 nextDelete it
Use the number you found in step 2:
config system session-helper delete 13 endTip: if your phones use a SIP port other than 5060, there may be another
sipentry for it. Delete that one too.Take SIP out of the firewall policy
Show the policy that lets your phones out to the internet, and look for a
set voip-profileline. If there is none, go on to step 5.show firewall policy 1Remove the VoIP profile
config firewall policy edit 1 unset voip-profile next endKeep it, turn SIP off
config voip profile edit default config sip set status disable set rtp disable end next endUse your policy's number in place of
1, and your profile's name in place ofdefault.Clear the SIP sessions already open
This ends every call in progress through the FortiGate.
diagnose sys session filter dport 5060 diagnose sys session clear diagnose sys session filter sport 5060 diagnose sys session clearCheck it worked
Make a call, then list the SIP sessions:
diagnose sys session list | grep sipIf the only flag you see is
ndr, you are done. Any other flag (redir,local,helper=sip,helper=20orhelper=24) means SIP is still being handled; go back over steps 1 to 5.
Still not working?
- Restart one phone and make a test call.
- Check the QoS marking on the policy matches our guide for NBN services.
- Open a ticket with the output of step 6 and we will look at it with you.
What's next
- Quality of Service (QoS): DSCP, TOS and precedence chartTurn a QoS value into the form your device asks for
- Quality of Service (QoS) for NBN servicesThe QoS rules we recommend on NBN connections
Steps follow Fortinet's FortiOS 7.6.6 Administration Guide, "SIP ALG and SIP session helper".