If you have ever configured a SIP trunk and your outbound calls failed with a 404 error, or your inbound DID routing stopped working after a migration, or your dialer sent calls to the wrong destination — there is a good chance the problem was E.164 formatting. E.164 is the international standard for phone number formatting, and SIP trunking infrastructure depends on it. Get the format wrong and calls do not route. Get it right and you never think about it again.
This is a short, practical guide written by SIPNEX, an FCC-licensed carrier. E.164 formatting errors often surface after a migration from PRI (where number formatting was handled by the carrier’s switch) to SIP (where your system must present numbers in the format the carrier expects). Understanding E.164 prevents most of them.
What E.164 is
E.164 is a numbering plan defined by the International Telecommunication Union in ITU-T Recommendation E.164. It specifies the format for telephone numbers used on the global public switched telephone network. The standard defines a maximum length of 15 digits and a structure that starts with a country code followed by the subscriber number. SIP borrows it directly: RFC 3966, the tel URI spec, marks a globally unique number with a leading “+” followed by the full E.164 number.
For North American numbers (US, Canada, and several Caribbean nations under the NANP — North American Numbering Plan), the E.164 format is:
+1XXXXXXXXXX
That is a plus sign, the country code 1, and ten digits (3-digit area code + 7-digit subscriber number). No spaces, no dashes, no parentheses, no dots. Just +1 followed by ten digits.
Examples (using the NANP’s fictional 555-01XX line numbers):
- Dallas number: +12145550123
- New York number: +12125550187
- Toll-free number: +1800 followed by the seven-digit number (+1800NXXXXXX)
- Canadian number: +14165550198
For international numbers outside NANP, the format follows the same pattern but with different country codes and varying subscriber number lengths. The UK examples below come from the ranges Ofcom reserves for drama use:
- UK mobile: +447700900123 (country code 44)
- London landline: +442079460123 (country code 44; dialed 020 7946 0123 inside the UK)
- Berlin landline: +4930 followed by the subscriber number (country code 49; the domestic 030 drops its 0)
The maximum 15 digits includes the country code. The standard sets no fixed minimum, and some small countries and territories use numbers far shorter than 15 digits.
Why E.164 matters for SIP trunking
PRI trunks and analog phone lines handled number formatting at the carrier’s switch level. You could dial “5550123” or “2145550123” or “12145550123” and the carrier’s signaling equipment would figure out what you meant based on your local dialing plan. SIP does not work that way.
SIP is an internet protocol. It routes calls based on the exact content of the SIP URI in the Request-URI and the From/To headers. When your PBX sends a SIP INVITE, the called number must be in a format that the carrier’s routing engine can parse unambiguously. Most SIP carriers — including SIPNEX — expect or require E.164 format for both outbound dialing and caller ID presentation.
Outbound calls. When your dialer places a call to +12145550123, the carrier receives a SIP INVITE with that exact string in the Request-URI. The carrier’s routing engine parses the country code and NPA-NXX (214-555), then runs an LNP dip: because a ported number’s NPA-NXX no longer identifies who serves it, the dip returns the Location Routing Number (LRN) of the current serving switch, and the carrier routes the call on that LRN. If your system sends “2145550123” without the +1 prefix, some carriers will normalize it automatically. Others will return a 404 (Not Found) or 484 (Address Incomplete) error because the number does not match the expected format.
Caller ID. The From header of your SIP INVITE contains your outbound caller ID. For STIR/SHAKEN attestation, the carrier must confirm that you are authorized to use that number, typically by checking it against your DID list. Some carriers normalize the number before that check. On a carrier that compares caller ID literally, though, a CID sent as “2145550123” won’t match a list stored as “+12145550123.” The carrier then can’t confirm number authority and signs at B-level instead of A-level, silently and on every call.
Inbound routing. When an inbound call arrives for one of your DIDs, the carrier sends a SIP INVITE to your system with the called number in the To header. If your PBX expects the number in one format (e.g., “2145550123”) but the carrier sends it in E.164 (“+12145550123”), your inbound routing rules may not match and the call goes to a default destination or gets rejected. This is one of the most common issues after migrating from PRI to SIP — the PBX was configured to match 10-digit numbers, and the new SIP carrier delivers 11-digit E.164 numbers.
Common E.164 formatting mistakes
These are the most common E.164 errors.
Missing the country code. Sending “2145550123” instead of “+12145550123”. Some carriers accept 10-digit numbers and prepend +1 automatically. Others reject the call. Do not rely on carrier normalization — always send E.164 from your system.
Including formatting characters. Sending “(214) 555-0123” or “214.555.0123” or “214-555-0123”. SIP URIs should contain only the plus sign and digits. Parentheses, spaces, dashes, and dots are display formatting for human readability — they do not belong in SIP signaling. Most SIP stacks strip these automatically, but some edge cases can cause routing failures.
Leading zeros. Many countries use a leading 0 as a domestic trunk prefix: inside the UK, a London number is dialed 020 7946 0123. E.164 never includes that zero after the country code. For North American numbers, this is rarely an issue, but for international termination it causes routing failures — +4402079460123 is wrong, +442079460123 is correct (the 0 is a domestic dialing prefix, not part of the E.164 number).
Toll-free number formatting. Toll-free numbers follow the same E.164 format: +1800, +1888 and the other 8XX codes, followed by the seven-digit number. Some systems store toll-free numbers differently from local numbers. They should not — E.164 is E.164 regardless of the number type.
CID mismatch between PBX and carrier. Your PBX sends CID as “2145550123” in the From header, and your carrier stores your DID as “+12145550123”. If that carrier matches literally, the check fails silently and your calls go out with B-level attestation instead of A-level. Analytics engines treat partial (B) attestation as a lower-trust signal, though no carrier publishes a specific answer-rate gap. This is the most insidious E.164 error because there is no error message — the call completes normally, just with degraded attestation.
How to configure E.164 in common platforms
VICIdial / Asterisk. Asterisk does not rewrite numbers in the trunk definition itself (pjsip.conf, or sip.conf on older installs); normalization happens in the dialplan. In extensions.conf, use pattern matching to send every outbound number in E.164: exten => _1NXXNXXXXXX,1,Dial(PJSIP/+${EXTEN}@sipnex) for 11-digit numbers, and exten => _NXXNXXXXXX,1,Dial(PJSIP/+1${EXTEN}@sipnex) for 10-digit ones. Asterisk 21 removed chan_sip, so PJSIP is the current syntax; older chan_sip-based VICIdial builds use SIP/ in the same pattern. For caller ID, set the campaign CallerID to E.164 format: +12145550123 rather than 2145550123.
FreePBX. In the Outbound Route configuration, set the dial pattern to match 10-digit numbers and prepend +1. In Trunk settings, ensure the Outbound Caller ID is in E.164 format with the +1 prefix.
Generic SIP devices. In any SIP endpoint or PBX, check the outbound number formatting settings. Look for options labeled “prefix,” “prepend,” or “number manipulation rules” and configure them to add +1 to outbound numbers. Check the caller ID or From header configuration and ensure it includes the +1 prefix.
Testing. After configuring E.164, place test calls and verify in your SIP logs that the INVITE contains the expected format in both the Request-URI (called number) and From header (caller ID). Check with your carrier that your calls are receiving A-level attestation — on a carrier that matches caller ID literally, a formatting error in the CID field can silently cause B-level signing.
E.164 and number portability
When you port numbers between carriers, E.164 format ensures consistency. A ported number retains its E.164 identity regardless of which carrier serves it. The number +12145550123 is always +12145550123, whether it is served by AT&T, Verizon, SIPNEX, or any other carrier. The NPAC (Number Portability Administration Center) database maps each ported number to the LRN of the switch now serving it, and carriers query that data (the LNP dip) before routing. The routing updates when you port, but the number itself does not change format.
During a port to SIPNEX, ensure your PBX configuration uses the same E.164 format for the ported numbers as for newly provisioned SIPNEX DIDs. A common mistake is configuring new SIPNEX DIDs in E.164 (+1XXXXXXXXXX) but leaving ported numbers in the old 10-digit format because that is how the previous carrier delivered them. Normalize everything to E.164 and your routing will be consistent.
Frequently asked questions
Why does my SIP trunk require E.164 format?
SIP routes calls based on the exact content of the number in the SIP message headers. Unlike PRI or analog systems, SIP does not interpret local dialing plans or automatically add country codes. The carrier’s routing engine expects an unambiguous, globally unique phone number — which is what E.164 provides. Additionally, STIR/SHAKEN attestation requires the carrier to confirm you are authorized to use your outbound caller ID. On a carrier that compares the number literally, a format mismatch (10 digits sent, +1 and 11 digits stored) fails that check and the call is signed at B-level. Using E.164 consistently removes both risks.
Do I need E.164 for domestic US calls?
Yes, for SIP trunking. While some carriers accept 10-digit numbers and normalize them to E.164 internally, relying on this behavior is a risk — different carriers handle normalization differently, and a carrier migration can break your call routing if the new carrier expects strict E.164. Additionally, STIR/SHAKEN attestation matching can be format-sensitive. The safest practice is to configure your PBX or dialer to always send numbers in E.164 format (+1XXXXXXXXXX) for both the called number and the caller ID, regardless of whether the call is domestic. This eliminates an entire category of potential routing and attestation problems.
How do I convert my phone numbers to E.164?
For North American numbers, the conversion is simple: add +1 to the front of the 10-digit number and remove all formatting characters. (214) 555-0123 becomes +12145550123. 214-555-0123 becomes +12145550123. 1-214-555-0123 becomes +12145550123 (remove the dashes, keep the 1, add the plus sign). For international numbers, replace the domestic dialing prefix (usually 0) with the plus sign and country code. In your PBX, configure outbound dial patterns to perform this conversion automatically so agents and lead lists do not need to change.
SIPNEX SIP trunks accept E.164 format on all outbound calls and deliver inbound calls in E.164 format. Our STIR/SHAKEN attestation database is keyed on E.164, so sending caller ID in that format keeps the authorized-number check straightforward.
Keep reading.
The carrier built by operators, for operators.
FCC-licensed carrier with its own STIR/SHAKEN SP certificate. Operator-owned. SIP trunks built for operators who dial at volume.