NOTE: There are many different models of SonicWall as well as firmware versions. Not all routers will have all of these settings.
I. Create Service Objects
You will need 2 Service Objects which you can group together for ease of management.
i. VOIP Registration for port 5060 to 5069 (default SIP registration ports)
ii. VOIP Media for port 10000 to 20000 (UDP) (main range for voice traffic)
II. Set Firewall Rules
Part 1: Inbound
Create a Firewall Rule for WAN to LAN to allow all traffic from VOIP Service.
Within the same rule, under the Advanced tab, change the UDP timeout to 350.
Part 2: Outbound
The default outbound rule (LAN to WAN) allows all traffic. Repeat Part 1 on this outbound rule and set the UDP Timeout to 350 seconds.
The Firewall Rules should then look like this:
In the VOIP Section, make certain that "Enable Consistent Nat" is checked.
Under firewall settings, disable SPI (Stateful Packet Inspection)
Under Firewall Settings, Advanced, set UDP Timeout to 350 seconds