I had done an article on this a few years ago on another site... you can do this without a SIP-aware router for a few sets (more than 3 or 4 I recommend using a Border Gateway server), you need to verify the following settings:
- In System\IP Settings\ the System NAT IP Address needs to be set as the public IP address of the router used by the system
- In System\IP Settings\Advanced IP Settings\ the SIP UDP Listening Port Enable needs to be set to YES
- In System\IP Settings\Advanced IP Settings\ the SIP UDP Listening Port should be set to 5060
- In System\Devices & Feature Codes\IP Connections\P6000\ the NAT IP Address needs to be set to the public IP address of the router used by the system
- In System\IP-Related Information\ Create a new Call Configuration called Remote SIP
- In System\IP-Related Information\<Remote SIP ID created above>\ set the Speech Encoding Setting to G.729 and make sure Support RTP Redirect is set to YES
Now, in the router you need to do a bunch of Port Forwarding from the public IP address to the internal IP of the Processor Module (This is for SIP AND Mitel IP Phones):
5060/UDP & TCP*
69/UDP
20001/UDP
6800-6802/TCP
3998-3999/TCP
6004-7039/UDP*
50095-50508/UDP*
* Essential to SIP operation, 5060 is signalling, the other port ranges are used by the RTP stream
And if you want to manage the 5000 remotely, add the following ports:
22/TCP
443/TCP
44000/TCP (4000/TCP may be needed for systems prior to version 5.0)
More information on port usage can be found in the Mitel 5000 CP Installation Manual, section B.24 - Port Usage and Protocols.
I have seen some routers which will just not work, Sonicwall being the most common I run across (it will work for a short time, but audio will drop at 10 minutes), most Linksys and D-Link routers work well, but we have had issues with Netgear and Belkin. Cisco and other enterprise class routers do not seem to have these issues.
EDIT: Almost forgot, in the station programming itself for the SIP device, you need to go into System\Devices and Feature Codes\Phones\<ext>\IP Settings and change Call Configuration to the Remote SIP Call Configuration you created above, and change the NAT Address Type to NAT. Note that if you are inside the firewall and have the NAT Address Type set to NAT, the phone may not work, it depends on you router, meaning you may have to change this setting depending on where you are using the device (inside or outside the router).