SIP VoIP IP Phones: phone rings but no voice
A very common problem
When IP phones on a local network are connected over the internet to a VoIP service provider or a hosted PBX , it is a common problem that phones register just fine, can make outbound calls, and receive calls, but when the phone is picked up, there is no audio. To solve this, it is important to understand why this happens, and then it often can be easily solved
The cause of the problem
To be able to contact your phone from the internet, the remote calling party or SIP server needs to know 2 things: the public IP address to reach your phone, and the port on which your phone is waiting for incoming connections.
When your phone registers to a SIP server it provides this contact information, i.e. its IP address + the ports that you have configured in the phones settings, to the SIP server.
When the problem occurs, the possible causes are:
- the provided IP address is not the correct public IP address,
- traffic to the provided public IP address + port numbers is not routed to your phone
Solving the public IP address problem
If your phone is connected directly to the internet and has a public IP address, then there is no problem. The phone simply provides its own ip address and configured ports. But in most cases, your phone is behind a router on a private LAN, and has a private IP address like 192.168.1.13 Such an ip address can not be reached directly, so
- your phone needs to provide another public IP address: the external IP address of your router.
- the router needs to be aware and forward the traffic to the phone.
Most phones do not have the option to manually set an external public IP address (other than the phone's own IP address). If your phone connects to a local PBX, then it is the PBX that must be reachable from the internet and not your phone so it does not matter. If your phone does connect to a SIP server on the internet then you must set your phone to contact a STUN server to dynamically get the public IP address.
If your phone is always ringing when there is an incoming call, then your phone is providing the correct IP address.
Solving the routing problem
The routing from the external IP address of the router to the private IP address of your phone is done via an IP address mapping mechanism (NAT = Network Address Translation) in your router.
Many consumer routers create the mapping dynamically and temporarily, whenever your phone registers to the SIP server or makes an outbound call. So for some periode of time, incoming connections are correctly routed back to your phone. Your phone can receive calls and there can be audio. However, when the mapping times out (e.g. after 30 minutes), you can no longer receive incoming calls until you first make a new outgoing call or your phone re-registers to the SIP server.
So this is not good. The mapping must be static and not temporarily. To change that, you need to change the NAT configuration of your router, and fix the mapping by defining open ports, port forwarding or port redirection.
You need to do this for both SIP traffic (signalling) and RTP traffic (voice media), e.g if you have the following setting in your phone:
- local SIP port: 5060
- RTP port range: 30000 - 30099
- UDP: 5060 forward to 192.168.1.13
- UDP: 30000 - 30099 forward to 192.168.1.13
This works well on routers that have a so called 'Full Cone NAT' like the Draytek routers but many of the consumer routers have a more restricted type of NAT that still cause problems, often in an unpredictable way. In that case, you should either replace your router or find a workaround, e.g. connecting via a VPN, or get a public ip address for you phone.
If you have multiple phones, then you must do a similar configuration for each phone, using different and non-overlapping port ranges e.g.:
- local SIP port: 5061
- RTP port range: 30100 - 30199
- UDP: 5061 forward to 192.168.1.14
- UDP: 30100 - 30199 forward to 192.168.1.14