Send SMS within a Call Flow
With Callr Actions, you can send an SMS dynamically as part of any voice flow — for example, to:
- Notify a caller who couldn’t reach you
- Send confirmation or follow-up messages
- Share a URL, form, or next step
- Log important info or trigger SMS-based workflows
All of this is handled directly in YAML, using the sms@v1 action.
ReminderIf you are in Build Mode, you can only send SMS to Testing Numbers — phone numbers you own and have verified. Make sure to add your personal number as a Testing Number in the Callr Console.
📲 Example: Missed Call Follow-up
In this scenario, we try to forward the call to someone. If the call fails and the caller is using a mobile number, we automatically send them a follow-up SMS.
compat:
version: "2025-09-01"
branches:
inbound-call:
actions:
- action: dial@v2
params:
targets:
- number: "+33199001234"
timeout: 25
result: $dial
- if: "!$dial?.ok"
goto:
branch: voicemail
voicemail:
actions:
- if: call.fromType.match(/MOBILE/)
action: sms@v1
params:
to:
- ${{ call.fromNumber }}
body: >
Hello! You tried to reach us but we weren’t available.
We’ll get back to you as soon as possible.🧠 How It Works
- We attempt to connect the call using
dial@v2 - If the call fails (e.g., timeout, busy, unreachable), we jump to the
voicemailbranch - We check if the caller is using a mobile number (
fromType.match(/MOBILE/)) - If true, we send an SMS using
sms@v1
You can customize the SMS body dynamically using expressions or pre-defined variables likecall.fromNumber,call.toNumber, etc.
⚙️ Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
to | Yes | 1 to 10 E.164 numbers | Recipients |
body | Yes | string, 1 to 3200 characters | Message text |
from | No | string | Sender: an E.164 number, or an alphanumeric sender ID of 2 to 11 characters that starts with a letter |
nature | No | MARKETING (default) or ALERTING | Message nature |
forceGSM | No | boolean, default false | Force GSM 7-bit encoding |
With result: $var, the action writes the list of the SIDs of the SMS sent (a recipient that failed is skipped), or false when the SMS could not be sent at all.
🆔 from – Customize the Sender ID
from – Customize the Sender IDYou can personalize the Sender ID using the from field:
action: sms@v1
params:
# ... other parameters
from: "<sender>"- Omit it to let Callr assign a default based on destination
- Set it to:
- A phone number (e.g.,
+33639980042) - An alphanumeric sender (2 to 11 characters: letters, digits, spaces,
_or-, starting with a letter)
- A phone number (e.g.,
ImportantCustom SMS senders must be approved by Callr and supported by the destination carrier.
Some destinations require regulator approval for sender IDs.
👉 Request custom sender approval here
🧾 forceGSM – Control Message Encoding
forceGSM – Control Message EncodingBy default, encoding is automatically detected based on the characters in your SMS body:
- GSM 7-bit: up to 153 characters per part
- Unicode: supports special characters, emojis, etc., but limits to 67 characters per part
Set forceGSM: true to always send in GSM 7-bit encoding:
action: sms@v1
params:
# ... other parameters
forceGSM: true
ImportantSome countries only support GSM encoding. We recommend using GSM for maximum deliverability unless you specifically need Unicode characters.
🏷️ nature – Set Message Intent
nature – Set Message IntentYou can specify the type of traffic you are sending. This is required by some carriers for proper delivery and compliance:
action: sms@v1
params:
# ... other parameters
nature: ALERTING # or MARKETINGMARKETING(default): Promotional or non-urgent contentALERTING: Time-sensitive or critical content (e.g., OTPs, service alerts)
✨ Pro Tips
- ✅ Always validate the number type before sending SMS — landlines may reject or ignore SMS
- 🧪 Use
call.fromType,call.fromCountry, or$dial.statusto fine-tune logic - 🔐 Consider using
fetch@v3+sms@v1together to personalize the message (e.g., fetch user name, order info, etc.) - 🔍 Check that the SMS was sent in the Live Debugger
🔗 Use Cases
- Missed call notifications
- Callback confirmations
- Delivery alerts or appointment reminders
- Conversational opt-in flows (voice → SMS)
- Multichannel journeys (start on voice, continue on SMS)
Updated 8 days ago
