TheVoĉoTheVoĉo

Provider Authentication

Connect your SMS provider account to enable sending and receiving text messages through your Cloud-PBX system.

Overview

SMS Authentication connects your Cloud-PBX to external SMS providers (Twilio, Vonage, etc.) using API credentials. This allows your system to send and receive SMS messages through the provider's network.

What You'll Need:

  • SMS provider account (Twilio, Vonage, Bandwidth, Plivo, or MessageBird)
  • API credentials (Account SID, Auth Token, API Key)
  • SMS-enabled phone number from provider
  • Webhook URL access for inbound messages

Authentication Flow:

  1. Create account with SMS provider
  2. Obtain API credentials
  3. Purchase/provision SMS phone number
  4. Configure authentication in Cloud-PBX
  5. Set up webhooks for inbound messages
  6. Test sending and receiving

Supported Providers

Twilio Setup

Why Twilio:

  • Most popular SMS provider
  • Excellent global coverage
  • Comprehensive API documentation
  • Reliable delivery
  • Strong developer support

Required Credentials:

  • Account SID
  • Auth Token
  • Phone Number(s)

Pricing (approximate):

  • Long code: $1/month + $0.0075/message (US)
  • Toll-free: $2/month + $0.0125/message
  • Short code: $1000/month + $0.005/message
  • MMS: $0.02/message

Getting Started:

  1. Sign up at twilio.com/try-twilio/sms
  2. Navigate to Console Dashboard
  3. Note your Account SID and Auth Token
  4. Purchase phone number in Phone Numbers section
  5. Configure webhook for incoming messages

Vonage (Nexmo) Setup

Why Vonage:

  • Good international coverage
  • Competitive pricing
  • Virtual numbers in 100+ countries
  • Vonage Verify for 2FA

Required Credentials:

  • API Key
  • API Secret
  • Virtual Number(s)

Pricing (approximate):

  • Virtual number: $0.90-3/month
  • SMS: $0.0052-0.01/message (varies by country)
  • MMS: $0.04-0.12/message

Getting Started:

  1. Sign up at vonage.com
  2. Go to API Settings in dashboard
  3. Note your API Key and API Secret
  4. Purchase virtual number
  5. Configure webhook URL

Bandwidth Setup

Why Bandwidth:

  • US/Canada focused
  • Competitive pricing
  • High-quality voice and messaging
  • Direct carrier network

Required Credentials:

  • Account ID
  • Username
  • Password
  • Application ID
  • Phone Number(s)

Pricing (approximate):

  • Phone number: $1/month
  • SMS: $0.004/message (US/Canada)
  • MMS: $0.012/message

Getting Started:

  1. Sign up at bandwidth.com
  2. Navigate to API Credentials
  3. Create application for messaging
  4. Note credentials and Application ID
  5. Order phone numbers
  6. Set webhook URL

Plivo Setup

Why Plivo:

  • Good for high volume
  • Competitive pricing
  • Global SMS coverage
  • Easy API integration

Required Credentials:

  • Auth ID
  • Auth Token
  • Phone Number(s)

Pricing (approximate):

  • Phone number: $0.80/month
  • SMS: $0.0035-0.01/message
  • Powerpack for high volume

Getting Started:

  1. Sign up at plivo.com
  2. Go to Account Overview
  3. Note your Auth ID and Auth Token
  4. Buy phone numbers
  5. Create Powerpack (optional, for high volume)
  6. Configure message URL

MessageBird Setup

Why MessageBird:

  • Strong European presence
  • Omnichannel platform (SMS, WhatsApp, Voice)
  • Good for international businesses
  • Unified API

Required Credentials:

  • API Key
  • Phone Number(s)

Pricing (approximate):

  • Virtual number: €1/month
  • SMS: €0.0065-0.04/message (varies)
  • Conversations API available

Getting Started:

  1. Sign up at messagebird.com
  2. Go to Developers → API Keys
  3. Create Live API Key
  4. Purchase phone numbers
  5. Configure webhook

Configuration Steps

Create Provider Account

Choose your SMS provider and create an account:

Selection Criteria:

  • Geographic Coverage: Ensure provider supports your regions
  • Pricing: Compare per-message costs
  • Volume: High-volume vs low-volume pricing
  • Features: MMS, short codes, international
  • Reliability: Check provider status/uptime history

Trial Accounts:

  • Most providers offer free trials
  • Test functionality before committing
  • Limited credits for testing
  • Upgrade to production account when ready

Obtain API Credentials

Locate and copy your API credentials from provider dashboard:

  1. Log in to Twilio Console
  2. Dashboard shows Account SID and Auth Token
  3. Click "Show" to reveal Auth Token
  4. Copy both values

Keep Credentials Secret

Never share Auth Token publicly or commit to version control.

  1. Log in to Vonage Dashboard
  2. Navigate to API Settings
  3. Find API Key and API Secret
  4. Copy both values
  5. Optionally create multiple API keys for different environments
  1. Log in to Bandwidth Dashboard
  2. Go to Account → API Information
  3. Note Account ID, Username, Password
  4. Create Messaging Application
  5. Copy Application ID
  1. Log in to Plivo Console
  2. Account Overview shows Auth ID
  3. Click to reveal Auth Token
  4. Copy both values
  5. Create Powerpack if needed
  1. Log in to MessageBird Dashboard
  2. Go to Developers → API Keys
  3. Click Add API Key
  4. Name: "Cloud-PBX Production"
  5. Copy the generated key (shown once!)

Purchase Phone Number

Obtain SMS-enabled phone number from provider:

Number Selection:

  • Local Numbers: Best for regional business (+1-555-123-4567)
  • Toll-Free: Professional image, nationwide reach (800, 888, etc.)
  • Short Code: High-volume campaigns (5-6 digits)

Capabilities Required:

  • SMS Enabled: For text messaging
  • MMS Enabled: If sending images (optional)
  • Voice: If also used for calls (optional)

Purchase Process:

1. Go to "Phone Numbers" section
2. Click "Buy a Number"
3. Select country/region
4. Filter by SMS capability
5. Choose number
6. Complete purchase
7. Note phone number (with country code: +15551234567)

Number Format

Always store numbers in E.164 format: +[country code][number] Example: +15551234567 (not 555-123-4567)

Configure Cloud-PBX Authentication

Enter provider credentials in your Cloud-PBX admin panel:

  1. Navigate to Messaging → SMS → Authentication
  2. Select your SMS Provider from dropdown
  3. Enter API Credentials:
    • Twilio: Account SID, Auth Token
    • Vonage: API Key, API Secret
    • Bandwidth: Account ID, Username, Password, Application ID
    • Plivo: Auth ID, Auth Token
    • MessageBird: API Key
  4. Enter Phone Number(s) in E.164 format (+15551234567)
  5. Click Test Connection to verify
  6. Click Save Configuration

Example Configuration:

Provider: Twilio
Account SID: AC1234567890abcdef1234567890abcdef
Auth Token: ••••••••••••••••••••••••••••••••
Phone Numbers: +15551234567, +15559876543
Status: ✅ Connected

Connection Successful

If test passes, your Cloud-PBX can now send SMS messages!

Set Up Inbound Webhooks

Configure provider to forward incoming SMS to Cloud-PBX:

Your Webhook URL:

https://your-pbx-domain.com/api/messaging/sms/inbound

Provider Configuration:

  1. Go to Phone Numbers → Manage → Active Numbers
  2. Click on your SMS number
  3. Scroll to Messaging section
  4. A Message Comes In: Webhook, HTTP POST
  5. Enter: https://your-pbx-domain.com/api/messaging/sms/inbound
  6. Click Save

Webhook Receives:

  • From: Sender phone number
  • To: Your phone number
  • Body: Message text
  • MessageSid: Unique message ID
  1. Go to Numbers → Your Numbers
  2. Click Edit on your number
  3. Inbound Webhook URL: Enter https://your-pbx-domain.com/api/messaging/sms/inbound
  4. HTTP Method: POST
  5. Click Save

Webhook Receives:

  • msisdn: Sender number
  • to: Your number
  • text: Message content
  • messageId: Unique ID
  1. Go to Applications
  2. Edit your Messaging Application
  3. Callback URL: https://your-pbx-domain.com/api/messaging/sms/inbound
  4. Callback HTTP Method: POST
  5. Save

Webhook Receives:

  • Message details in JSON payload
  • from, to, text, messageId
  1. Go to Phone Numbers
  2. Click on your number
  3. Message URL: https://your-pbx-domain.com/api/messaging/sms/inbound
  4. Method: POST
  5. Save

Webhook Receives:

  • From, To, Text, MessageUUID
  1. Go to Numbers
  2. Click on your number settings
  3. HTTP webhook: https://your-pbx-domain.com/api/messaging/sms/inbound
  4. Save

Webhook Receives:

  • originator, recipient, body, id

Webhook Security

Validate incoming webhooks using provider signature verification to prevent spoofing.

Test End-to-End

Verify both outbound and inbound messaging:

Outbound Test:

  1. Go to Messaging → SMS → Send Test
  2. Enter your mobile number
  3. Type test message: "Test from Cloud-PBX SMS"
  4. Click Send
  5. Verify you receive message on your phone

Inbound Test:

  1. Send SMS from your mobile to your provisioned SMS number
  2. Message should appear in Cloud-PBX inbox
  3. Check webhook logs for delivery confirmation
  4. Verify correct routing (if queues configured)

Troubleshooting:

  • Outbound fails: Check API credentials, phone number format, account balance
  • Inbound fails: Verify webhook URL, check firewall rules, review provider logs
  • Delays: Normal 2-5 seconds, check provider status if longer

All Tests Passed

Your SMS integration is fully functional! Proceed to configure settings and routing.


Security Best Practices

Credential Management:

  • Never Hardcode: Don't commit credentials to code repositories
  • Use Environment Variables: Store credentials securely
  • Rotate Regularly: Change credentials periodically
  • Limit Access: Only authorized personnel can view
  • Use Test/Production Keys: Separate credentials for environments

Webhook Security:

  • Signature Verification: Validate requests from provider
  • HTTPS Only: Never use HTTP for webhooks
  • IP Whitelisting: Restrict to provider IP ranges (if available)
  • Rate Limiting: Prevent webhook abuse
  • Logging: Monitor webhook activity

Message Security:

  • Encrypt at Rest: Store message history encrypted
  • Encrypt in Transit: Use TLS/HTTPS for all API calls
  • Access Control: Role-based access to messaging
  • Audit Logs: Track who sends what
  • Content Filtering: Prevent sensitive data in SMS

Provider Comparison

FeatureTwilioVonageBandwidthPlivoMessageBird
Global ReachExcellentExcellentUS/CanadaGoodStrong EU
Pricing$$$$$$$$$$
API QualityExcellentVery GoodGoodGoodVery Good
DocumentationExcellentVery GoodGoodGoodVery Good
SupportExcellentGoodGoodGoodGood
MMSYesYesYesYesLimited
Short CodesYesYesYesYesLimited
Best ForAll-aroundInternationalUS high-volumeDevelopersEurope/omni

Troubleshooting

Authentication Fails:

  • Verify credentials copied correctly (no extra spaces)
  • Check account status (suspended, billing issue)
  • Confirm API permissions enabled
  • Test credentials via provider's API explorer
  • Check for IP restrictions on API access

Phone Number Not Working:

  • Verify SMS capability enabled on number
  • Check number is active (not released)
  • Confirm webhook configured correctly
  • Test by sending from provider console directly
  • Review number compliance (A2P registration may be required)

Webhook Not Receiving Messages:

  • Verify webhook URL publicly accessible
  • Check HTTPS certificate valid
  • Review firewall rules (allow provider IPs)
  • Test webhook endpoint with curl/Postman
  • Check webhook URL configured in provider dashboard
  • Review provider webhook logs

High Latency:

  • Check provider status page
  • Verify geographic routing (use local numbers)
  • Review network connectivity
  • Test with different provider
  • Check for rate limiting

Advanced Configuration

Multiple Providers (Failover): Configure backup providers for redundancy:

  • Primary provider for normal traffic
  • Secondary provider if primary fails
  • Automatic failover on errors
  • Load balancing across providers

Number Pooling: Use multiple numbers for high volume:

  • Distribute sends across number pool
  • Avoid carrier rate limits
  • Better deliverability
  • Geographic coverage

Custom Sender IDs (International): Some countries allow alphanumeric sender IDs:

  • "YourBrand" instead of phone number
  • Better brand recognition
  • Check country support
  • May require registration

Next Steps

Authentication Complete

Your SMS provider is now connected! Configure routing and preferences in Settings.

  1. Configure Settings: Set up phone numbers, routing, and preferences in SMS Settings
  2. Create Queues: Route SMS to appropriate teams in Message Queues
  3. Test Thoroughly: Send test messages to various carriers
  4. Train Team: Familiarize agents with SMS interface
  5. Launch: Start customer communication via SMS