Skip to main content

What is SMS Testing?

SMS testing allows you to test scenarios where your voice agent sends or receives text messages during phone calls. This is useful for testing:
  • OTP (One-Time Password) verification
  • Sending confirmation codes or links
  • Receiving information via text during a call
  • Multi-channel communication workflows

How SMS Testing Works

Two-Way SMS Communication

During a test call: Testing Agent (Evaluator) can:
  • Send SMS to the main agent
  • Receive SMS from the main agent
Main Agent can:
  • Receive SMS from the testing agent during the call
  • Send SMS to the testing agent
Important: SMS messages can only be received if sent to/from the same phone number being used in the active call. This ensures messages are correctly associated with the ongoing conversation.

Enabling the Send SMS Tool

To enable SMS functionality for your testing agents:
1

Navigate to Your Agent

Go to your Agents section and select the agent you want to test.
2

Access Evaluators

Click on the Evaluators tab and select the evaluator you want to configure.
3

Enable Send SMS Tool

Scroll to the Tools section, find Send SMS in the list of available tools, and toggle the switch to enable it.
SMS Tool Configuration

Available Testing Tools

When configuring your evaluator, you have access to these tools:
ToolDescription
DTMFSend DTMF tones during the call
End CallEnd the call at any point during the conversation
End Call Only on TransferEnd call only when a transfer occurs
Send SMSSend SMS messages during the call

Example: OTP Verification

Here’s a simple example of testing an agent that sends verification codes via SMS. Evaluator Instructions:
Call to update your policy information. When the agent sends you
a verification code via SMS, read the code back to verify your identity.
Test Flow:
  1. Testing agent calls and requests to update policy
  2. Main agent says: “I’ll send you a verification code”
  3. Main agent sends SMS with OTP code
  4. Testing agent receives the SMS and reads the code
  5. Main agent verifies the code and proceeds

How SMS Appears in Transcripts

When an SMS is sent during the call, it appears in the transcript as a Function Call:
SMS in Transcript
As shown above:
  • The Function Call section shows send_sms with the message content
  • The Function Call Result confirms the SMS was sent
  • This helps you track all SMS activity during the test

How Main Agents Handle SMS

Receiving SMS

When your main agent receives an SMS during a call, the message is automatically:
  1. Injected into the LLM context as: [User SMS]: <message content>
  2. Added to the transcript for your review
  3. Available for the agent to use in its response

Sending SMS

Your main agent can send SMS when configured with SMS capabilities. The SMS will appear in the transcript as a function call, just like in the example above.
Best Practice: SMS should only be sent when explicitly needed (verification codes, links, critical information). Don’t send SMS for regular conversation responses.

SMS Filtering

SMS messages are only delivered to the active call when:
  1. Sent to/from the call’s phone number
  2. There’s an active call session
  3. The direction is correct (user ↔ agent)
This ensures SMS messages are correctly associated with ongoing calls and don’t interfere with other tests.

Best Practices

1. Enable Selectively

Only enable the Send SMS tool for evaluators that need to test SMS functionality.

2. Clear Instructions

Be explicit about SMS expectations in your evaluator instructions:
✅ Good: "Wait for SMS with verification code, then read the 6-digit code aloud"
❌ Vague: "Handle SMS messages appropriately"

3. Validate Content

Use metrics to verify SMS messages contain correct information (codes, links, data).

4. Check Transcripts

Review the Function Call sections in transcripts to confirm SMS was sent/received correctly.

Next Steps