phone number standards
phone number standards
Kosovo Phone Numbers: +383 Country Code, Format, Validation & Area Codes
Complete guide to Kosovo phone numbers: +383 country code, E.164 format, area codes (038, 039, 028), mobile operators (Vala, IPKO), validation regex, and number portability for developers.
Kosovo Phone Numbers: Format, Area Code & Validation Guide
Introduction
This comprehensive guide covers Kosovo phone numbers and the +383 country code, including E.164 format, area codes, validation patterns, mobile operator prefixes (Vala, IPKO), and number portability. Learn how to validate Kosovo phone numbers, format them correctly using E.164 standards, and implement robust phone number handling for Kosovo telecommunications applications.
Kosovo +383 Country Code: History and Regulation
Kosovo's country code +383 was assigned by the International Telecommunication Union (ITU) in December 2016, with service beginning in early 2017. Before receiving +383, Kosovo used Serbia's code 381 for fixed-line services after Yugoslavia's breakup, while mobile operators used Monaco code 377 (Vala) or Slovenian code 386 (IPKO). The +383 country code became mandatory on February 14, 2019.
Citation1. From source: https://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo and https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000FD0001PDFE.pdf and https://balkaninsight.com/2016/12/15/383-kosovo-s-dial-code-12-15-2016/, Title: Kosovo Country Code +383 Implementation Timeline and History, Text: The International Telecommunication Union (ITU) assigned country code 383 to Kosovo on December 15, 2016 by an agreement between the authorities of Kosovo and Serbia in an EU-led dialogue. The new country code, 383, began service in early 2017. Following the breakup of Yugoslavia in 1992, Kosovo used code 381 (Serbia) for fixed lines, whereas for mobile phone networks, operators used either Monaco code 377 or Slovenian code 386. From February 14, 2019, the Kosovo Code +383 is used as the primary code. Kosovo is represented in ITU as Kosovo* which the designation is without prejudice to positions on status, and is in line with UNSCR 1244 and the ICJ Opinion. Telephone numbers in Kosovo are administered by the Regulatory Authority of Electronic and Postal Communications (ARKEP).
ARKEP (Regulatory Authority of Electronic and Postal Communications) regulates Kosovo's telecommunications, enforcing EU-aligned standards for competition and data protection.
Kosovo Phone Number Format and Structure
Kosovo phone numbers follow the ITU-T E.164 international standard, ensuring global compatibility for telecommunications systems.
Dialing Examples:
- From within Kosovo: Dial
0+ 8-digit number (e.g.,044 123456) - From outside Kosovo: Dial
+383+ 8-digit number (e.g.,+383 44 123456) - International format (recommended for storage):
+38344123456
Citation2. From source: https://www.itu.int/rec/t-rec-e.164/en and https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000FD0001PDFE.pdf, Title: Kosovo E.164 Phone Format ITU-T Compliance, Text: Kosovo phone numbers follow the ITU-T E.164 recommendation, with the format being +383 followed by an 8-digit National Significant Number (NSN). The minimum and maximum number length excluding the country code is 8 digits. For local calls within Kosovo, use a 0 before the NSN. Kosovo's phone numbering system adheres to the ITU-T E.164 recommendation, a globally recognized standard for telephone numbering that ensures international compatibility and interoperability.
General Structure
The core components of a Kosovo phone number are:
- Country Code: +383 (identifies Kosovo internationally)
- National Significant Number (NSN) Length: 8 digits (the core number within Kosovo)
- National Prefix: 0 (used for domestic calls within Kosovo)
Store numbers in E.164 international format (+383) for consistency and compatibility.
Number Categories
Kosovo's numbering plan categorizes numbers based on their purpose:
1. Kosovo Landline Numbers and Area Codes
- Format: Kosovo landline numbers use geographic area codes (028, 029, 038, 039, 0280, 0290, 0390) followed by subscriber numbers
- Kosovo Area Codes by Region:
038: Prishtina and surrounding municipalities (Gračanica, Fushe Kosove, Lipjan, Obiliq)039: Peja region (Peja, Istog, Klina)0390: Gjakova region (Gjakova, Deçan, Junik)028: Mitrovica region (Mitrovica, Vushtrri, Skenderaj, Zvečan, Leposavić, Zubin Potok)0280: Gjilan region (Gjilan, Kamenica, Vitia, Novo Brdo)029: Prizren region (Prizren, Suva Reka, Rahovec, Dragash)0290: Ferizaj region (Ferizaj, Kaçanik, Štrpce)
- Example:
038 123456(a landline number in Prishtina) - Validation Regex:
/^(\+383|0)?(028|029|038|039|0280|0290|0390)\d{5,6}$/
Citation3. From source: https://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo and ITU documentation, Title: Kosovo Landline Area Code Structure and Geographic Coverage, Text: Kosovo landline numbers use the following area codes: Ferizaj (0290), Gjakova (0390), Gjilan (0280), Mitrovica (028), Peja (039), Prishtina (038), and Prizren (029). These codes cover specific municipalities and districts throughout Kosovo. The area code is followed by a 5-6 digit subscriber number to complete the 8-digit NSN format.
2. Kosovo Mobile Phone Numbers
- Format:
4X XXXXXX(where4Xis the mobile operator prefix andXXXXXXis the subscriber number) - Mobile Operator Prefixes: 43, 44, 45, 46, 47, 48, 49
- Example:
44 777888(Vala mobile network) - Validation Regex:
/^(\+383|0)?(4[3-9])\d{6}$/
Kosovo Mobile Operators:
| Operator | Prefixes | Ownership | 5G Status |
|---|---|---|---|
| Vala (Kosovo Telecom) | 44, 45, 46 | Government-owned (largest operator) | Available from mid-2024 |
| IPKO (Telekom Slovenije) | 43, 48, 49 | Telekom Slovenije (Slovenia) | Check with provider |
Citation4. From source: https://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo and https://prepaid-data-sim-card.fandom.com/wiki/Kosovo, Title: Kosovo Mobile Network Operators and Prefixes 2024, Text: Kosovo has two main mobile network operators: Vala (Kosovo Telecom) and IPKO (Telekom Slovenije). Mobile phone network prefixes include 43, 44, 45, 46, 47, 48, and 49. Vala uses prefixes 044, 045, 046 and is fully owned by the Kosovar government and is the largest mobile operator. IPKO uses prefixes 043, 048, 049 and is run by Telekom Slovenije from Slovenia. Vala will start delivering 5G services from mid-2024. The country code 383 is used, though legacy codes 377 (Monaco) and 386 (Slovenia) may occasionally still be active for some operators.
3. Special Service Numbers
- Toll-Free:
800 XXXXX(free to call from Kosovo) - Premium:
900 XXXXX(premium charges apply – check with your operator for rates) - Emergency:
112(unified emergency number for all services)192– Police (direct line)193– Fire brigade (direct line)194– Ambulance (direct line)- Use
112for fastest response; it routes to appropriate services
- Validation Regex (Toll-Free):
/^(\+383|0)?800\d{5}$/ - Validation Regex (Premium):
/^(\+383|0)?900\d{5}$/
Document your expected number format in your application's UI to guide users.
How to Validate Kosovo Phone Numbers: Implementation Guide
This section provides practical code examples for implementing Kosovo phone number validation, formatting, and handling in your applications.
Kosovo Phone Number Validation with Regex
Validate Kosovo phone numbers using these regex patterns for phone number validation. Handle edge cases like leading zeros, spaces, and optional country codes.
Python Example:
import re
def validate_kosovo_phone(number):
"""Validate Kosovo phone number for all types."""
patterns = {
'mobile': r'^(\+383|0)?(4[3-9])\d{6}$',
'landline': r'^(\+383|0)?(028|029|038|039|0280|0290|0390)\d{5,6}$',
'toll_free': r'^(\+383|0)?800\d{5}$',
'premium': r'^(\+383|0)?900\d{5}$'
}
# Remove spaces and hyphens
cleaned = re.sub(r'[\s-]', '', number)
for number_type, pattern in patterns.items():
if re.match(pattern, cleaned):
return {'valid': True, 'type': number_type, 'cleaned': cleaned}
return {'valid': False, 'type': None, 'cleaned': cleaned}
# Test cases
print(validate_kosovo_phone('+383 44 123456')) # Valid mobile
print(validate_kosovo_phone('038 123456')) # Valid landline
print(validate_kosovo_phone('800 12345')) # Valid toll-freeJavaScript Example:
function validateKosovoPhone(number) {
const patterns = {
mobile: /^(\+383|0)?(4[3-9])\d{6}$/,
landline: /^(\+383|0)?(028|029|038|039|0280|0290|0390)\d{5,6}$/,
tollFree: /^(\+383|0)?800\d{5}$/,
premium: /^(\+383|0)?900\d{5}$/
};
// Remove spaces and hyphens
const cleaned = number.replace(/[\s-]/g, '');
for (const [type, pattern] of Object.entries(patterns)) {
if (pattern.test(cleaned)) {
return { valid: true, type, cleaned };
}
}
return { valid: false, type: null, cleaned };
}Formatting
Store phone numbers in raw E.164 format (e.g., +38344123456). Apply formatting only for display.
JavaScript Formatting Example:
function formatKosovoPhone(number) {
try {
// Remove all non-digit characters
const cleaned = number.replace(/\D/g, '');
// Check for valid length
if (cleaned.length !== 8 && cleaned.length !== 11) {
throw new Error('Invalid number length');
}
// Format based on number type
const isInternational = cleaned.length === 11;
return isInternational
? `+${cleaned.slice(0, 3)} ${cleaned.slice(3, 5)} ${cleaned.slice(5)}`
: `0${cleaned.slice(0, 2)} ${cleaned.slice(2)}`; // Add leading 0 for national format
} catch (error) {
console.error('Phone formatting error:', error);
return number; // Return original on error
}
}Test Cases:
// Standard formats
formatKosovoPhone('+38344123456') // Returns: +383 44 123456
formatKosovoPhone('044123456') // Returns: 044 123456
// Edge cases
formatKosovoPhone('+383-44-123456') // Returns: +383 44 123456
formatKosovoPhone('(044) 123456') // Returns: 044 123456
formatKosovoPhone('invalid') // Returns: invalidNumber Portability
Kosovo supports number portability for mobile and landline numbers. Users can switch carriers while keeping their numbers. Integrate with a number portability database for accurate call routing.
Implementation Pattern:
import requests
def check_portability(phone_number):
"""Check if number has been ported to different carrier."""
# Example API endpoint (replace with actual provider)
api_url = "https://portability-api.example.com/lookup"
response = requests.post(api_url, json={
'phone_number': phone_number,
'country_code': '383'
})
if response.status_code == 200:
data = response.json()
return {
'original_carrier': data.get('original_carrier'),
'current_carrier': data.get('current_carrier'),
'ported': data.get('ported', False),
'port_date': data.get('port_date')
}
return None
# Usage
result = check_portability('+38344123456')
if result and result['ported']:
print(f"Number ported from {result['original_carrier']} to {result['current_carrier']}")Citation5. From source: https://www.ipko.com/en/announcement-of-the-winner-of-the-activity-for-the-provision-of-the-number-portability-service-in-the-republic-of-kosovo/ and https://www.telecompaper.com/news/kosovo-authorises-number-portability-service-provider--1505440, Title: Kosovo Number Portability Implementation Status, Text: Kosovo has implemented number portability, allowing users to switch carriers while retaining their existing numbers. ARKEP (Regulatory Authority of Electronic and Postal Communications) announced the winning company selected to enable the implementation of Number Portability for mobile and landline service providers. The implementation of number portability has been a constant request of the European Union (EU) through the progress report for the implementation of the SAA. The system operates under regulatory requirements aligned with European Union principles, emphasizing open competition and data protection.
Contact ARKEP or your telecommunications provider for access to the number portability database.
Golden Numbers
Golden numbers feature memorable patterns and command premium prices. Detect these patterns for special handling or pricing.
Common Patterns:
| Pattern Type | Example | Regex Pattern |
|---|---|---|
| Triple repeat | 44 777888 | `/^(+383 |
| Quadruple repeat | 44 777777 | `/^(+383 |
| Sequential | 44 123456 | Custom logic (check consecutive digits) |
| Palindrome | 44 123321 | Custom logic (reverse comparison) |
| All same digit | 44 444444 | `/^(+383 |
Detection Example:
def is_golden_number(phone_number):
"""Detect golden number patterns."""
# Extract subscriber portion (last 6 digits)
digits = re.sub(r'\D', '', phone_number)[-6:]
# Check for repeating digits
if len(set(digits)) <= 2:
return {'golden': True, 'pattern': 'repeating'}
# Check for sequential
if digits in '0123456789' or digits in '9876543210':
return {'golden': True, 'pattern': 'sequential'}
# Check for palindrome
if digits == digits[::-1]:
return {'golden': True, 'pattern': 'palindrome'}
return {'golden': False, 'pattern': None}Number Blocking
Implement number blocking for fraud prevention, regulatory compliance, and service management.
Database Schema Example:
CREATE TABLE blocked_numbers (
id SERIAL PRIMARY KEY,
phone_number VARCHAR(20) NOT NULL,
block_type VARCHAR(20) NOT NULL, -- 'temporary' or 'permanent'
reason VARCHAR(100) NOT NULL,
blocked_at TIMESTAMP DEFAULT NOW(),
blocked_until TIMESTAMP NULL,
blocked_by VARCHAR(50),
notes TEXT
);
CREATE INDEX idx_phone_lookup ON blocked_numbers(phone_number);Implementation Example:
def check_blocked(phone_number):
"""Check if number is blocked."""
query = """
SELECT block_type, reason, blocked_until
FROM blocked_numbers
WHERE phone_number = %s
AND (blocked_until IS NULL OR blocked_until > NOW())
"""
result = execute_query(query, [phone_number])
if result:
return {
'blocked': True,
'type': result['block_type'],
'reason': result['reason'],
'until': result['blocked_until']
}
return {'blocked': False}
def block_number(phone_number, reason, block_type='permanent', duration_days=None):
"""Add number to blocklist."""
blocked_until = None
if block_type == 'temporary' and duration_days:
blocked_until = datetime.now() + timedelta(days=duration_days)
query = """
INSERT INTO blocked_numbers
(phone_number, block_type, reason, blocked_until)
VALUES (%s, %s, %s, %s)
"""
execute_query(query, [phone_number, block_type, reason, blocked_until])Kosovo Phone Number Best Practices and Troubleshooting
Detecting Invalid Kosovo Phone Number Formats
def diagnose_format_issues(phone_number):
"""Identify specific formatting problems."""
issues = []
if not phone_number:
return ['Empty number']
# Check length
digits_only = re.sub(r'\D', '', phone_number)
if len(digits_only) < 8:
issues.append(f'Too short: {len(digits_only)} digits (need 8)')
elif len(digits_only) > 11:
issues.append(f'Too long: {len(digits_only)} digits (max 11 with country code)')
# Check country code
if phone_number.startswith('+') and not phone_number.startswith('+383'):
issues.append(f'Invalid country code (use +383)')
# Check prefix
if digits_only.startswith('383'):
prefix = digits_only[3:5] if len(digits_only) > 5 else None
elif digits_only.startswith('0'):
prefix = digits_only[1:3] if len(digits_only) > 3 else None
else:
prefix = digits_only[:2] if len(digits_only) > 2 else None
valid_prefixes = ['43', '44', '45', '46', '47', '48', '49', '28', '29', '38', '39']
if prefix and prefix not in valid_prefixes:
issues.append(f'Invalid prefix: {prefix}')
return issues if issues else ['Valid format']Carrier Detection
def detect_carrier(phone_number):
"""Identify carrier from number prefix."""
digits = re.sub(r'\D', '', phone_number)
# Extract prefix
if digits.startswith('383'):
prefix = digits[3:5]
elif digits.startswith('0'):
prefix = digits[1:3]
else:
prefix = digits[:2]
carriers = {
'44': 'Vala', '45': 'Vala', '46': 'Vala',
'43': 'IPKO', '48': 'IPKO', '49': 'IPKO'
}
carrier = carriers.get(prefix, 'Unknown')
# Check if ported (integrate with portability API)
portability = check_portability(phone_number)
if portability and portability['ported']:
carrier = portability['current_carrier']
return {'carrier': carrier, 'prefix': prefix, 'ported': portability['ported'] if portability else False}Normalization
def normalize_phone_number(phone_number):
"""Convert any Kosovo number format to E.164."""
# Remove all non-digit characters except leading +
cleaned = re.sub(r'[^\d+]', '', phone_number)
# Remove leading zeros and add country code
if cleaned.startswith('0'):
cleaned = '+383' + cleaned[1:]
elif not cleaned.startswith('+'):
cleaned = '+383' + cleaned
elif cleaned.startswith('+383383'):
# Fix double country code
cleaned = '+383' + cleaned[7:]
return cleaned
# Examples
normalize_phone_number('044 123 456') # Returns: +38344123456
normalize_phone_number('+383-44-123456') # Returns: +38344123456
normalize_phone_number('44123456') # Returns: +38344123456Advanced Technical Considerations
Performance Optimization
Caching Strategy:
import redis
from datetime import timedelta
redis_client = redis.Redis(host='localhost', port=6379, db=0)
def get_carrier_cached(phone_number):
"""Get carrier info with Redis caching."""
cache_key = f'carrier:{phone_number}'
# Check cache first
cached = redis_client.get(cache_key)
if cached:
return json.loads(cached)
# Query portability database
carrier_info = detect_carrier(phone_number)
# Cache for 24 hours (adjust based on portability change frequency)
redis_client.setex(cache_key, timedelta(hours=24), json.dumps(carrier_info))
return carrier_infoSecurity Measures
Rate Limiting:
from flask_limiter import Limiter
from flask import Flask
app = Flask(__name__)
limiter = Limiter(app, key_func=lambda: request.remote_addr)
@app.route('/api/validate', methods=['POST'])
@limiter.limit("100 per minute")
def validate_number():
"""Validate phone number with rate limiting."""
phone_number = request.json.get('phone_number')
return validate_kosovo_phone(phone_number)Data Encryption:
from cryptography.fernet import Fernet
def encrypt_phone_number(phone_number, key):
"""Encrypt phone number for storage."""
f = Fernet(key)
return f.encrypt(phone_number.encode()).decode()
def decrypt_phone_number(encrypted_number, key):
"""Decrypt phone number."""
f = Fernet(key)
return f.decrypt(encrypted_number.encode()).decode()Fraud Detection:
def detect_suspicious_activity(phone_number, activity_log):
"""Flag suspicious patterns."""
flags = []
# Check call frequency
recent_calls = [a for a in activity_log if a['timestamp'] > datetime.now() - timedelta(hours=1)]
if len(recent_calls) > 50:
flags.append('High call frequency')
# Check for rapid carrier changes
carrier_changes = [a for a in activity_log if a.get('event') == 'carrier_change']
if len(carrier_changes) > 3:
flags.append('Multiple carrier changes')
return {'suspicious': len(flags) > 0, 'flags': flags}Legacy Code Handling
Support for +377 and +386 during transition:
def normalize_legacy_codes(phone_number):
"""Convert legacy Monaco/Slovenia codes to +383."""
# Monaco code (Vala) - prefix 377
if phone_number.startswith('+377') or phone_number.startswith('00377'):
# Extract subscriber number and convert to +383 44/45/46
subscriber = re.sub(r'\D', '', phone_number)[3:]
return f'+38344{subscriber}' # Default to Vala prefix
# Slovenia code (IPKO) - prefix 386
if phone_number.startswith('+386') or phone_number.startswith('00386'):
# Extract subscriber number and convert to +383 43/48/49
subscriber = re.sub(r'\D', '', phone_number)[3:]
return f'+38343{subscriber}' # Default to IPKO prefix
return phone_numberKosovo Phone Number FAQs
What is Kosovo's country code for international calls?
+383. The ITU assigned this code in December 2016, with service starting in early 2017. It became mandatory on February 14, 2019.
What is the phone number format for Kosovo?
+383 followed by an 8-digit number. For local calls within Kosovo, dial 0 before the 8-digit number. Store numbers in E.164 format: +38344123456.
What are the main area codes in Kosovo?
038 (Prishtina), 039 (Peja), 0390 (Gjakova), 028 (Mitrovica), 0280 (Gjilan), 029 (Prizren), and 0290 (Ferizaj).
What are the mobile operator prefixes in Kosovo?
Vala uses 44, 45, 46. IPKO uses 43, 48, 49. Additional prefixes: 46, 47.
Is number portability available in Kosovo?
Yes. ARKEP oversees number portability for mobile and landline services. Users can switch carriers while keeping their numbers. Integrate with number portability databases for accurate routing.
How do I validate Kosovo phone numbers in my application?
Use these regex patterns:
- Mobile:
/^(\+383|0)?(4[3-9])\d{6}$/ - Landline:
/^(\+383|0)?(028|029|038|039|0280|0290|0390)\d{5,6}$/ - Toll-free:
/^(\+383|0)?800\d{5}$/
See the Validation section for complete code examples in Python and JavaScript.
What is ARKEP and what role does it play?
ARKEP (Regulatory Authority of Electronic and Postal Communications) regulates Kosovo's telecommunications. It administers phone numbers, oversees number portability, and enforces EU-aligned regulations.
What was Kosovo's phone number history before +383?
After Yugoslavia's breakup (1992), Kosovo used Serbia's code 381 for landlines. Mobile operators used Monaco code 377 (Vala) or Slovenian code 386 (IPKO) until transitioning to +383 in 2019.
What is the emergency number in Kosovo?
112 is the unified emergency number. Direct lines: 192 (Police), 193 (Fire), 194 (Ambulance). Use 112 for fastest response.
How should I store Kosovo phone numbers in my database?
Store in E.164 format: +38344123456 (no spaces or special characters). Apply formatting only for display. This ensures data integrity and compatibility with international systems.
Conclusion
You now have the tools to implement Kosovo phone number handling in your applications. Store numbers in E.164 format (+383), validate with the provided regex patterns, integrate with number portability databases, and implement security best practices. Contact ARKEP for regulatory requirements and number portability access.