https://retellai.com/?utm_source=discord&utm_medium=seo logo
new SMS feaure can we send SMS using api calls or ...
# ❓・ai-evy-support
v
@AI Evy new SMS feaure can we send SMS using api calls or something before the call starts or fore xample send SMS jsing api request than receive some confirmation from client and then amke a call?
a
Thanks for tagging me @Vako-Sv. I'll look through relevant sources and get back to you shortly.
() - Visit [) Would you like a general answer based on my knowledge instead?
### Answer Based on the available sources, Retell AI's SMS feature currently works differently than what you're asking about. The SMS functionality is primarily designed to work within agent workflows rather than as standalone API calls before calls start [(1) ]() . Retell AI's SMS feature allows you to : - Send automated text messages through your AI agents - Build dedicated SMS workflows or embed SMS nodes inside voice call flows - Use your existing voice number to send SMS without additional SMS provider setup However, the sources don't show a direct API endpoint for sending standalone SMS messages before calls start. The SMS functionality appears to be integrated into the agent builder with SMS nodes and standalone texting agents . For sending SMS via API using your Retell number specifically, one community member asked about this exact use case - wanting to process transcripts after calls and send SMS confirmations from the same number [(2) ]() . While Retell staff confirmed it's possible to send SMS using Retell numbers [(3) ]() , the specific API implementation isn't detailed in the available documentation. For your workflow of sending SMS before calls, you might need to: 1. Set up SMS workflows within your Retell agents [(1) ]() 2. Use external SMS providers like Bandwidth or Plivo that support hosted messaging with the same number [(3) ]() I don't have the complete API documentation for standalone SMS sending before calls. For specific implementation details, I'd recommend: - Visit [Contact Sales]
​ To learn more, see the sources I considered: [[1] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[2] Send SMS via API](https://discord.com/channels/1186424376300679209/1374831237461577879) [[3] Send SMS via API](https://discord.com/channels/1186424376300679209/1386443910414598215) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy new question about new featured as well Transfer agents - if call started with the agent A and was transfered to agent B will i receve via webhook the whole conversation with both agents or i have to add webhook to each agent to receive the conversation - transcript for each agent separatly?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer For Agent Transfer webhook behavior, the webhook settings from the first agent (Agent A) will be used throughout the entire call [(1) ]() [(2) ]() . This means you'll receive the complete conversation transcript including both agents through the original webhook endpoint . Specifically, the following settings of the first agent are maintained throughout the call : - optInSignedUrl - optOutSensitiveDataStorage - webHookUrl All other settings like language, voice, and voiceModel will reflect the currently active agent . The destination agent (Agent B) has access to the full conversation history , and since the webhook URL remains from Agent A, you'll receive the complete transcript through that single webhook endpoint. However, there's a known issue mentioned in the community where some users experienced webhook firing problems with Agent Transfer [(3) ]() . The recommended solution is to set up a single webhook URL that receives events from all agents to ensure webhook events fire regardless of which agent is handling the call . For post-call analysis, you can configure whether to extract dynamic variables for only the transferred agent or both agents [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Agent Transfer](https://docs.retellai.com/build/single-multi-prompt/transfer-agent) [[2] Agent Transfer Node](https://docs.retellai.com/build/conversation-flow/transfer-agent-node) [[3] Agent Transfer - WebHook Not Firing In Agent2](https://discord.com/channels/1186424376300679209/1405501501337763861) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy simply explain for me what does MCP is used for - we had an webhook option for each agent and we wehre receiveiing all the call logs and data via thi webhook otpions but now MCP is used whats the major difference and pros and cons
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ## MCP vs Webhooks - Key Differences *MCP (Model Context Protocol) * and webhooks serve different purposes in Retell AI: ### Webhooks - Receive Call Data Webhooks allow your application to receive real-time notifications about events that occur in your Retell AI account [(1) ]() . They push data to your application as events happen (call started, call ended, call analyzed) , making your integrations more efficient and responsive . Webhooks are event-driven messages that notify external systems when something happens - like updating CRMs, triggering follow-ups, or archiving call transcripts [(1) ]() [(2) ]() . ### MCP - Extend Agent Capabilities During Calls MCP allows you to extend your agent's capabilities by integrating external MCPs and utilizing MCP tools [(3) ]() . Unlike webhooks that send data after events occur, MCP lets your agent actively call external services during the conversation [(4) ]() . With MCP, your agent can : - Send structured requests from an agent to a tool - Include headers and query params - Use the result to dynamically shape the next prompt or decision - Do all of this while keeping conversations fluid and real-time ### Major Differences Webhooks: - **Direction**: Outbound (Retell → Your system) - **Timing**: After call events happen - **Purpose**: Notify and sync call data - **Use cases**: Update CRMs, trigger workflows, analytics [(1) ]() MCP: - **Direction**: Bidirectional (Agent ↔ External tools) - **Timing**: During active conversations - **Purpose**: Extend agent
functionality in real-time - **Use cases**: Send emails, check balances, book appointments mid-call [(4) ]() ### Pros and Cons MCP Advantages: - Real-time tool integration during calls - Dynamic conversation flow based on external data - Secure connections to any HTTP endpoint - Can extract response values as dynamic variables for later use [(3) ]() MCP Considerations: - Adds complexity to agent setup - Potential latency impact (though Retell maintains sub-second response times) [(4) ]() - Requires proper timeout configuration [(3) ]() You still need both - webhooks for post-call data processing and MCP for real-time agent capabilities during conversations.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Webhook](https://www.retellai.com/glossary/webhook) [[3] MCP](https://docs.retellai.com/build/single-multi-prompt/mcp) [[4] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy when i tried to send SMS from agent it said A2P Application not found for the given phone number is it retell side issue or from phone number provider
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer The "A2P Application not found for the given phone number" error indicates that your phone number isn't properly linked to an A2P (Application-to-Person) campaign, which is required for SMS functionality [(1) ]() . This is typically a phone number provider configuration issue, not a Retell AI issue. To enable SMS capabilities with Retell Twilio numbers, you need to complete all three application steps [(2) ]() : 1. Get approved for a business profile (free) 2. Get approved for the brand based on business profile ($4 one time application fee for low-volume, $45 one time application fee for standard) 3. Get approved for a SMS campaign ($15 one time application fee) Even after approval, it can take 24-48 hours for the campaign to fully propagate across Twilio's backend and sync with downstream partners like Retell [(1) ]() . If you were just approved recently, this might resolve shortly . However, if it's been longer than 48 hours, the issue is likely that your number isn't linked to an A2P campaign . You'll need to go to Twilio Console → Messaging → A2P 10DLC, create a campaign, and link your number . This linking is required even for toll-free numbers . Note that SMS capabilities are currently limited to US numbers only [(2) ]() , and native SMS capabilities are only available for Retell Twilio numbers .
​ To learn more, see the sources I considered: [[1] Phone number can send SMS](https://discord.com/channels/1186424376300679209/1387874084536193024) [[2] Enable SMS capabilities](https://docs.retellai.com/deploy/enable-sms) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy from phone numbers section under each phone number i have several options about SMS like Inbound SMS agent what does this means? so as for the inbound and outbound we can have differetn agents thats why we have Inbound SMS agent and outbound?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation about "Inbound SMS agent" settings in the phone numbers section of the Retell AI dashboard. The phone number API documentation shows fields for
inbound_agent_id
and
outbound_agent_id
for voice calls [(1) ]() [(2) ]() , but doesn't include SMS-specific agent configurations. From what's documented about SMS functionality, Retell AI's SMS feature allows you to build dedicated SMS workflows or embed SMS nodes inside voice call flows [(3) ]() . You can use your existing voice number to send SMS without additional SMS provider setup . However, the specific details about how "Inbound SMS agent" works in the phone numbers section aren't covered in the available documentation. This could potentially work similarly to how voice calls have separate inbound and outbound agent assignments, but I can't confirm the exact implementation. For specific details about SMS agent configuration options in your phone numbers section, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[2] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) [[3] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy im tring to connect MCP to n8n mcp servers but from the tools it cant list anything that is connected to n8n mcp server why?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ### Answer When connecting MCP to n8n servers, there are several steps that must be completed correctly for tools to appear in the list [(1) ]() [(2) ]() : Required MCP Setup Steps: 1. Add MCP Server - First ensure your n8n MCP server URL is correctly configured 2. *Set request headers (optional) * - You can define custom headers to include with the request Retell sends to your MCP Server 3. *Set query parameters (optional) * - You can define query parameters to include in the request URL that Retell appends to your MCP Server Endpoint 4. Select Tool - Only after the server connection is established should you be able to select MCP tools from the available list [(1) ]() Common Issues That Prevent Tool Listing: - Server Connection Problems - If the n8n MCP server isn't responding correctly to Retell's requests, tools won't populate [(3) ]() - Authentication Issues - Missing or incorrect headers/authentication tokens can prevent tool discovery - Server Endpoint Configuration - The MCP server URL might not be properly configured or accessible [(1) ]() [(2) ]() - Tool Registration - The n8n MCP server might not be properly exposing its tools via the MCP protocol [(3) ]() Troubleshooting Steps: 1. Verify your n8n MCP server is running and accessible at the configured URL [(1) ]() [(2) ](
ai.com/build/conversation-flow/mcp-node) 2. Check if authentication headers are required and properly configured 3. Ensure your n8n MCP server is properly implementing the MCP protocol to expose available tools [(3) ]() 4. Test the server connection independently to confirm it's responding to MCP requests The sources don't provide specific troubleshooting details for n8n MCP server integration issues. For detailed n8n MCP server configuration support, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] MCP](https://docs.retellai.com/build/single-multi-prompt/mcp) [[2] MCP Node](https://docs.retellai.com/build/conversation-flow/mcp-node) [[3] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy using MCP tool i connected it to zapier - do i need to give command to agent to run any of the MCP tools or it will identify on its own?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer Based on the available sources, you need to provide clear instructions to your agent about when and how to use MCP tools - they don't automatically identify when to run them on their own [(1) ]() . ## Agent Instructions Required The agent needs explicit guidance in your prompt or tool configuration to know when to use MCP tools . For example, when using a Zapier MCP tool for sending emails, you should include instructions like: "When the user asks to receive written email confirmation, then do the Gmail send email tool call" [(2) ](

▾

) . ## Key Configuration Steps When setting up your Zapier MCP tool, you'll need to : 1. Configure the MCP server URL (using the Poku proxy URL format if using human-in-the-loop features) 2. Set proper authentication headers 3. Select the specific tool from the dropdown (like "Gmail send email") 4. Enable "speak after execution" for proper conversation flow ## Best Practices To ensure your agent uses the MCP tool output effectively [(1) ]() : - Explicitly tell the agent how to use the MCP output in your prompt - For example: "When the MCP tool returns a product list, include the names and prices in your spoken response" - Map JSON fields in the MCP node's response variables so the agent can reference them directly The LLM won't automatically know to use tool outputs unless you specifically configure it to do so . Clear prompting is essential for reliable MCP tool execution.
​ To learn more, see the sources I considered: [[1] Agent Ignores MCP Tool Response – How to Handle Text-Based Output in MCP?](https://discord.com/channels/1186424376300679209/1400785012671909889) [[2] Revolutionize Your AI Customer Support with Human-in-the-Loop: Poku x Retell Workshop](

https://www.youtube.com/watch?v=yFu_nuBziV8▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy what is the best way to use kb upload as single file or several files for the same agent?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer Based on the available sources, the best approach depends on your specific use case, but here are the key considerations: ## Best Practices from Official Documentation Group relevant information together in one chunk to improve retrieval accuracy [(1) ]() . Use markdown format for the source, with clear paragraphs as it will be easier to chunk and is easier to be retrieved . Avoid ambiguity and use specificity in references - when the chunk is retrieved, it's best to contain specific references like name, dates, and less ambiguous terms like "it" or "this" . ## Multiple Files vs Single File The official documentation suggests that grouping relevant information together improves retrieval accuracy . However, there are practical limits to consider: - **File limits**: At max 25 files, with each file at max 50MB - **Text limits**: At max 50 text snippets - You can create multiple knowledge bases to overcome these limits, and an agent can have more than one knowledge base linked to it ## Community Insights on Organization A community member asked specifically about organizing objections into separate documents vs one long document, considering response delay and cost [(2) ]() [(3) ]() . They were weighing whether to merge everything into one document or keep separate entries with a paragraph or two each for objections like "What makes you unique?", "What brands have you worked with?", and "What is the cost?" . For CSV data specifically, the recommendation is to reformat CSV into FAQ-style entries, split complex data into smaller focused files, and use exact phrasing in your prompt that matches how the data is str
uctured [(4) ]() . ## Recommendation Based on the documentation, use multiple focused files when: - Each file contains related, specific information - You want to avoid ambiguous references - Information is naturally segmented (different topics, products, etc.) Use a single file when: - Information is highly interconnected - You want to maintain context between related topics - The content is under the 50MB limit and well-structured in markdown The knowledge base will automatically chunk and embed your content during creation, and retrieve the most relevant chunks during calls [(1) ]() .
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Discord message from @pkleb on 2025-04-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1362691029383249961) [[3] Discord message from @pkleb on 2025-04-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1362644989699559696) [[4] Using knowledge base not how I wanted](https://discord.com/channels/1186424376300679209/1357009953247727808) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy there is on questions as well - before the MCP feature in Retell we have a build in functions and also custom function abilities - we were giving a name to those functions and in the agent prompt we had a directives how and when to use those tools functions - using mcp we still have tools and we still need to have in the prompt directives how and when to use those tools - so speaking of this why mcp? and not just use those regular tools as well what does MCP brings to table we didnt had before?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ## MCP vs Traditional Functions - Key Advantages You're right that both approaches require prompt directives, but MCP brings several significant advantages over traditional custom functions: ### Standardized Protocol & Simplified Integration MCP introduces a standardized protocol that eliminates the N×M integration problem entirely, reducing the complexity of adding new capabilities as your tech stack evolves [(1) ]() . Instead of building and maintaining custom integrations for each tool and use case, MCP provides a unified way to connect voice agents with external systems . ### Real-Time Intelligence & Performance Benefits MCP enables live intelligence during calls - your agent can request real-time information from CRM lookups, payment checks, eligibility verification, and dynamic pricing . One implementation reported reducing AI token usage by 98.8% by relying on MCP for precise external data calls instead of asking the model to guess . ### Superior Efficiency & Scalability MCP servers have shown 25% lower memory usage and 15% lower CPU utilization compared to traditional custom integration patterns . While many traditional systems top out at 5–10 concurrent calls, MCP-backed voice platforms can support unlimited concurrent calls per agent . ### What MCP Brings That Traditional Functions Don't **Secure by Design**: Only approved agents can access specific tools **Lightning Fast**: Built to maintain sub-second latency **Extremely Flexible**: Integrate anything with an HTTP endpoint **Dynamic Response Processing**: You can extract values from the MCP tool response and save them as dynamic variables for use later in the conversation [(2) ]() . For example:
Copy code
json
{
 "properties": {
 "user": {
 "name": "John Doe",
 "age": 26
 }
 }
}
**No Engineering Bottlenecks**: Works with Zapier, n8n, or your custom stack [(1) ]() ### Business Impact Early-stage users have cut development time by up to 30% and reduced maintenance costs by 25%, often reaching full payback in under 90 days . MCP adoption is driving measurable business results across industries through scalable, low-latency automation . The key difference is that while traditional functions require you to build each integration from scratch, MCP provides a standardized bridge to connect with any HTTP-based service securely and efficiently .
​ To learn more, see the sources I considered: [[1] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) [[2] MCP](https://docs.retellai.com/build/single-multi-prompt/mcp) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy i was able to connect zapier mcp and retrieve connected tools to my retell agents but i was not able to do so with n8n ccan you tell why? so basically mpc is not retrieving the tools connected to n8n mcp
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ### Answer Based on the available sources, the issue with n8n MCP not retrieving tools is a known problem with specific technical causes [(1) ]() [(2) ]() . ## The Core Issue: Endpoint Compatibility The main problem is that Retell's MCP client currently works with the /mcp endpoint, not /sse [(2) ]() . Your n8n MCP server is probably exposing only SSE (Server-Sent Events) , so Retell connects but gets stuck "scanning" for tools . ## Version-Specific Solutions **For Newer n8n Versions**: The issue has been resolved in newer versions of n8n where the MCP server uses the /mcp endpoint . One user confirmed: "it looks like in the newer version of n8n the mcp server does use the /mcp endpoint. So I updated and now this is working" . **For Older n8n Versions**: If you can't enable a proper /mcp URL in n8n, you'll need to use an MCP proxy (e.g., mcp-proxy) to bridge /sse → /mcp . ## Common MCP Connection Issues Several users have experienced similar problems where the MCP server appears to connect but tools don't load [(1) ]() [(3) ]() [(4) ]() . The typical symptoms include: - Tools list keeps loading forever and nothing appears [(1) ]() [(3) ]() - MCP server connection shows as established but no tools populate -
Getting stuck in a "scanning loop" [(2) ]() ## Troubleshooting Checklist Make sure your n8n MCP server meets these requirements : 1. Endpoint is publicly reachable over HTTPS (no self-signed certificates) 2. Uses /mcp endpoint format rather than /sse 3. Include any required Authorization header in Retell's MCP config 4. Test with another MCP client to confirm the server can return tools/list ## Why Zapier Works But n8n Doesn't Zapier's MCP implementation likely uses the proper /mcp endpoint format that Retell expects, while older n8n versions may only expose SSE endpoints . **Recommendation**: Update to the latest version of n8n, as this should resolve the endpoint compatibility issue and allow proper tool discovery .
​ To learn more, see the sources I considered: [[1] Discord message from @santelo77 on 2025-08-23](https://discord.com/channels/1186424376300679209/1294891368505937952/1408888085739208727) [[2] MCP server connection issue](https://discord.com/channels/1186424376300679209/1401934359182708857) [[3] Discord message from @santelo77 on 2025-08-23](https://discord.com/channels/1186424376300679209/1294891368505937952/1408815780912697536) [[4] MCP error](https://discord.com/channels/1186424376300679209/1399534474051457135) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy Can one knowledgebase have multiple files? Or is it multiple knowledgebases for an Agent? re: pricing.... I want to keep these separate because they have individual updates, and it's better than updating everything every time, but if there are extra costs to do this, I won;t
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ### Answer Yes, one knowledge base can have multiple files, and an agent can have multiple knowledge bases [(1) ]() . ## Multiple Files in One Knowledge Base A single knowledge base can contain : - **Files**: At max 25 files, with each file at max 50MB - **URLs**: At max 500 URLs - **Text**: At max 50 text snippets You can mix different content types within the same knowledge base by uploading files, adding URLs, and including custom text entries [(2) ]() [(3) ]() . ## Multiple Knowledge Bases per Agent An agent can have more than one knowledge base linked to it [(1) ]() . You can create multiple knowledge bases to overcome the individual limits mentioned above. ## Pricing Structure The pricing for your use case is very cost-effective [(1) ]() [(3) ]() : Knowledge Base Creation: - First 10 knowledge bases are free - Additional ones are billed at $8/month per knowledge base Usage Pricing: - $0.005 per minute of calls that have knowledge base enabled - It does not matter if your agent is using 1 or many knowledge bases, the billing is the same [(1) ]() ## Recommendation for Your Use Case Since you want to keep files separate for individual updates, you have two options with the same usage cost: 1. Multiple knowledge bases (one per file/topic) - Only costs extra if you exceed 10 knowledge bases ($8/month each after that) 2. Single knowledge base with multiple files - No additional creation cost, but updates affect the entire knowledge base The usage cost remains *
$0.005 per minute regardless of how many knowledge bases your agent uses* , so your approach of keeping files separate for easier updates makes sense both operationally and financially.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Create Knowledge Base](https://docs.retellai.com/api-references/create-knowledge-base) [[3] Simplify Support with Retell AI’s Knowledge Base | Retell AI](https://www.retellai.com/blog/knowledge-base-feature) ​
v
@AI Evy ConversationLoopError: Ending the conversation early as there might be a loop. using Simulation testing i am getting this error what does this means and what do to improve it?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer The ConversationLoopError occurs when Retell AI's loop detection system identifies potential repetitive behavior in your agent during simulation testing, even when no actual loop exists [(1) ]() [(2) ]() [(3) ]() . ## What This Error Means The error "ConversationLoopError: Ending the conversation early as there might be a loop" can occur in both simulation testing and batch testing [(1) ]() [(2) ]() . This happens even with simple success criteria - one user reported getting this error with criteria as basic as "Ensure agent responds" [(2) ]() . ## Solutions to Improve ConversationLoopError ### 1. Add Explicit End Call Node Add an explicit End Call node in your conversational flow :
Copy code
json
{
  "type": "end_call",
  "parameters": {
    "message": "Great, we're all set—thanks!"
  }
}
### 2. Improve Transition Conditions Use deterministic prompts for better flow control :
Copy code
If the system receives END, move to end_call
### 3. Add Loop-Safety Fallback Implement a timeout or maximum turn limit :
Copy code
json
{
  "type": "tool",
  "name": "end_after_max_turns",
  "parameters": {
    "maxTurns": 3
  }
}
### 4. Relax Success Criteria Sometimes the ConversationLoopError gets triggered when success criteria are too strict, even though the conversation isn't actually looping [(1) ]() . Try making your success conditions less restrictive to test if this resolves the issue. ### 5. For Live Calls - Vary Agent Responses To avoid getting flagged in live calls : - Vary how the agent responds (don't repeat the same phrasing) - Track conversation progress to avoid circling - Add clear end points ## When to Contact Support If your agent requires fairly long conversations by design (like coaching agents that gather feedback) and you're consistently hitting this error without actual loops, you can contact Retell support to potentially raise the limit or whitelist your use case [(1) ]() [(3) ]() . For specific limit increases, you can reach out to support@retellai.com with your org ID [(3) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Simulation Tests – ConversationLoopError (Increase message limit)](https://discord.com/channels/1186424376300679209/1387066442276667517) [[2] Batch testing running into ConversationLoopError](https://discord.com/channels/1186424376300679209/1388208460990120007) [[3] ConversationLoopError Bug](https://discord.com/channels/1186424376300679209/1403794356502007970) ​
v
@AI Evy Re: Simulation Testing, I just started using it. I noticed that there is a difference in how the agent is responding inthe Simulation vs. in reality. For instance, we've programmed the Agent to give short concise answers, whereas in the simulation it's very verbose. Granted I see that it's testing the knowledgebase accurately (it seems for now), but I would just like to confirm what exactly are we simulating, how the agent should be working (with exact agent instructions) OR testing the agent's ability to draw from the knowledgebase.
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer ### Answer Simulation testing simulates how your agent should work with exact agent instructions, not just knowledge base testing [(1) ]() . The simulation environment allows developers to test AI agents in realistic, controlled scenarios without affecting live operations [(2) ]() . ## What Simulation Testing Actually Tests Simulation testing evaluates your complete agent configuration [(1) ]() [(2) ]() : - Agent prompts and instructions - Knowledge base retrieval and usage [(3) ]() - Tool calling and function execution - Conversation flow logic - Response generation with your specified parameters ## Addressing Response Length Differences The verbose responses in simulation versus your programmed concise answers suggest a few potential causes: **LLM Model Selection**: You can select which LLM model to use to generate user conversation in simulation testing [(1) ]() . Different models may interpret your "short concise answers" instruction differently. **Testing vs Production Configuration**: Simulation testing should use your exact agent configuration, but there might be differences in: - Prompt instructions between test and production environments - LLM model settings (temperature, response length parameters) - Knowledge base integration settings [(3) ]() ## Best Practices for Accurate Simulation When defining your user scenario, use this recommended format [(1) ](
Copy code
///## Identity
Your name is Mike.
Your date of birth is June 10, 1999.
Your order number is 7891273.
///## Goal
Your primary objective is to return the package you received and get a refund.
///## Personality
You are a patient customer. However, if the conversation becomes too long or complicated, you will show signs of impatience. If the issue remains unresolved, you may become frustrated and angry.
## Evaluation Metrics for Response Style Define evaluation metrics that specifically test response conciseness :
Copy code
1. Verify that the customer successfully returned the package and received a refund.
2. Confirm that the end_call function was called at the end of the conversation.
3. Ensure the agent's responses are conversational and contain 5 sentences or fewer.
The simulation should reflect your exact agent behavior - if you're seeing verbose responses when you've configured concise ones, this indicates either a configuration mismatch or the need to strengthen your conciseness instructions in the agent prompt.
ting) :
​ To learn more, see the sources I considered: [[1] Automatically test your agent](https://docs.retellai.com/test/llm-simulation-testing) [[2] Retell AI Introduces Simulation and Batch Testing for AI Agents | Retell AI](https://www.retellai.com/blog/retell-ai-introduces-simulation-and-batch-testing-for-ai-agents) [[3] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy When contacting Retell AI for help, providing clear context is crucial. Use the following prompt template to get the most accurate guidance for your specific situation. Subject: How to Access Original Caller ID on Forwarded Calls "Hello Retell Support Team, We are implementing a Retell AI voice agent for our inbound calls and need guidance on correctly identifying the original caller's phone number. Here is our current setup: Caller's Action: A customer calls our main company phone number [Enter your main company number, e.g., +1-212-555-0100]. Call Forwarding: This call is then automatically forwarded to the phone number assigned to our Retell AI agent, which is [Enter your Retell AI agent's number, e.g., +1-650-555-0199]. The Issue: When the call arrives at the Retell agent, the from_number we see in our logs is always our own company number (+1-212-555-0100), not the customer's actual phone number. Our telephony provider for the main company number is [Enter your provider's name, e.g., Twilio, RingCentral, Vonage, or "a local carrier"]. Our questions are: Could you confirm the best practice for ensuring the original caller's number is passed through to the Retell agent in this forwarding scenario? We understand this may involve configuring our external telephony provider. If we are using a platform like Twilio, what specific configuration (e.g., setting the callerId in a TwiML command) do you recommend? Is it possible to pass the original caller's number as custom metadata to the agent during the call transfer, and if so, how should we configure our forwarding system to send this metadata?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer Based on the available sources, I can provide some guidance on call forwarding and caller ID handling with Retell AI, though the sources don't contain specific documentation addressing your exact forwarding scenario. ## Call Registration and Caller ID Handling When calls arrive at Retell AI, the system captures both
from_number
and
to_number
fields in the call object [(1) ]() . The API response shows these fields are populated based on the actual call routing:
Copy code
javascript
{
 "from_number": "+12137771234",
 "to_number": "+12137771235",
 "direction": "inbound",
 "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6"
}
## Custom SIP Headers and Metadata Options Retell AI supports custom SIP headers and metadata that could potentially carry the original caller information [(1) ]() [(2) ]() :
Copy code
javascript
"custom_sip_headers": {
 "X-Custom-Header": "Custom Value"
},
"metadata": {}
[(1) ]() The metadata field is described as "an arbitrary object for storage purpose only" that can contain "anything here like your internal customer id associated with the call" [(1) ]() [(2) ]() . ## Telephony Provider Configuration For SIP trunking setups, the sources mention that different telephony providers may handle SIP headers differently [(3) ]() . Specifically, the documentation notes that some providers may not honor custom SIP headers in certain scenarios. ## Recommendation for Support Contact Since your specific use case involves call forwarding through an external provider to preserve original caller ID, and the available sources don't contain detailed guidance on this configuration, I recommend contacting Retell AI support directly: - Visit [Contact Sales]() - Visit [) Your detailed prompt template provides excellent context for the support team to understand your forwarding scenario and telephony provider setup.
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Discord message from @sohithbandari on 2025-08-15](https://discord.com/channels/1186424376300679209/1186462578310910112/1405960109015699629) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
v
@AI Evy we tried to make a call from our ai agent and we received this issue in retell call history tab telephony provider permission denied
a
### Answer The
telephony_provider_permission_denied
error indicates that your telephony provider is refusing the call due to authentication or permission issues [(1) ]() . ## Common Causes and Solutions **Authentication Issues**: This error typically occurs when SIP credentials, registration, caller ID, or routing permissions are incorrect or incomplete [(2) ]() . **Configuration Problems**: If using custom telephony, double check your configuration and make sure you imported the correct information [(3) ]() . If the configuration is not correct, delete the imported number and re-import . **Provider-Specific Limitations**: - If using numbers purchased from Retell, they can only make calls to US numbers [(3) ]() [(4) ]() - For international calls, you need to use custom telephony [(4) ]() - Check with your telephony provider to see what's the error on their side [(3) ]() ## Troubleshooting Steps 1. **Check Call History**: Review the call detailed log which contains the disconnection reason, SIP error code, and error message 2. **Verify Configuration**: Ensure your telephony provider configuration allows outbound calls to your target destination [(5) ]() 3. **Provider Permissions**: Contact your telephony provider to verify that your account has proper outbound calling permissions and geographic restrictions [(2) ](
9/1395665651963658270) [(5) ]() 4. **Intermittent Issues**: If this happens only for some calls (not all) , it may indicate authentication issues that occur sporadically rather than systematic configuration problems [(2) ]() The error specifically means your outbound call was not connected due to telephony provider permission denial [(1) ]() [(6) ]() [(7) ]() [(8) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Telephony_provider_permission_denied](https://discord.com/channels/1186424376300679209/1395665651963658270) [[3] Debug outbound connection issues](https://docs.retellai.com/reliability/debug-outbound-call) [[4] Unable to Make Outbound Phone Calls – “telephony provider permission denied”](https://discord.com/channels/1186424376300679209/1392540220704166131) [[5] I am trying to setup a phone number for outbound calls](https://discord.com/channels/1186424376300679209/1391174914345533441) [[6] Get Call](https://docs.retellai.com/api-references/get-call) [[7] Create Web Call](https://docs.retellai.com/api-references/create-web-call) [[8] List Calls](https://docs.retellai.com/api-references/list-calls) ​
v
@AI Evy Is there's anyway that we can program a time recognition with the agent? ie if people call during certain times the agent acts differently like after hours behavior and office hours activity
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer Based on the available sources, there is no explicit documentation stating that you can program time-based behaviors (e.g., after-hours vs. office hours) directly within the agent configuration or flow. However, you can use Retell AI's custom function integration to connect your agent with external systems. This means you could implement your own logic on an external server to detect the current time and return a response or trigger different behaviors based on business hours. The agent can call this custom function as needed during a conversation [(1) ]() . You would set up a custom function in the dashboard, have your agent call it with the current context, and let your endpoint decide what response or action is appropriate for the time of day. You can then use dynamic variables to guide the agent’s next steps based on the function’s output .
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy when call is ended i receive webhook data abput the call transcript call id etc - how can i see from recevied data which assigne functions were executed by the ai agent?
a
Thanks for the follow-up, @Vako-Sv. I'll get back to you soon.
### Answer When a call ends, the webhook payload you receive contains the event type and the full call object, but the sources do not explicitly document that the payload includes a list of functions (tools) executed by the agent during the call. The documented webhook events (
call_ended
,
call_analyzed
) provide call details and analysis results, but there is no mention in the official documentation that executed function/tool names are included in these webhook payloads [(1) ]() [(2) ]() . If you need to trace which custom functions or tools were triggered during a call, this information is not documented as being part of the webhook data returned after call completion. You may want to implement custom logging on your endpoint or use other integration strategies to track tool executions.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.