18 E164 Number Processing
E.164 is an international standard (ITU-T Recommendation), titled The international public telecommunication numbering plan, that defines a numbering plan for the worldwide public switched telephone network (PSTN) and some other data networks.
E.164 defines a general format for international telephone numbers. Plan-conforming telephone numbers are limited to only digits and to a maximum of fifteen digits.[1] The specification divides the digit string into a country code of one to three digits, and the subscriber telephone number of a maximum of twelve digits.
In PortSIP PBX, E164 processing converts user-dialed numbers (including those with a leading +) into a standardized format that can be interpreted by your outbound rules and provider.
Using E164 processing is optional, but it can help solve the issue of handling numbers dialed with a leading +. It converts these numbers into a format that can be interpreted by the rules based on the call type (local, national, or international).
E.164 Settings
The E.164 Settings control how PortSIP PBX normalizes and transforms dialed phone numbers—especially numbers entered in international (E.164) format—before outbound routing rules are applied.
Accessing E.164 Settings
Sign in to the PortSIP PBX Web Portal as a Tenant Admin.
Navigate to Blacklist and Codes > Codes and E164 > E164.
The E.164 configuration page appears (as shown in the screenshot below).

Configuration Options
International Code
Defines the international dialing prefix used when placing calls to other countries without using the “+” symbol.
Example (United States):
International Code:
011Dialed number:
+44123456789Converted number:
01144123456789
This allows users to dial international numbers using E.164 format while remaining compatible with carriers that require a numeric international prefix.
Process E.164 Numbers
Controls whether the PBX processes numbers that begin with a leading “+”.
Enabled: Numbers dialed in E.164 format (e.g.,
+44123456789) are normalized according to the E.164 rules.Disabled: The PBX does not modify the dialed number, even if it starts with
+.
Recommendation: Enable this option in most deployments to ensure consistent number normalization.
Remove Special Characters
Remove the following characters from processed numbers:
(, ), and spaces
When enabled, the PBX removes these characters from dialed numbers.
Example:
Dialed number:
+1 (813) 456 78910Converted number:
+181345678910
This ensures compatibility with SIP trunks and outbound routing rules.
Remove Country Code for Same Country
When enabled, the PBX removes the country code if the call is made within the same country.
Example (United States):
Dialed number:
+12345678910Converted number:
2345678910
This is useful when your carrier expects national-format numbers for domestic calls.
Select Country
Select the country where your PBX tenant is located.
This setting allows the PBX to correctly identify:
Your country code
Domestic vs. international calls
Example: Select United States (US) for all examples in this section.
Area Code
Enter your local area code.
Remove if Same Area Code
When enabled, the PBX removes the area code for local calls if it matches the configured area code.
Example:
Area Code:
813Dialed number:
+181345678910Converted number:
45678910
This is useful in regions where local dialing does not require an area code.
National Code
Adds a national dialing prefix to the beginning of the number during processing.
Example:
National Code:
8Dialed number:
+12345678910Converted number:
82345678910
This is typically required in countries where domestic calls must include a national prefix.
Add Prefix
Adds a custom prefix to the processed number.
Common use cases:
Selecting specific outbound rules
Carrier-specific routing requirements
Important: E.164 rules are processed before outbound routing rules.
Example:
Prefix:
2Dialed number:
+12345678910Converted number:
22345678910
Non-E.164 Calls
A Non-E.164 call is a call dialed without a leading “+”.
International Calls (Non-E.164 Format)
If the dialed number:
Does not begin with
+, andBegins with the configured International Code
then the call is treated as an international call.
Call Processing Flow
The PBX identifies the call as international based on the International Code.
The PBX checks the destination country code against:
Blacklist
Codes > Codes and E164 > Allowed Country Code
The PBX verifies the caller’s role and permissions:
If the caller does not have permission to make international calls, the call is rejected.
Example
International Code:
00Dialed number:
004412345678Extracted country code:
44(United Kingdom)
The PBX will:
Verify whether country code
44is allowedCheck whether the caller is permitted to place international calls
If either check fails, the call is blocked.
Domestic Calls (Non-E.164 Format)
If the dialed number:
Does not begin with
+, andDoes not begin with the International Code
then the call is treated as a domestic call.
The PBX checks:
The caller’s role and permissions for domestic calling
If the caller is not authorized to place domestic calls, the call is rejected.
E.164 Calls
An E.164 call is any call where the dialed number begins with a leading “+”. These calls are always treated as international-format numbers, but how they are processed depends on whether Process E.164 Numbers is enabled.
When Process E.164 Numbers Is Disabled
If Process E.164 Numbers is disabled, the PBX does not normalize or rewrite the dialed number.
Call Processing Behavior
The call is identified as an international call.
The PBX checks the destination country code against:
Blacklist
Codes > Codes and E164 > Allowed Country Code
The PBX verifies the caller’s role and permissions:
If the caller is not permitted to make international calls, the call is rejected.
Example
Dialed number:
+4412345678Country code extracted:
44
The PBX checks whether country code 44 is allowed and whether the caller has international calling permissions. If either check fails, the call is blocked.
When Process E.164 Numbers Is Enabled
When enabled, the PBX removes the leading “+” and applies E.164 normalization rules before outbound routing.
After removing the +, the PBX evaluates the number using the following logic.
1. Dialed Number Starts with the Selected Country Code
If the dialed number begins with the configured Select Country code, the call is treated as a national (domestic) call.
Processing Steps
Remove the leading
+.Remove the country code.
If Remove if same country is enabled, the country code is discarded.
If Remove Area Code is enabled, the area code is also removed.
Generate the new dialed number using the rule:
Check the caller’s domestic calling permissions.
If the caller is not permitted to make domestic calls, the call is rejected.
Example
Configuration:
Select Country:
44Area Code:
31Remove if same country: Enabled
Remove Area Code: Enabled
National Code:
11Add Prefix:
22
Dialed number:
Processing result:
Remove
+→4431867762Remove country code
44→31867762Remove area code
31→867762Add National Code
11→11867762Add Prefix
22→2211867762
Final dialed number: 2211867762

2. Dialed Number Does NOT Start with the Selected Country Code
If the E.164 number does not begin with the configured country code, the PBX treats it as an international destination.
Processing Steps
Remove the leading
+.Generate the new dialed number using the rule:
Determine call type:
If Add Prefix is empty → International call
If Add Prefix is configured → National call
For international calls:
Check Allowed Country Code
Check caller’s international calling permissions
If any check fails, the call is rejected.
Example
International Code:
00Add Prefix: (empty)
Dialed number:
+3312345678
Processing result:
Converted number:
003312345678Country code checked:
33
The PBX verifies:
Country code
33is allowedCaller has international calling permissions
If either condition fails, the call is blocked.
Summary: E.164 Call Processing Logic
+ dialed, processing disabled
International
International
+ dialed, same country
Domestic
Domestic
+ dialed, different country
International
International
Prefix added
National
Domestic

Last updated