The /twilio
command enables you to make phone calls and send SMS messages through Twilio. Perfect for:
- Making automated phone calls
- Sending SMS notifications
- Voice messaging
- Phone number verification
- Customer communications
Basic Usage
Use the command to interact with Twilio:
/twilio call +14155551234 from +14155555678 say "Hello, this is an automated message"
/twilio send SMS to +14155551234 from +14155555678 message "Your order has been shipped"
Key Features
Voice Calls
- Make outbound calls
- Use text-to-speech
- Play pre-recorded messages
- Use TwiML for complex flows
SMS Messaging
- Send text messages
- Bulk messaging
- International SMS
- Delivery tracking
TwiML Support
- Custom call flows
- Interactive voice response
- Call forwarding
- Voice recordings
Example Commands
Simple Phone Call
/twilio call +14155551234 from +14155555678 with message "Hello, your appointment is confirmed for tomorrow at 3 PM"
SMS Message
/twilio SMS to +14155551234 from +14155555678 "Your verification code is 123456"
Call with TwiML
/twilio call +14155551234 using TwiML "<Response><Say>Press 1 to confirm</Say><Gather numDigits='1'/></Response>"
Voice URL Call
/twilio call +14155551234 from +14155555678 using voice URL "http://demo.twilio.com/docs/voice.xml"
Always use E.164 format:
- Start with + and country code
- No spaces or special characters
- Example: +14155551234
TwiML Basics
Common TwiML verbs:
<Say>
: Text-to-speech
<Play>
: Play audio file
<Gather>
: Collect digits
<Record>
: Record voice
<Dial>
: Connect calls
Tips
- Verify phone numbers are in E.164 format
- Test with Twilio test numbers first
- Keep messages concise for SMS (160 character limit)
- Use TwiML for interactive voice flows