Frequently Asked Questions
To call internationally from Sao Tome and Principe, dial the international prefix 00, followed by the destination country code and the subscriber number.
The country code for São Tomé and Príncipe is +239. This code is required when dialing into the country from abroad and should always be included when storing phone numbers in international format (E.164).
Sao Tome and Principe phone numbers follow the E.164 international standard, which includes the +239 country code followed by a 7-digit subscriber number. For example, a complete number would look like +239 XXX XXXX.
You can validate Sao Tome and Principe phone numbers using regular expressions. Distinct patterns exist for geographic (+239 22X XXXX), mobile (+239 9XX XXXX), emergency (1XX), and short code numbers. Always store numbers in E.164 format (+239XXXXXXXX) for consistency.
Including the country code (+239), Sao Tome and Principe phone numbers have a total of 9 digits. The subscriber number itself consists of 7 digits, which can be further categorized into fixed-line (22X XXXX) and mobile (9XX XXXX) numbers.
+239 is the internationally assigned country code for Sao Tome and Principe, as defined by the International Telecommunication Union (ITU). Using this code ensures global interoperability and correct routing of calls to and from the country.
Mobile numbers in Sao Tome and Principe start with 9 and follow the format +239 9XX XXXX. Unitel STP is the primary mobile operator in the country, and using this specific format is crucial for proper routing.
For domestic calls within Sao Tome and Principe, simply dial the 7-digit subscriber number. The initial digits (2 for landlines, 9 for mobile) determine the routing.
When calling Sao Tome and Principe from another country, dial the country code (+239) followed by the 7-digit local number. Ensure you include the plus sign (+) before the country code for proper international dialing.
The Autoridade Geral de Regulação (AGER) regulates telecommunications in Sao Tome and Principe. AGER oversees number assignments, spectrum management, and enforces compliance with international standards like ITU-T E.164.
Always use the E.164 format (+239XXXXXXXX) when storing and exchanging phone numbers with APIs and databases. This practice guarantees consistency, simplifies data management, and ensures compatibility with international systems.
The main telecom operators in Sao Tome and Principe are CST (Companhia Santomense de Telecomunicações) for fixed-line services (22XXXXXX numbers) and Unitel STP for mobile services (9XXXXXXX numbers).
No, number portability is not currently available in Sao Tome and Principe. The number's prefix remains tied to the original operator, which should be considered during application development.
The emergency number in Sao Tome and Principe is 112. It's essential to allow calls to this number regardless of any other validation rules within your application.
São Tomé and Príncipe Phone Numbers: +239 Country Code & Validation Guide
Introduction
You're building an application that interacts with users in São Tomé and Príncipe? Then understanding the country's telephone numbering system is crucial. This guide provides a comprehensive overview of number formats, validation techniques, best practices, and critical considerations for handling phone numbers in this unique market. We'll equip you with the knowledge to seamlessly integrate São Toméan phone numbers into your applications.
Quick Reference
Numbering Plan Structure
This section details the structure of São Tomé and Príncipe phone numbers, adhering to international standards.
General Number Structure
All phone numbers in São Tomé and Príncipe conform to the ITU-T E.164 standard, an internationally recognized standard for phone number formatting. This ensures global interoperability and simplifies communication across different systems. The consistent format is:
Where:
+239
is the country code, identifying São Tomé and Príncipe.XXX XXXX
represents 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, each with a distinct format:
+239 22X XXXX
+239 9XX XXXX
1XX
It's important to distinguish between these categories for accurate validation and routing. For instance, recognizing a short code prevents it from being treated as a regular phone number. You should design your system to handle these different number types appropriately.
Validation Patterns
Robust validation is essential for data integrity. You can use regular expressions to validate São Toméan phone numbers effectively:
This code snippet provides a practical way to validate different number types. Remember to adapt the
shortCode
regex to match the specific short code formats used in your application. Testing these patterns against various inputs, including edge cases like invalid prefixes or lengths, is crucial for ensuring their reliability.Implementation Guide
This section provides practical guidance on implementing São Tomé and Príncipe phone number handling in your applications.
Best Practices for Developers
Here are some best practices to consider when working with São Toméan phone numbers:
Storage Format: Always store phone numbers in the international E.164 format (
+239XXXXXXXX
). This ensures consistency and facilitates interaction with international systems. Storing numbers in a standardized format simplifies data management and reduces the risk of errors during processing.Display Format: While storing numbers in E.164 is recommended, you might want to format them differently for display to improve readability. Consider grouping digits for better visual clarity:
Validation Implementation: Integrate validation checks throughout your application workflow. This prevents invalid numbers from entering your system and causing downstream issues. Here's an example of a comprehensive validation function:
This function checks against all defined patterns, providing a single point of validation for your application. Remember to handle potential errors gracefully and provide informative feedback to the user.
Critical Considerations
Number Portability: Number portability is not currently available in São Tomé and Príncipe. This means that a number's prefix remains tied to the original operator. You should be aware of this limitation when designing your system, as it impacts number identification and routing.
Emergency Handling: Always allow calls to emergency numbers (e.g., 112) regardless of other validation rules. Emergency calls should bypass any validation or formatting restrictions to ensure immediate access to essential services.
International Format: Always include the
+239
country code prefix for international compatibility. This ensures that your application can correctly handle and route calls to and from São Tomé and Príncipe, regardless of the user's location.Dialing Procedures
This section outlines the procedures for making domestic and international calls to and from São Tomé and Príncipe. Understanding these procedures is important for providing accurate dialing instructions within your application.
Domestic Calls
Local: Dial the 7-digit subscriber number directly. For example, to call a fixed-line number in São Tomé, you would dial
222 5001
.Mobile: Dial the 7-digit number starting with 9. For example, to call a mobile number, you would dial
900 1234
.International Calls
Outgoing: To call internationally from São Tomé and Príncipe, dial the international prefix (00), followed by the country code and the subscriber number. For example, to call Portugal, you would dial
00 351 123456789
.Incoming: To call São Tomé and Príncipe from another country, dial the country code (+239) followed by the 7-digit local number. For example, to call a fixed-line number in São Tomé from the United States, you would dial
+239 222 5001
.Technical Implementation Notes
This section delves into more technical aspects of phone number handling.
Error Handling
Implement robust error handling to gracefully manage invalid input or unexpected situations. Here's an example of a function with error handling:
This function demonstrates how to catch and handle validation errors, preventing application crashes and providing useful feedback. You should log these errors for debugging and monitoring purposes.
Integration Considerations
APIs and Databases: Always use the E.164 format for storing and exchanging phone numbers with APIs and databases. This ensures consistency and interoperability across different systems.
Error Handling: Implement proper error handling for invalid numbers, providing informative messages to users and logging errors for debugging.
Local Number Formatting: Consider local number formatting preferences when displaying numbers to users. This enhances user experience and avoids confusion.
Emergency Numbers: Handle emergency numbers as a special case, bypassing validation and ensuring immediate access to emergency services.
Regulatory Compliance
The Autoridade Geral de Regulação (AGER) oversees telecommunications in São Tomé and Príncipe. AGER is responsible for spectrum management and the numbering system, including planning, allocation, and supervision. You should familiarize yourself with their regulations and ensure your application complies with all relevant requirements. All number assignments must be approved by AGER, and compliance with ITU-T E.164 standards is mandatory. For the most up-to-date information, consult the AGER website (www.ager.st). Additionally, be aware that users of telecommunication equipment must obtain certification through AGER.
Telecommunications Landscape
Understanding the telecommunications landscape in São Tomé and Príncipe provides valuable context for developing your application.
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
22XXXXXX
number 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
9XXXXXXX
number 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:
Staying informed about these initiatives is crucial for ensuring your application aligns with the country's evolving regulatory landscape. For the most up-to-date information, consult the AGER website at www.ager.st.
Troubleshooting Guide
This section addresses common issues and provides potential solutions.
Invalid Number Format: Double-check for the correct prefix (22 for landline, 9 for mobile), verify the total length (7 digits excluding the country code), and 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, and confirm carrier support for international calls.
Frequently Asked Questions
What is the country code for São Tomé and Príncipe?
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 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. Always store numbers in E.164 format (+239XXXXXXX) for consistency.Which mobile operators 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 currently available in São Tomé and Príncipe. This means that 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é phone numbers in E.164 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). Always store numbers in E.164 format (+239XXXXXXX) for international compatibility, database consistency, and API integration. You can 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. Always allow calls to emergency numbers regardless of other validation rules – emergency calls should 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
By following the best practices and guidelines outlined in this guide, you can effectively integrate São Tomé and Príncipe phone numbers into your applications. Remember to stay updated with AGER regulations and consider the evolving telecommunications landscape to ensure your application remains compliant and provides a seamless user experience. With this comprehensive understanding, you're well-equipped to navigate the intricacies of São Tomé and Príncipe's phone number system.