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 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 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.


⚙️ Parameters

ParameterRequiredTypeDescription
toYes1 to 10 E.164 numbersRecipients
bodyYesstring, 1 to 3200 charactersMessage text
fromNostringSender: an E.164 number, or an alphanumeric sender ID of 2 to 11 characters that starts with a letter
natureNoMARKETING (default) or ALERTINGMessage nature
forceGSMNoboolean, default falseForce 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

You 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)
⚠️

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


🧾 forceGSM – Control Message Encoding

By 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
⚠️

Important

Some countries only support GSM encoding. We recommend using GSM for maximum deliverability unless you specifically need Unicode characters.


🏷️ nature – Set Message Intent

You 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 MARKETING
  • MARKETING (default): Promotional or non-urgent content
  • ALERTING: 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.status to fine-tune logic
  • 🔐 Consider using fetch@v3 + sms@v1 together 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)

Did this page help you?