SIP Basics: Accounts, Registration and Common Problems
SIP is the protocol most VoIP phones, softphones and business phone systems use to make and receive calls. Setting up a SIP phone means entering a handful of account details correctly, and most problems after that come from the network between the phone and the provider rather than from the phone. This page explains what SIP does, what goes in a SIP account, how registration works, and how to diagnose the common faults.
One point first: a SIP account does not make calls free. Calls between two SIP users on the same system may cost nothing extra, but calls to ordinary phone numbers go through a provider and cost whatever its plan says.
What SIP does, and what RTP does
SIP, the Session Initiation Protocol, is defined in RFC 3261 as an application-layer signaling protocol for creating, modifying and terminating sessions, such as phone calls. It is the part that rings the other phone, answers, holds, transfers and hangs up. The main SIP requests are:
REGISTER: tells the provider's registrar where your phone can currently be reached.INVITE: starts a call (and, inside a call, changes it, for example to put it on hold).ACK: confirms that the caller received the answer to an INVITE.BYE: ends a call.CANCELabandons a call that has not been answered yet.
Inside the INVITE and its answer, the two ends describe the audio they can handle (codecs, addresses and ports) using SDP, the Session Description Protocol, in an offer and answer exchange (RFC 3264). The audio itself does not travel in SIP at all. It travels in RTP, the Real-time Transport Protocol (RFC 3550), usually on different ports and sometimes by a different network path. That split explains the most confusing SIP fault: a call that rings and connects perfectly, but with no audio in one or both directions.
What goes in a SIP account
| Setting | What it is |
|---|---|
| Username (and authentication ID, if different) | The account name the provider gave you. Some providers use a separate ID for authentication. |
| Password | The SIP password, which is not the same as your web portal password. |
| Domain or registrar | The server the phone registers to. |
| Outbound proxy | A server the phone sends all its requests through, if the provider uses one. Leave it blank unless the provider gives one. |
| Transport and port | UDP, TCP or TLS. RFC 3261's default ports are 5060 for UDP and TCP and 5061 for TLS, but use what the provider specifies. |
| Codecs | The audio formats the phone offers, in order of preference. |
| Registration interval | How often the phone renews its registration. |
Copy the details from the provider's instructions exactly. Most registration failures are a mistyped domain, the wrong username field or an old password.
How registration works
When the phone starts, it sends a REGISTER request. The registrar normally replies with a challenge (a 401 Unauthorized or 407 Proxy Authentication Required response), the phone answers it using the password, and the registrar accepts. A single 401 followed by success is normal. A registration lasts only for a limited time, so the phone renews it before it expires. While a phone is registered, calls to its number or extension reach it; when the registration lapses, calls go to voicemail or fail.
Softphones, desk phones and adapters
- Desk phones plug into the office network, often taking power from the network switch (Power over Ethernet). They are the most predictable option for fixed desks.
- Softphones are apps on a computer or mobile phone. Use a wired headset or a good wireless one, and a wired network connection where you can. Mobile softphones move between Wi-Fi and mobile data, which can interrupt calls.
- Adapters (ATAs) connect an ordinary analog handset to a SIP account; see analog phones over VoIP.
Whichever you use, every number or account needs a correct emergency location, and a softphone that travels needs its location updated (see emergency calls below).
Common problems and what to check
| Symptom | Likely cause | What to check |
|---|---|---|
Will not register; repeated 401 or 403 Forbidden | Wrong username, authentication ID, password or domain; account suspended | Re-enter the details from the provider; ask the provider whether it sees the attempts and why it rejects them. |
Will not register; no response or 408 Request Timeout | The phone cannot reach the server: wrong address or port, DNS, or a firewall blocking traffic to the provider | Check the server address and transport; ask whoever manages the firewall to allow traffic to the provider's published addresses and ports. |
| Registers, then stops receiving calls after a while | The router's NAT forgets the phone's connection before the next registration | Use the registration interval or keep-alive setting the provider recommends. |
| Call connects, but one-way or no audio | NAT: the audio address in SDP is the phone's private address, or the RTP ports are not reaching the phone | Use the provider's NAT settings (some providers handle NAT on their side). Some routers have a SIP helper, often called SIP ALG, that rewrites SIP messages; providers differ on whether it should be on or off, so follow your provider's guidance. |
Call fails with 488 Not Acceptable Here | No codec in common | Enable a codec both the phone and the provider support. |
| Choppy, robotic or broken audio | Jitter or packet loss, often from a busy link or weak Wi-Fi | Check the call statistics on the phone or system; use a wired connection; prioritize voice on the router. |
For audio quality, put the latency, jitter and loss your phone reports into the call quality score calculator for an estimated MOS, and see VoIP call quality and MOS for what the numbers mean.
Security: the part not to skip
A SIP account that someone else can use is a way to run up call charges on your bill (toll fraud), and an exposed phone is a target for unwanted calls. Set it up safely from the start:
- Use a strong, unique password for every SIP account and every phone's admin page. Never leave a default password or use the extension number as the password.
- Do not expose a phone's or a PBX's SIP service to the whole internet. Allow SIP only from your provider's addresses, with your provider's or your network administrator's help.
- Restrict international and premium-rate dialing you do not need, and set spending alerts if your provider offers them.
- Use encrypted signaling (SIP over TLS) and encrypted audio (SRTP) where your provider supports them.
- Keep phone and adapter firmware up to date.
Never solve a SIP problem by turning off a firewall, opening all ports or switching off SIP authentication. If phones ring with nobody on the line, see ghost calls and silent calls.
Emergency calls
Dial the local emergency number: 911 in the United States, 112 across the European Union, 999 or 112 in the United Kingdom. A SIP phone or softphone can move, so the emergency service depends on the location registered with your provider. Set it for every account and update it when a phone or softphone user moves. Never call an emergency number to test a phone; ask your provider how to test, and if you dial by mistake, stay on the line and tell the call-taker. Rules vary by country and change; emergency calling on VoIP has the details.
Setup checklist
- Enter the account details exactly as the provider gives them.
- Confirm the phone shows as registered, then make test calls in and out, to and from a mobile phone.
- Check audio in both directions on each test call.
- Set the emergency location for the account.
- Change every default password and restrict dialing you do not need.
- Note the phone's call statistics on a normal call, so you have a baseline when something changes.