Files
twilio-wp-plugin/includes/interface-twp-sms-provider.php

33 lines
822 B
PHP
Raw Permalink Normal View History

Add queue timeout voicemail and Amazon SNS SMS provider support This update adds two major features: 1. Queue Timeout Voicemail - Callers can now leave voicemail when queue timeout is reached - Configurable per-queue voicemail prompts with TTS support - Automatic transcription and urgent keyword detection - Admin setting to choose between voicemail or callback on timeout 2. Amazon SNS SMS Provider - Alternative SMS provider to Twilio for sending text messages - Useful when Twilio SMS approval is difficult to obtain - Provider abstraction layer allows switching between Twilio/SNS - Full AWS SNS configuration in admin settings - Supports custom sender IDs in compatible countries - Lower cost per SMS compared to Twilio New Files: - includes/class-twp-voicemail-handler.php - Voicemail recording handler - includes/interface-twp-sms-provider.php - SMS provider interface - includes/class-twp-sms-provider-twilio.php - Twilio SMS implementation - includes/class-twp-sms-provider-sns.php - Amazon SNS implementation - includes/class-twp-sms-manager.php - SMS provider abstraction manager - QUEUE_VOICEMAIL_SMS_FEATURES.md - Complete feature documentation Modified Files: - includes/class-twp-call-queue.php - Added voicemail option to timeout handler - includes/class-twp-twilio-api.php - Updated send_sms() to use provider abstraction - admin/class-twp-admin.php - Added SMS provider and timeout action settings - composer.json - Added AWS SDK dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 11:13:54 -07:00
<?php
/**
* SMS Provider Interface
*
* Interface for SMS providers (Twilio, Amazon SNS, etc.)
*/
interface TWP_SMS_Provider {
/**
* Send an SMS message
*
* @param string $to_number Recipient phone number (E.164 format)
* @param string $message Message body
* @param string $from_number Sender phone number (E.164 format)
* @return array Response array with 'success' and 'data' or 'error'
*/
public function send_sms($to_number, $message, $from_number = null);
/**
* Get provider name
*
* @return string Provider name
*/
public function get_provider_name();
/**
* Validate provider configuration
*
* @return array Response array with 'success' and 'message' or 'error'
*/
public function validate_configuration();
}