E.164 & SMS Quick Reference: Complete guide to Senegal phone numbers with +221 country code: 9-digit format validation, mobile operators (Orange, Yas, Expresso), regex examples, number portability, and ARTP regulations for developers. Need real-time carrier, porting, and line-type validation beyond regex? Run live lookups with SMSRoute HLR Lookup or send directly over Tier-1 routes via the SMSRoute SMS API.
Introduction
Senegal uses the +221 country code with a consistent 9-digit phone number format. This comprehensive guide covers everything developers need to integrate Senegalese phone numbers into applications: validation techniques, operator prefixes, number portability (MNP), and ARTP (Autorité de Régulation des Télécommunications et des Postes) regulations.
Who needs this guide: Developers implementing SMS APIs, payment verification systems, CRM platforms, authentication flows (OTP/2FA), call routing systems, and any application requiring phone number validation for Senegalese users.
Quick Reference
- Country: Senegal
- Country Code: +221
- International Prefix: 00
- National Prefix: None
- Number Length: 9 digits
- Format: NXX XXX XXX
- Regulatory Authority: ARTP
- Emergency Numbers: Police (17), Fire (18), Ambulance (15)
- Mobile Pattern: /^7[0-9]\\d{7}$/
- Landline Pattern: /^3[03269]\\d{7}$/
Understanding Senegal's Telecommunications System
Senegal's telecommunications sector has grown significantly since liberalization in the 1990s. The ARTP oversees the sector, which contributes almost 10% of national GDP. Mobile services drive this growth, with penetration rates exceeding 100% – more mobile subscriptions exist than people.
Three main operators and several MVNOs serve this market. As of 2024, market share distribution is:
- Orange Senegal (Sonatel): 56-59% market share – dominant provider with prefixes 70X, 76X, 77X, 78X
- Yas Senegal: 20-25% market share – formerly Free Senegal, rebranded November 2024 and 80% owned by Axian Group with prefixes 76X (legacy), operating on 77X, 78X
- Expresso Senegal: 15-17% market share – operates with prefix 75X
MVNOs (Mobile Virtual Network Operators):
- Sirius Telecoms Afrique (Promobile): Prefixes 754X, 755X, 756X
- Origines SA: Prefix 757X
These MVNOs use the 75X range reserved for virtual operators. Ensure your application supports numbering plans from all major operators.
Senegal Phone Number Format Explained
Core Structure
All Senegalese phone numbers follow a consistent 9-digit structure: NXX XXX XXX.
- N: Service category – 3 for landlines or 7 for mobile numbers
- X: Any digit from 0 to 9
Service Categories
1. Landline Numbers (Geographic)
Landline numbers follow the format 3XX XXX XXX. Example: 338 219 903 (Dakar). The first three digits indicate the geographic zone:
- 338, 339: Dakar and surrounding metropolitan area (Sonatel/Orange)
- 30X: Non-geographic fixed (Expresso Senegal)
- 32X: Non-geographic fixed (legacy Sentel/Free, now Yas Senegal)
- 36X: Non-geographic fixed (CSU/Hayo)
- 39X: VoIP and government services (ADIE)
Note: Operator-specific allocations have superseded the original geographic zone coding (33X for Dakar, 34X Northern, 35X Central, 36X Southern). Dakar now uses 338 and 339 specifically, while other regions use the same prefixes with different middle digits. For location-based services, verify specific prefix allocations with ARTP's official numbering plan.
2. Mobile Numbers
Mobile numbers follow the format 7XX XXX XXX. Example: 778 688 219. The first three digits after the 7 identify the mobile operator:
- 70X: Orange Senegal and Expresso Senegal (shared range)
- 72X: CSU/Hayo mobile services
- 75X: Expresso Senegal and MVNO range (754-757)
- 76X: Yas Senegal (formerly Free/Sentel, some Orange allocations)
- 77X: Orange Senegal (Sonatel Mobiles)
- 78X: Orange Senegal (Sonatel Mobiles)
- 79X: Government/ADIE mobile services
Legacy Free Senegal Numbers: Following the November 2024 rebranding to Yas Senegal, all existing Free Senegal numbers with 76X, 77X, and 78X prefixes remain valid and operational. No number changes are required for existing subscribers. The rebranding is organizational only—technical infrastructure and number allocations continue unchanged.
Operator prefixes help route calls and SMS messages correctly. However, mobile number portability (MNP) means the prefix may not reflect the current serving operator.
3. Special Service Numbers
Senegal also uses special service numbers:
- Toll-Free: 800 XXX XXX
- Premium: 88X XXX XXX
- Shared Cost: 81X XXX XXX
These numbers have specific routing and billing requirements. Account for them in your application.
4. Short Codes and Emergency Numbers
Emergency Services (2-3 digits):
- Police: 17 (national), also 800-002-020
- Fire/Sapeurs Pompiers: 18
- Ambulance/SAMU: 15, also 33 824 2418
- Military Police: 123 (more responsive in countryside areas)
- Tourist Police: +221 33 971 1017 (callable from outside Senegal)
Operator Services:
- Directory Assistance: 13
- International Operator: 16
USSD Short Codes: Senegal uses USSD codes in the format *#XXXX# or *XXX# for value-added services. Common examples include *123# for balance checks and *145# for mobile service management. ARTP allocates 2XXX format USSD codes to registered value-added service providers.
Important: You cannot call emergency numbers from outside Senegal (except Tourist Police). Implement restrictions in auto-dialer applications to prevent accidental emergency calls during testing.
How to Validate Senegal Phone Numbers
Number Validation
Use regular expressions (regex) to validate Senegalese phone numbers efficiently. Here are examples in multiple languages:
JavaScript:
const landlinePattern = /^3[03269]\d{7}$/;
const mobilePattern = /^7[0-9]\d{7}$/;
const tollfreePattern = /^800\d{6}$/;
const emergencyPattern = /^(1[578]|123)$/;
const internationalPattern = /^\+221[37]\d{8}$/;
function validateSenegalNumber(number) {
const cleanNumber = number.replace(/[\s\-\(\)\.]/g, '');
if (cleanNumber.startsWith('+221') || cleanNumber.startsWith('00221')) {
const national = cleanNumber.replace(/^(\+221|00221)/, '');
return validateSenegalNumber(national);
}
if (emergencyPattern.test(cleanNumber)) {
return { valid: true, type: 'emergency' };
} else if (landlinePattern.test(cleanNumber)) {
return { valid: true, type: 'landline' };
} else if (mobilePattern.test(cleanNumber)) {
return { valid: true, type: 'mobile' };
} else if (tollfreePattern.test(cleanNumber)) {
return { valid: true, type: 'tollfree' };
}
return { valid: false, type: 'unknown' };
}
console.log(validateSenegalNumber("338 219 903"));
console.log(validateSenegalNumber("+221 77 868 8219"));
console.log(validateSenegalNumber("800123456"));
console.log(validateSenegalNumber("17"));
console.log(validateSenegalNumber("123456789"));
Python:
import re
class SenegalPhoneValidator:
LANDLINE_PATTERN = r'^3[03269]\d{7}$'
MOBILE_PATTERN = r'^7[0-9]\d{7}$'
TOLLFREE_PATTERN = r'^800\d{6}$'
EMERGENCY_PATTERN = r'^(1[578]|123)$'
INTERNATIONAL_PATTERN = r'^\+221[37]\d{8}$'
@staticmethod
def clean_number(number):
"""Remove formatting characters"""
cleaned = re.sub(r'[\s\-\(\)\.]', '', number)
cleaned = re.sub(r'^(\+221|00221)', '', cleaned)
return cleaned
@classmethod
def validate(cls, number):
"""Validate Senegalese phone number"""
clean = cls.clean_number(number)
if re.match(cls.EMERGENCY_PATTERN, clean):
return {'valid': True, 'type': 'emergency'}
elif re.match(cls.LANDLINE_PATTERN, clean):
return {'valid': True, 'type': 'landline'}
elif re.match(cls.MOBILE_PATTERN, clean):
return {'valid': True, 'type': 'mobile'}
elif re.match(cls.TOLLFREE_PATTERN, clean):
return {'valid': True, 'type': 'tollfree'}
else:
return {'valid': False, 'type': 'unknown'}
print(SenegalPhoneValidator.validate("338 219 903"))
print(SenegalPhoneValidator.validate("+221 77 868 8219"))
PHP:
<?php
class SenegalPhoneValidator {
const LANDLINE_PATTERN = '/^3[03269]\d{7}$/';
const MOBILE_PATTERN = '/^7[0-9]\d{7}$/';
const TOLLFREE_PATTERN = '/^800\d{6}$/';
const EMERGENCY_PATTERN = '/^(1[578]|123)$/';
public static function cleanNumber($number) {
$cleaned = preg_replace('/[\s\-\(\)\.]/', '', $number);
$cleaned = preg_replace('/^(\+221|00221)/', '', $cleaned);
return $cleaned;
}
public static function validate($number) {
$clean = self::cleanNumber($number);
if (preg_match(self::EMERGENCY_PATTERN, $clean)) {
return ['valid' => true, 'type' => 'emergency'];
} elseif (preg_match(self::LANDLINE_PATTERN, $clean)) {
return ['valid' => true, 'type' => 'landline'];
} elseif (preg_match(self::MOBILE_PATTERN, $clean)) {
return ['valid' => true, 'type' => 'mobile'];
} elseif (preg_match(self::TOLLFREE_PATTERN, $clean)) {
return ['valid' => true, 'type' => 'tollfree'];
} else {
return ['valid' => false, 'type' => 'unknown'];
}
}
}
var_dump(SenegalPhoneValidator::validate("338 219 903"));
var_dump(SenegalPhoneValidator::validate("+221 77 868 8219"));
?>
These regex patterns defend against invalid number formats but don't check for number portability. Test your validation logic with various inputs, including edge cases and invalid formats.
Number Portability Integration
Number portability (NP) lets users switch operators while keeping their existing number. Senegal implemented mobile number portability (MNP) in September 2015 under ARTP oversight. Over 40% of numbers in many markets have been ported, making MNP lookup critical for accurate routing.
MNP Lookup Service Providers:
Since ARTP does not provide a public MNP lookup API, you must integrate with commercial providers:
- XConnect (Somos Company) – Provides Senegal MNP data with 1-2ms response times via API or database download
- HLR Lookups – Live HLR and MNP queries for Senegal networks
- Number Portability Lookup – Real-time carrier lookup with Senegal coverage
- Horisen – Worldwide MNP lookup including Senegal
- BSG World – MNP API with serving operator identification
Typical Pricing: $0.002-0.005 per lookup query. Batch lookups and database downloads offer volume discounts.
Implementation Example:
const MNP_API_URL = 'https://api.hlr-lookups.com/lookup';
const MNP_API_KEY = process.env.MNP_API_KEY;
const CACHE_TTL = 86400;
const mnpCache = new Map();
async function checkPortedNumber(msisdn) {
const cacheKey = `mnp:${msisdn}`;
if (mnpCache.has(cacheKey)) {
const cached = mnpCache.get(cacheKey);
if (Date.now() - cached.timestamp < CACHE_TTL * 1000) {
return cached.data;
}
}
try {
const response = await fetch(
`${MNP_API_URL}?msisdn=${msisdn}`,
{
headers: {
'Authorization': `Bearer ${MNP_API_KEY}`,
'Content-Type': 'application/json'
},
timeout: 2000
}
);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
mnpCache.set(cacheKey, {
data: data,
timestamp: Date.now()
});
return data;
} catch (error) {
console.error("Error checking ported number:", error);
return fallbackToPrefix(msisdn);
}
}
function fallbackToPrefix(msisdn) {
const prefix = msisdn.substring(0, 3);
const operatorMap = {
'70': 'Orange/Expresso',
'75': 'Expresso',
'76': 'Yas',
'77': 'Orange',
'78': 'Orange',
'79': 'ADIE'
};
return {
operator: operatorMap[prefix.substring(0, 2)] || 'unknown',
ported: false,
source: 'fallback'
};
}
async function batchCheckPortedNumbers(msisdns) {
const response = await fetch(
`${MNP_API_URL}/batch`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${MNP_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ numbers: msisdns })
}
);
return await response.json();
}
Key Considerations for Number Portability:
- Data Accuracy: The accuracy and timeliness of the MNP database are critical. Ensure you're using a reliable data source.
- Cache TTL: Recommended cache duration is 24-48 hours for MNP data. Balance cost savings with data freshness.
- Error Handling: Implement robust error handling in case the MNP lookup service is unavailable. Consider a fallback mechanism, such as routing based on the original operator prefix.
- Rate Limits: Most providers impose rate limits (e.g., 100-1000 queries/second). Implement request queuing for high-volume scenarios.
- Batch vs. Single Lookup: For bulk operations (e.g., validating customer databases), use batch lookup APIs which offer better performance and lower per-query costs.
- Porting Timeframes: Number porting in Senegal typically takes 1-3 business days. During this period, routing may be unreliable.
Format Handling
Store numbers in international E.164 format (+221NXXXXXXXX), which includes the country code and full 9-digit number. The ITU (International Telecommunication Union) recommends this format for global consistency. Display numbers in different formats depending on context.
function formatInternational(number) {
const clean = number.replace(/\D/g, '');
return `+221 ${clean.slice(0,2)} ${clean.slice(2,5)} ${clean.slice(5)}`;
}
function formatNational(number) {
const clean = number.replace(/\D/g, '');
return `${clean.slice(0,2)} ${clean.slice(2,5)} ${clean.slice(5)}`;
}
function formatTelURI(number) {
const clean = number.replace(/\D/g, '');
return `tel:+221-${clean.slice(0,2)}-${clean.slice(2,5)}-${clean.slice(5)}`;
}
console.log(formatInternational("338219903"));
console.log(formatNational("778688219"));
console.log(formatTelURI("778688219"));
SMS and API Payload Format: Most SMS APIs expect numbers in E.164 format without spaces: +221778688219. Check your API documentation for exact requirements.
Adapt these functions to meet your specific display requirements.
Best Practices
Follow these best practices when working with Senegalese phone numbers:
- Number Storage: Store numbers in E.164 format (+221NXXXXXXXX). Include metadata for number type (landline, mobile, special service) and portability status to simplify data management and system integration.
Recommended Database Schema:
CREATE TABLE phone_numbers (
id BIGINT PRIMARY KEY,
number_e164 VARCHAR(15) NOT NULL,
number_national VARCHAR(12),
country_code VARCHAR(3) DEFAULT 'SN',
number_type VARCHAR(20),
operator VARCHAR(50),
is_ported BOOLEAN DEFAULT FALSE,
last_mnp_check TIMESTAMP,
consent_marketing BOOLEAN DEFAULT FALSE,
consent_date TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_number_e164 (number_e164),
INDEX idx_operator (operator)
);
- Validation Rules: Implement strict format checking using regex. Validate operator prefixes and geographic codes to prevent invalid data from entering your system.
- Error Handling: Log and handle number format errors gracefully. Include the invalid number, timestamp, and detected number type in error logs.
function handleNumberError(number, error) {
console.error(`Invalid number format: ${number}`, {
error: error,
timestamp: new Date(),
numberType: determineNumberType(number),
cleanedNumber: cleanNumber(number)
});
}
- Data Privacy and Regulatory Compliance: Phone numbers are personal data under Senegal's Act No. 2008-12 of 25 January 2008 Concerning Personal Data Protection. Key requirements:
- Consent: Obtain explicit user consent before processing phone numbers, especially for marketing purposes.
- Data Security: Implement technical measures to prevent unauthorized access, alteration, or disclosure. Data controllers must ensure confidentiality and integrity.
- User Rights: Users have rights to access, rectify, and delete their data. They can object to processing for marketing purposes.
- Notification to CDP: Processing personal data requires notification or authorization from the Commission de Données Personnelles (CDP), Senegal's data protection authority.
- Data Transfers: International transfers require CDP authorization unless the recipient country provides adequate protection. EU countries and members of the Association Francophone des Autorités de Protection des Données Personnelles are considered adequate.
- Marketing Opt-Out: Users must be able to opt out of marketing communications at no charge. Messages must include clear opt-out instructions.
- Retention Limits: Only retain phone numbers as long as necessary for the stated purpose.
Violations result in fines of XOF 1-100 million and imprisonment of 1-7 years. Consult ARTP regulations and CDP guidelines for current requirements.
Number Allocation and Management (For Advanced Implementations)
If your application involves number allocation or management, understand the different number categories and allocation workflow.
Premium Number Categories
Senegal offers different categories of premium numbers:
- Standard Numbers: Basic service numbers with standard annual fees and typical processing times of 5-10 business days.
- Premium Numbers: Memorable number sequences (e.g., repeating digits like 777 7777, sequential patterns like 123 4567, or easy-to-remember combinations) with enhanced routing capabilities and higher allocation fees.
- Golden Numbers: Ultra-premium, highly sought-after numbers with competitive bidding and special routing requirements. These numbers can command prices up to 10 times higher than standard numbers.
For current pricing information and eligibility requirements, consult the ARTP Official Fee Schedules.
Allocation Workflow
The number allocation process typically involves three phases:
- Application Phase (2-3 weeks): Submit an initial request with required documentation (business registration, technical specifications, compliance history), undergo technical capability and financial viability assessments.
- Technical Evaluation (2-4 weeks): Network compatibility checks, routing capability verification, resource availability assessment, and integration planning with existing ARTP infrastructure.
- Implementation (1-2 weeks): Network configuration, routing table updates, testing and verification, and service activation.
Total Duration: 5-9 weeks from application to activation for standard numbers. Premium and golden numbers may require additional time for bidding processes.
For detailed information about number allocation procedures, required documentation, and current pricing, consult the ARTP Official Guidelines.
Future-Proofing Your Implementation
The telecommunications landscape evolves constantly. Consider these future-proofing initiatives to ensure your application remains compatible and efficient:
- Digital Transformation: Integrate with emerging technologies, support IoT numbering requirements (prefix
79Xreserved for IoT/M2M), and enhance routing capabilities for digital service enablement. - Capacity Planning: Conduct regular demand forecasting, implement resource optimization strategies, accommodate technology evolution, and align with international standards. ARTP regularly updates number allocations—subscribe to ARTP announcements for updates.
- 5G and Network Evolution: As Senegal's operators roll out 5G services, ensure your systems support VoLTE, RCS (Rich Communication Services), and eSIM provisioning. The unified Yas brand signals ongoing infrastructure modernization across the region.
- eSIM Impact: eSIM adoption will affect number provisioning and management workflows. Plan for remote SIM provisioning (RSP) capabilities and digital-first number allocation processes.
Frequently Asked Questions About Senegal Phone Numbers
What is Senegal's country code?
Senegal's country code is +221. This code is required when dialing Senegalese phone numbers from outside the country. The complete international format is +221 followed by the 9-digit national number (e.g., +221 77 123 4567).
How many digits are in a Senegal phone number?
All Senegalese phone numbers contain exactly 9 digits (excluding the +221 country code). The first digit identifies the service type: 3 for landlines and 7 for mobile numbers. This creates a consistent NXX XXX XXX format across all phone numbers in Senegal.
Which mobile operators serve Senegal?
Senegal has three main mobile operators: Orange Senegal (56-59% market share, prefixes 70X, 76X, 77X, 78X), Yas Senegal formerly Free Senegal (20-25% market share, prefixes 76X, 77X, 78X), and Expresso Senegal (15-17% market share, prefix 75X). Yas Senegal was rebranded in November 2024 and is 80% owned by Axian Group. MVNOs operate on the 75X range.
Does Senegal support mobile number portability?
Yes. Senegal implemented mobile number portability (MNP) in September 2015, allowing users to switch operators while keeping their existing phone numbers. ARTP oversees the MNP system to ensure fair implementation across all operators. Porting typically takes 1-3 business days.
How do you validate a Senegal phone number?
Validate Senegalese numbers using regex patterns: landlines match /^3[03269]\d{7}$/, mobile numbers match /^7[0-9]\d{7}$/, and toll-free numbers match /^800\d{6}$/. Store numbers in E.164 format (+221NXXXXXXXX) for international compatibility. See code examples in JavaScript, Python, and PHP above.
What is ARTP in Senegal?
ARTP (Autorité de Régulation des Télécommunications et des Postes) is Senegal's telecommunications and postal regulatory authority. ARTP manages numbering plans, enforces compliance, oversees number portability, and maintains technical standards for the sector.
What are SMS character limits and encoding for Senegal?
SMS in Senegal follows standard GSM specifications: 160 characters for GSM-7 encoding (standard Latin alphabet) and 70 characters for UCS-2 encoding (Unicode, needed for special characters and emojis). For optimal delivery, use GSM-7 encoding when possible.
What are typical SMS costs for Senegal?
International A2P SMS: $0.03-0.08 per message depending on provider and volume. Domestic SMS: Lower rates available through local operator agreements. Prices vary by operator and sender ID registration status.
How do I prevent rate limiting issues?
Implement exponential backoff for API calls, respect operator-specific throughput limits (typically 10-100 messages/second), use message queuing for high-volume sends, and monitor delivery reports to detect blocking. Register sender IDs with operators to improve delivery rates and throughput limits.
Conclusion
You now have a solid foundation for working with Senegalese phone numbers. Follow the guidelines and best practices in this guide to integrate seamlessly with Senegal's telecommunications infrastructure. Stay informed about the latest ARTP regulations and adapt your systems accordingly to build robust applications that serve the Senegalese market effectively.
Next Steps:
- Review ARTP's official documentation for latest regulatory updates
- Integrate with an MNP lookup provider for accurate routing
- Implement data privacy controls per Senegal's data protection law
- Test validation logic with real-world number samples
- Explore Senegal SMS pricing and guidelines for messaging applications
Related Resources:
- E.164 Phone Format Guide
- Algeria Phone Number Format Guide (+213)
- Morocco Phone Number Format Guide (+212)
- ARTP Official Website
- ITU Senegal Numbering Plan
- Senegal Data Protection Law
Validate & Send SMS to Senegal With SMSRoute
Regex catches syntax mistakes, but it cannot tell you whether a mobile number is active, ported to another carrier, or reachable over SMS. Before launching OTP or transactional campaigns into Senegal, pair E.164 normalization with live carrier intelligence and direct Tier-1 termination on SMSRoute.
curl -X POST https://api.sendsmsnokyc.com/v3/messages \
-H "x-api-key: $SMSROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["+14155551234"],
"channel": ["sms"],
"body": "Your verification code is 482910"
}'
- Live HLR & Carrier Lookup: Verify active status, roaming, and current serving network before you pay to send via SMSRoute HLR Lookup.
- Handset-Verified Route Testing: Audit real SIM delivery, DLR latency, and Sender ID preservation with Live Carrier Testing.
- No-KYC Instant Onboarding: Fund with crypto (BTC/USDT) or card and check exact per-country rates on our live pricing page.
Deliver Global SMS With Direct Carrier Routes
Validate E.164 numbers with live HLR lookup and deliver high-priority OTPs and alerts across 190+ countries on SMSRoute.
Try SMSRoute HLR Lookup →