Sri Lanka SMS Best Practices, Compliance, and Features
Sri Lanka SMS Market Overview
Locale name: | Sri Lanka |
---|---|
ISO code: | LK |
Region | Asia |
Mobile country code (MCC) | 413 |
Dialing Code | +94 |
Market Conditions: Sri Lanka has a robust mobile telecommunications market with widespread SMS usage. The country has several major mobile operators including Dialog, Mobitel, and Hutch. While OTT messaging apps like WhatsApp and Viber are popular, SMS remains a critical communication channel, especially for business communications and authentication purposes. Android devices dominate the mobile market, making up approximately 90% of smartphone users in the country.
Key SMS Features and Capabilities in Sri Lanka
Sri Lanka supports most standard SMS features including concatenated messaging and alphanumeric sender IDs, though two-way SMS functionality is limited.
Two-way SMS Support
Two-way SMS is not supported in Sri Lanka through major SMS providers. This means businesses cannot receive replies to their messages through standard A2P SMS channels.
Concatenated Messages (Segmented SMS)
Support: Yes, concatenated messaging is supported in Sri Lanka, though support may vary by sender ID type.
Message length rules: Messages are limited to 160 characters before splitting occurs.
Encoding considerations: Both GSM-7 and UCS-2 encoding are supported. Messages using GSM-7 encoding can contain up to 160 characters, while UCS-2 encoded messages (used for non-Latin scripts) are limited to 70 characters per segment.
MMS Support
MMS messages are not directly supported in Sri Lanka. Instead, MMS content is automatically converted to SMS with an embedded URL link where recipients can view the multimedia content. This ensures compatibility across all devices while still enabling rich media sharing.
Recipient Phone Number Compatibility
Number Portability
Number portability is not available in Sri Lanka. This means mobile numbers remain tied to their original carrier, which simplifies message routing and delivery.
Sending SMS to Landlines
Sending SMS to landline numbers is not possible in Sri Lanka. Attempts to send messages to landline numbers will result in a failed delivery and an error response (400 error code 21614) from the SMS API. These messages will not appear in logs and accounts will not be charged for failed attempts.
Compliance and Regulatory Guidelines for SMS in Sri Lanka
SMS communications in Sri Lanka are regulated by the Telecommunications Regulatory Commission of Sri Lanka (TRCSL). All businesses must comply with local telecommunications laws and data protection regulations when sending commercial SMS messages.
Consent and Opt-In
Explicit Consent Requirements:
- Written or electronic consent must be obtained before sending any marketing messages
- Consent records should be maintained and easily accessible
- Purpose of communication must be clearly stated during opt-in
- Double opt-in is recommended for marketing campaigns
Best Practices for Documentation:
- Store timestamp and source of consent
- Maintain detailed records of opt-in methods
- Keep consent logs for a minimum of 2 years
- Document the specific services or types of messages the user agreed to receive
HELP/STOP and Other Commands
- All marketing messages must include clear opt-out instructions
- STOP command must be supported in English
- Local language keywords (Sinhala and Tamil) should also be supported
- Common keywords to support:
- STOP/UNSUBSCRIBE
- HELP
- INFO
- නවත්වන්න (Sinhala for STOP)
- நிறுத்து (Tamil for STOP)
Do Not Call / Do Not Disturb Registries
While Sri Lanka does not maintain an official DND registry, businesses should:
- Maintain their own suppression lists
- Honor opt-out requests within 24 hours
- Implement automated STOP command processing
- Regularly clean contact lists to remove unsubscribed numbers
Time Zone Sensitivity
Sri Lanka follows India Standard Time (IST+0:30, UTC+5:30) Recommended Sending Hours:
- Business messages: 8:00 AM to 9:00 PM local time
- Marketing messages: 9:00 AM to 7:00 PM local time
- Transactional/OTP messages: 24/7 allowed
Phone Numbers Options and SMS Sender Types for in Sri Lanka
Alphanumeric Sender ID
Operator network capability: Fully supported
Registration requirements: Pre-registration required for both international and domestic use
Sender ID preservation: Yes, preserved when properly registered
Provisioning time: Approximately 3 weeks
Special considerations: Mobitel network only allows OTP, OTT, and transactional traffic
Long Codes
Domestic vs. International:
- Domestic long codes not supported
- International long codes supported but with limitations
Sender ID preservation: No, international long codes may be overwritten Provisioning time: N/A Use cases: Not recommended for primary SMS sending
Short Codes
Support: Not currently supported in Sri Lanka Provisioning time: N/A Use cases: N/A
Restricted SMS Content, Industries, and Use Cases
Restricted Industries and Content:
- Gambling and betting
- Adult content
- Cryptocurrency promotions
- Political messaging without proper authorization
- Alcohol and tobacco advertising
Regulated Industries:
- Financial services (require CBSL approval)
- Healthcare (must comply with PHI guidelines)
- Insurance (require IRCSL compliance)
Content Filtering
Known Carrier Rules:
- URLs must be from approved domains
- No excessive punctuation or special characters
- Message content must match registered use case
- No misleading sender IDs
Tips to Avoid Blocking:
- Use registered sender IDs consistently
- Avoid URL shorteners
- Keep content professional and clear
- Follow character encoding guidelines
Best Practices for Sending SMS in Sri Lanka
Messaging Strategy
- Keep messages under 160 characters when possible
- Include clear call-to-action
- Use approved sender IDs consistently
- Personalize messages with recipient's name when appropriate
Sending Frequency and Timing
- Limit marketing messages to 4-5 per month per recipient
- Respect religious and cultural holidays
- Avoid sending during major festivals
- Space out bulk campaigns to prevent network congestion
Localization
- Support for English, Sinhala, and Tamil
- Use Unicode for local language characters
- Consider bilingual messages for important communications
- Test rendering on various devices
Opt-Out Management
- Process opt-outs within 24 hours
- Maintain centralized opt-out database
- Include clear opt-out instructions
- Confirm opt-out with acknowledgment message
Testing and Monitoring
- Test across all major carriers (Dialog, Mobitel, Hutch)
- Monitor delivery rates by carrier
- Track opt-out rates and patterns
- Regular testing of opt-out functionality
SMS API integrations for Sri Lanka
Twilio
Twilio provides a robust SMS API with comprehensive support for Sri Lanka. Integration requires an account SID and auth token for authentication.
import { Twilio } from 'twilio';
// Initialize client with your credentials
const client = new Twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
// Function to send SMS to Sri Lanka
async function sendSMSToSriLanka(
to: string,
message: string,
senderId: string
): Promise<void> {
try {
// Ensure proper formatting for Sri Lankan numbers
const formattedNumber = to.startsWith('+94') ? to : `+94${to.substring(1)}`;
const response = await client.messages.create({
body: message,
from: senderId, // Must be pre-registered alphanumeric sender ID
to: formattedNumber,
// Optional parameters for delivery tracking
statusCallback: 'https://your-webhook-url.com/status'
});
console.log(`Message sent successfully! SID: ${response.sid}`);
} catch (error) {
console.error('Error sending message:', error);
throw error;
}
}
Sinch
Sinch offers reliable SMS delivery to Sri Lanka with support for both transactional and marketing messages.
import axios from 'axios';
class SinchSMSClient {
private readonly apiToken: string;
private readonly serviceId: string;
private readonly baseUrl = 'https://sms.api.sinch.com/xms/v1';
constructor(apiToken: string, serviceId: string) {
this.apiToken = apiToken;
this.serviceId = serviceId;
}
async sendSMS(to: string, message: string, senderId: string): Promise<void> {
try {
const response = await axios.post(
`${this.baseUrl}/${this.serviceId}/batches`,
{
from: senderId,
to: [to],
body: message,
delivery_report: 'summary'
},
{
headers: {
'Authorization': `Bearer ${this.apiToken}`,
'Content-Type': 'application/json'
}
}
);
console.log('Message sent successfully:', response.data);
} catch (error) {
console.error('Failed to send message:', error);
throw error;
}
}
}
MessageBird
MessageBird provides a straightforward API for sending SMS to Sri Lanka with support for delivery reporting.
import messagebird from 'messagebird';
class MessageBirdClient {
private client: any;
constructor(apiKey: string) {
this.client = messagebird(apiKey);
}
sendSMS(
to: string,
message: string,
senderId: string
): Promise<any> {
return new Promise((resolve, reject) => {
this.client.messages.create({
originator: senderId,
recipients: [to],
body: message,
datacoding: 'auto' // Automatically handles Unicode
}, (err: any, response: any) => {
if (err) {
reject(err);
} else {
resolve(response);
}
});
});
}
}
Plivo
Plivo offers reliable SMS delivery with support for Unicode messages and delivery tracking.
import plivo from 'plivo';
class PlivoSMSClient {
private client: any;
constructor(authId: string, authToken: string) {
this.client = new plivo.Client(authId, authToken);
}
async sendSMS(
to: string,
message: string,
senderId: string
): Promise<void> {
try {
const response = await this.client.messages.create({
src: senderId,
dst: to,
text: message,
url_strip_query_params: false
});
console.log('Message sent:', response);
} catch (error) {
console.error('Error sending message:', error);
throw error;
}
}
}
API Rate Limits and Throughput
Rate Limits:
- Twilio: 100 messages per second
- Sinch: 30 messages per second
- MessageBird: 60 messages per second
- Plivo: 50 messages per second
Throughput Management Strategies:
- Implement exponential backoff for retries
- Use queue systems (Redis/RabbitMQ) for high volume
- Batch messages when possible
- Monitor delivery rates and adjust sending speed
Error Handling and Reporting
Best Practices:
- Implement comprehensive error logging
- Monitor delivery receipts
- Set up automated alerts for high failure rates
- Store message status updates
- Implement retry logic for failed messages
Recap and Additional Resources
Key Takeaways:
- Pre-register alphanumeric sender IDs (3-week process)
- Implement proper opt-out handling
- Follow time zone restrictions for messaging
- Support local languages (Sinhala/Tamil)
- Monitor delivery rates and handle errors properly
Next Steps:
- Review TRCSL regulations at www.trc.gov.lk
- Consult with local legal counsel for compliance
- Set up test accounts with preferred SMS providers
- Implement proper error handling and monitoring
- Establish opt-out management system
Additional Resources:
- Telecommunications Regulatory Commission: www.trc.gov.lk
- Data Protection Guidelines: www.cert.gov.lk
- SMS Marketing Best Practices: www.caalanka.lk