phone number standards
phone number standards
São Tomé and Príncipe Phone Numbers: Complete +239 Country Code Guide
Complete guide to São Tomé and Príncipe phone number format, validation, and integration. Learn +239 country code structure, CST and Unitel STP operators, E.164 formatting, and AGER regulatory requirements.
São Tomé and Príncipe Phone Numbers: +239 Country Code & Validation Guide
Introduction
Build applications that interact with users in São Tomé and Príncipe by mastering the country's +239 telephone numbering system. This comprehensive guide covers São Toméan phone number formats, validation techniques, operator information, and regulatory compliance. Learn to integrate São Tomé and Príncipe phone numbers seamlessly, prevent validation errors, and implement proper international dialing with the +239 country code.
Quick Reference
- Country: São Tomé and Príncipe (often searched as "Sao Tome and Principe")
- Country Code: +239
- ISO Code: ST (alpha-2), STP (alpha-3)
- Mobile Country Code (MCC): 626
- International Prefix: 00
- National Prefix: None
- Total Length: 7 digits (subscriber number), 9 digits including country code
Numbering Plan Structure
São Tomé and Príncipe phone numbers follow the +239 country code format and adhere to international ITU-T E.164 standards with a consistent 7-digit structure.
General Number Structure
All phone numbers conform to the ITU-T E.164 standard for global interoperability:
+239 XXX XXXX
Where:
+239is the country code identifying São Tomé and PríncipeXXX XXXXrepresents the 7-digit subscriber number unique to each user
Number Categories and Formats
São Tomé and Príncipe phone numbers fall into several categories:
| Type | Format | Example | Usage |
|---|---|---|---|
| Geographic | +239 22X XXXX | +239 222 5001 | Fixed-line services (CST network) |
| Mobile | +239 9XX XXXX | +239 900 1234 | Mobile services (Unitel STP network) |
| Emergency | 1XX | 112 | Emergency and essential services |
| Short Codes | Variable | 3XXX, 4XXX | Value-added services (e.g., SMS voting) |
Distinguish between these categories for accurate validation and routing. Design your system to handle each number type appropriately – for example, recognize short codes to prevent treating them as regular phone numbers.
Validation Patterns
Use regular expressions to validate São Toméan phone numbers:
// Regular expressions for validation
const patterns = {
geographic: /^(\+239)?22\d{5}$/,
mobile: /^(\+239)?9\d{6}$/,
emergency: /^1\d{2}$/,
shortCode: /^[34]\d{3}$/
};
// Example usage
function validateNumber(number, type) {
return patterns[type].test(number);
}Adapt the shortCode regex to match specific short code formats in your application. Test these patterns against various inputs, including edge cases like invalid prefixes or incorrect lengths.
Implementation Guide
Best Practices for Developers
Follow these best practices when working with São Toméan phone numbers:
-
Storage Format: Store phone numbers in E.164 format (
+239XXXXXXXX) for consistency and international compatibility. -
Display Format: Format numbers for display with grouped digits for readability:
javascript// Format for display function formatPhoneNumber(number) { return number.replace(/(\+239)(\d{3})(\d{4})/, '$1 $2 $3'); } -
Validation Implementation: Integrate validation checks throughout your application to prevent invalid numbers from entering your system:
javascriptfunction isValidSTPNumber(number) { // Remove spaces and other formatting const cleaned = number.replace(/\s+/g, ''); // Check for valid patterns return patterns.geographic.test(cleaned) || patterns.mobile.test(cleaned) || patterns.emergency.test(cleaned) || patterns.shortCode.test(cleaned); }This function checks against all defined patterns. Handle errors gracefully and provide informative feedback to users.
Critical Considerations
- Number Portability: Number portability is not available – a number's prefix remains tied to the original operator
- Emergency Handling: Allow calls to emergency numbers (e.g., 112) regardless of validation rules – emergency calls bypass all validation and formatting restrictions
- International Format: Include the
+239country code prefix for international compatibility
Dialing Procedures
Understand these procedures to provide accurate dialing instructions in your application.
Domestic Calls
- Local: Dial the 7-digit subscriber number directly (e.g.,
222 5001) - Mobile: Dial the 7-digit number starting with 9 (e.g.,
900 1234)
International Calls
- Outgoing: Dial the international prefix (00), followed by the country code and subscriber number (e.g.,
00 351 123456789for Portugal) - Incoming: Dial the country code (+239) followed by the 7-digit local number (e.g.,
+239 222 5001from the United States)
Technical Implementation Notes
Error Handling
Implement error handling to manage invalid input:
function handlePhoneNumber(number) {
try {
// Remove all non-numeric characters except '+'
const cleaned = number.replace(/[^\d+]/g, '');
if (!isValidSTPNumber(cleaned)) {
throw new Error('Invalid STP phone number format');
}
return formatPhoneNumber(cleaned);
} catch (error) {
console.error(`Phone number validation failed: ${error.message}`);
return null;
}
}This function catches and handles validation errors. Log errors for debugging and monitoring.
Integration Considerations
- APIs and Databases: Use E.164 format for storing and exchanging phone numbers
- Error Handling: Implement error handling for invalid numbers with informative messages
- Local Number Formatting: Consider local formatting preferences when displaying numbers
- Emergency Numbers: Handle emergency numbers as a special case, bypassing validation
Regulatory Compliance
The Autoridade Geral de Regulação (AGER) oversees telecommunications in São Tomé and Príncipe, including spectrum management and the numbering system. All number assignments require AGER approval, and ITU-T E.164 compliance is mandatory. Users of telecommunication equipment must obtain certification through AGER. Consult the AGER website (www.ager.st) for current regulations.
Telecommunications Landscape
Market Structure and Operators
The market is primarily served by two operators:
-
CST (Companhia Santomense de Telecomunicações): The primary fixed-line and mobile provider, using the
22XXXXXXnumber range for fixed lines. Founded December 20, 1989, CST is a joint stock company with 51% owned by Africatel Holding BV and 49% by the São Toméan State. As of 2025, CST holds 100% market share in fixed services and 83% market share in mobile communications. CST uses MCC 626, MNC 01. Operating licenses are valid until March 1, 2027. AGER recognized CST as having the National Mobile Network with the Largest Coverage, Best Quality, and Fastest Internet Speed for two consecutive years. -
Unitel STP: The mobile operator using the
9XXXXXXXnumber range. Unitel STP launched São Tomé and Príncipe's first commercial 4G network following successful tests conducted on April 7, 2023, with AGER approval. The 4G service initially launched in the capital, São Tomé, marking a significant milestone in the country's digital transformation. With a population of approximately 231,000 and under 200,000 mobile subscriptions (as of 2021), Unitel STP provides critical mobile connectivity.
Regulatory Framework
The AGER (Autoridade Geral de Regulação de São Tomé e Príncipe) implements strict quality of service standards, infrastructure development requirements, consumer protection measures, and digital inclusion programs. Established by Decree-Law No. 14/2005 (August 24, 2005), AGER operates under the Ministry responsible for Telecommunications with technical, administrative, financial, and patrimonial autonomy.
2025 AGER Activities:
- National Numbering Plan Consultation: Public consultation on the National Numbering Plan (PNN) Regulation conducted July 8–28, 2025, as part of reviewing and updating the legal-regulatory framework
- Internet Governance Forum: AGER organized the 1st National Internet Governance Forum 2025 (FGISTP2025) on July 28–30, 2025, under the theme "Connectivity as a Pillar for Digital Inclusion"
Stay informed about these initiatives to ensure your application aligns with the country's evolving regulatory landscape. Consult the AGER website at www.ager.st for current information.
Troubleshooting Guide
Common Issues
-
Invalid Number Format:
- Check for the correct prefix (22 for landline, 9 for mobile)
- Verify the total length (7 digits excluding the country code)
- Ensure proper country code usage (+239)
-
Connection Issues:
- Verify the international dialing prefix (00) when calling from São Tomé and Príncipe
- Check for proper number formatting
- Confirm carrier support for international calls
Frequently Asked Questions
What is the country code for São Tomé and Príncipe? (+239)
The country code for São Tomé and Príncipe is +239. When dialing São Toméan numbers internationally, prefix the number with +239 (or 00239 from some countries). For example, a mobile number 900 1234 becomes +239 900 1234 in international format. São Tomé and Príncipe also uses ISO code ST (alpha-2), STP (alpha-3), and Mobile Country Code (MCC) 626 for telecommunications systems.
How do I validate a São Tomé and Príncipe (+239) phone number?
Validate São Toméan phone numbers using these patterns: Geographic (fixed-line) numbers start with 22 followed by 5 digits (e.g., +239 222 5001), while mobile numbers start with 9 followed by 6 digits (e.g., +239 900 1234). The complete format is +239 XXXXXXX (7 digits total). Use regex patterns /^(\+239)?22\d{5}$/ for geographic and /^(\+239)?9\d{6}$/ for mobile numbers. Store numbers in E.164 format (+239XXXXXXX) for consistency.
Which mobile operators and telecom providers serve São Tomé and Príncipe?
São Tomé and Príncipe has two main telecommunications operators: CST (Companhia Santomense de Telecomunicações) holds 100% market share in fixed services and 83% in mobile communications (as of 2025), using number prefix 22 for fixed lines. Unitel STP provides mobile services using prefix 9 and launched the country's first commercial 4G network in 2023 following tests on April 7, 2023, with AGER approval. CST uses MCC 626, MNC 01, with operating licenses valid until March 1, 2027.
Is number portability available in São Tomé and Príncipe?
No, number portability is not available in São Tomé and Príncipe. A phone number's prefix remains permanently tied to the original operator. Mobile numbers starting with 9 stay with Unitel STP, and fixed-line numbers starting with 22 remain with CST. Design your system to account for this limitation, as it affects number identification and routing logic.
What is AGER and what are its telecommunications responsibilities?
AGER (Autoridade Geral de Regulação de São Tomé e Príncipe) is the telecommunications regulator established by Decree-Law No. 14/2005 (August 24, 2005). AGER oversees spectrum management, numbering system planning, allocation and supervision, quality of service standards, and infrastructure development. In 2025, AGER conducted a National Numbering Plan consultation (July 8–28, 2025) and organized the 1st National Internet Governance Forum (July 28–30, 2025). All number assignments require AGER approval, and ITU-T E.164 standard compliance is mandatory. Visit www.ager.st for current regulations.
How do I format São Tomé and Príncipe phone numbers in E.164 international format?
Convert São Toméan phone numbers to E.164 format by: (1) removing all non-digit characters, (2) adding +239 country code prefix if not present. For example: "222 5001" becomes "+239222 5001" (fixed-line), "900 1234" becomes "+239900 1234" (mobile). Store numbers in E.164 format (+239XXXXXXX) for international compatibility, database consistency, and API integration. Format for display as "+239 XXX XXXX" for better readability while maintaining E.164 storage format.
What emergency numbers should I implement for São Tomé and Príncipe?
São Tomé and Príncipe uses emergency numbers in the 1XX format, with 112 being the primary emergency number for essential services. Allow calls to emergency numbers regardless of other validation rules – emergency calls bypass any validation or formatting restrictions to ensure immediate access to critical services. Handle emergency numbers as a special case in your application logic using the regex pattern /^1\d{2}$/.
Conclusion
Successfully integrate São Tomé and Príncipe phone numbers with the +239 country code into your applications by following the best practices and technical guidelines outlined in this comprehensive guide. Stay updated with AGER telecommunications regulations and monitor the evolving São Toméan mobile and fixed-line landscape to ensure your application remains compliant and provides a seamless user experience. Store numbers in E.164 international format, implement robust validation for both CST and Unitel STP operators, and handle emergency numbers as special cases for optimal results.