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.
Reminder
If 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 Portal.
📲 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.
branches:
inbound-call:
actions:
- action: dial@v1
params:
targets:
- number: "+33199001234"
timeout: 25
answerOnBranch: answered
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@v1
- If the call fails (e.g., timeout, busy, unreachable), we jump to the
voicemail
branch - 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 like
call.fromNumber
,call.toNumber
, etc.
⚙️ Advanced Options
The sms@v1
action supports several optional parameters that let you fine-tune delivery and compliance.
🆔 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>"
- Leave it empty to let Callr assign a default based on destination
- Set it to:
- A phone number (e.g.,
+33639980042
) - An alphanumeric sender (up to 11 characters, at least one letter)
- A phone number (e.g.,
Important
Custom 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
🧾 encoding
– Control Message Encoding
encoding
– Control Message EncodingBy default, encoding is automatically detected based on the characters in your SMS body.
You can override this with:
action: sms@v1
params:
# ... other parameters
encoding: "gsm" # or "unicode"
gsm
(default): Allows up to 153 characters per partunicode
: Supports special characters, emojis, etc., but limits to 67 characters per part
Important
Some countries only support GSM encoding. We recommend using GSM for maximum deliverability unless you specifically need Unicode characters.
🏷️ trafficType
– Set Message Intent
trafficType
– 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
trafficType: "alerting" # or "marketing"
marketing
(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
, orcall.cdr.status
to fine-tune logic - 🔐 Consider using
fetch@v2
+sms@v1
together to personalize the message (e.g., fetch user name, order info, etc.)
🔗 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 13 days ago