https://retellai.com/?utm_source=discord&utm_medium=seo logo
How to make retell sound more human and decrease l...
# ❓・ai-evy-support
m
@AI Evy How to make retell sound more human and decrease latency
a
Thanks for tagging me @MehXBot. I'll look through relevant sources and get back to you shortly.
### Answer ## Decreasing Latency Check your agent settings: In the agent detail page under "Estimated Latency," you can view average latency for your agent. [(1) ]() Certain settings increase latency—these are marked with a turtle icon. Monitor actual call latency: Review individual call latency metrics in "Call History," including P90, Median, and Min values. [(2) ]() Use a faster LLM: Switching to a more efficient language model can reduce response time. [(3) ]() Use a faster TTS: Implementing a faster text-to-speech system provides quicker audio output. Avoid settings that increase latency: Look for and disable features marked with the turtle icon if low latency is a priority. [(1) ]() ## Making It Sound More Human Improve turn-taking: Implement a more sophisticated turn-taking model to accurately detect when users finish speaking—this prevents the AI from interrupting or responding prematurely, leading to more natural conversations. [(3) ]() Use saved memory: Automatically retrieve previous conversation context to provide more relevant and nuanced responses. Add fallback strategies: Use prompt engineering to clarify user intent when uncertain—have the AI ask follow-up questions rather than guessing. Fine-tune with call scripts: Train the model using call scripts to teach a more specific tone and output style. Address accent/dialect recognition: Ensure diverse training data and consider allowing users to specify their accent for better recognition accuracy.
​ To learn more, see the sources I considered: [[1] Check estimated latency](https://docs.retellai.com/reliability/check-estimated-latency) [[2] Check actual latency](https://docs.retellai.com/reliability/check-actual-latency) [[3] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I have a global node but like I have to transition it back to previous node after query i have set conditions but it does not work
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer --- Unfortunately, **Retell AI does not currently support automatically returning from a Global Node to the original conversation flow position**—this is an architectural limitation. [(1) ]() Since global nodes can be transitioned to from anywhere, they do not necessarily need to be connected to the rest of the graph. [(2) ]() ### Workaround Retell doesn't auto-return from global nodes, but you can build this behavior manually by: 1. Storing the last node in a variable before transitioning to the global node 2. Routing back manually with a Logic Split based on that stored variable [(3) ]() This requires you to set up dynamic variables to track where the user was, then use equation-based transition conditions to route back to the appropriate node. [(4) ]() If this limitation is significant for your use case, you can submit a feature request in the
#📒・feature-requests
channel. [(1) ]()
​ To learn more, see the sources I considered: [[1] Is it possible to return from the Global Node](https://discord.com/channels/1186424376300679209/1399484507530334368) [[2] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) [[3] fallback to the previous node from Global node](https://discord.com/channels/1186424376300679209/1388025209533235261) [[4] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
m
@AI Evy which variables store last node? and how do i store it like
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer --- There is no built-in variable that automatically stores the last node—you need to create and manage this yourself using dynamic variables. [(1) ]() ### How to Implement This 1. Create a dynamic variable (e.g.,
last_node
) to track where the user was before jumping to the global node. You can create variables with types like Text, Number, Enum, or Boolean. [(2) ]() 2. Before each node that could transition to the global node, update the
last_node
variable to store a value representing that node (e.g., set it to
"collect_email"
,
"schedule_appointment"
, etc.) . 3. After the global node handles the query, use a Logic Split node with equation-based transition conditions to route back based on the stored variable value. [(1) ]() 4. Set up equation conditions like:
Copy code
{{last_node}} == "collect_email"
{{last_node}} == "schedule_appointment"
[(3) ]() This approach requires manual setup at each node you want to be able to return to, but it's the recommended workaround since Retell doesn't auto-return from global nodes. [(1) ]() [(4) ]() ---
​ To learn more, see the sources I considered: [[1] fallback to the previous node from Global node](https://discord.com/channels/1186424376300679209/1388025209533235261) [[2] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[4] Is it possible to return from the Global Node](https://discord.com/channels/1186424376300679209/1399484507530334368) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy what about previous_agent_state
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer ---
{{previous_agent_state}}
is a built-in system dynamic variable that stores the previous state name for multi-state agents. [(1) ]() You can use it in transition conditions like:
Copy code
{{previous_agent_state}} == "Qualification" AND User wants to revisit last question
[(2) ]() ### Important Limitation However, there's a catch when using global nodes with skip response enabled. As noted in community discussions, when you transition through a global node to a Logic Split node, the value of
{{previous_agent_state}}
becomes the global node itself (e.g.,
"ask_agent"
) , so you lose the original node you wanted to return to (e.g.,
"welcome"
) . This is why the manual approach of storing the last node in your own custom variable before transitioning to the global node is often recommended—it gives you more control over what value gets preserved. ---
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Store the last node in a variable](https://discord.com/channels/1186424376300679209/1396840637189591201) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy How do i store last node bro
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer --- To store the last node before transitioning to a global node, you need to manually set a dynamic variable at each node you want to be able to return to. Here's the approach: 1. Create a custom dynamic variable (e.g.,
last_node
) with type Text or Enum to track your position. [(1) ]() 2. At each conversation node that could transition to your global node, update the variable value to identify that node. For example, in a node called "collect_email", you'd set
last_node
to
"collect_email"
. 3. After the global node, use a Logic Split node to route back based on the stored variable. [(2) ]() 4. Set up equation-based conditions like:
Copy code
{{last_node}} == "collect_email"
Copy code
{{last_node}} == "schedule_appointment"
[(1) ]() The Logic Split node will immediately evaluate these conditions and branch to the corresponding destination. [(2) ]() Unfortunately, there's no automatic way to do this—you have to explicitly set the variable value at each node you want to track. [(3) ]() ---
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[3] Discord message from @santoshsingh212e_48455 on 2025-06-27](https://discord.com/channels/1186424376300679209/1294891368505937952/1388033983824138291) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy how do like i set this up?
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer Based on the available sources, I can explain the general setup, but the documentation doesn't provide step-by-step instructions for manually updating dynamic variables within each node. What we know: 1. Logic Split Node evaluates conditions immediately when entered and branches to corresponding destinations—the agent won't speak in this node. [(1) ]() 2. Equation-based conditions can check dynamic variables like:
Copy code
{{last_node}} == "collect_email"
{{last_node}} == "schedule_appointment"
[(2) ]() 3. The Logic Split node requires an else destination as a fallback if no conditions are met. [(1) ]() 4. Important: The parent node of your Logic Split should have skip response enabled for this pattern to work correctly. [(3) ]() The gap: The documentation doesn't explicitly show how to set a custom variable's value within a conversation node before transitioning. You'd need to explore the node settings or use an Extract DV Node to update variable values. Check out these potentially useful sources: - [Logic Split Node]() - [Step 3: Add transition conditions]() - [Conversation Flow Overview]() Would you like me to try providing a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[3] Help with Logic Split Nodes (and an example of a custom variable being used would be lovely!)](https://discord.com/channels/1186424376300679209/1358825261986087126) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I am still confused how do i set up the flow to go to previous node agai
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
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] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
### Answer --- Here's a practical setup: Step 1: Create an Extract Dynamic Variable Node to store the current location before entering your global node. Use the Extract DV Node to create a variable like
last_node
with type Text or Enum. [(1) ]() Step 2: At each conversation node you want to be able to return to, add an Extract DV Node before the transition to your global node. Set
last_node
to a value identifying that node (e.g.,
"collect_email"
,
"schedule_appointment"
) . Step 3: After your global node, connect to a Logic Split Node. The Logic Split evaluates conditions immediately when entered and branches to the corresponding destination—the agent won't speak in this node. [(2) ]() Step 4: Add equation-based transition conditions in the Logic Split:
Copy code
{{last_node}} == "collect_email"
{{last_node}} == "schedule_appointment"
[(3) ]() **Step 5: Set up the else destination**—there will always be an else condition as the default if no conditions are met. [(2) ]() Step 6: Connect each condition to the corresponding node you want to return to. Key tip: Global nodes can be transitioned to from anywhere and don't need to be connected to the rest of the graph—that's why you need this manual tracking approach. [(8) ](

▾

)
m
@AI Evy so like i have n object in my payload which is either empty or it has an array of questions which i have to ask the question
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer --- Based on your scenario where you have a payload object that's either empty or contains an array of questions, here are a couple of relevant points: Handling Arrays in Function Results When returning arrays from custom functions, there's a known behavior where the LLM may not respond properly when the result is an array of objects. [(1) ]() The recommended approach is to use
JSON.stringify
to return a JSON string representation of the array, and describe the structure in your prompt so the LLM knows how to interpret it. For Your Flow Logic You can use a Logic Split Node to check whether your payload/variable is empty or has content, then branch accordingly: - If the array is empty → transition to one path - If the array has questions → transition to a path that processes them For the transition conditions, you'd use equation-based conditions to evaluate your dynamic variable. [(2) ]() Empty Payload Considerations If you're seeing empty payloads in custom functions, verify that your dynamic variables are properly populated before the function call. One user reported that dynamic variables weren't being included in the payload even though they appeared filled—this was an intermittent issue. Check out these potentially useful sources: - [Dynamic Variables]() - [Logic Split Node]() - [Extract Dynamic Variable Node]() Would you like me to try providing a general answer on how to loop through array questions in a conversation flow?
​ To learn more, see the sources I considered: [[1] LLM doesn't respond when result is an array of objects](https://discord.com/channels/1186424376300679209/1230541377910345840) [[2] Empty payload for custom function](https://discord.com/channels/1186424376300679209/1437764852058947655) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
You can use a Logic Split Node to check whether your payload/variable is empty or has content, then branch accordingly: If the array is empty → transition to one path If the array has questions → transition to a path that processes them how do i do this provide me step plan
@AI Evy You can use a Logic Split Node to check whether your payload/variable is empty or has content, then branch accordingly: If the array is empty → transition to one path If the array has questions → transition to a path that processes them how do i do this provide me step plan
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer --- Here's a step-by-step plan to check if your array variable is empty or has content using a Logic Split Node: Step 1: Set up your dynamic variable Pass your questions array as a dynamic variable in your payload (e.g.,
{{questions}}
) . Step 2: Add a Logic Split Node The Logic Split node evaluates conditions immediately when the agent enters it—the agent won't speak in this node, and time spent here is minimal. [(1) ]() Step 3: Configure the branching conditions Use the
exists
/
does not exists
equation conditions to check whether your variable has a value: [(2) ]()
Copy code
{{questions}} exists
Copy code
{{questions}} does not exists
Step 4: Set up your transitions - Connect the
{{questions}} exists
condition to your "process questions" path - Connect the
{{questions}} does not exists
condition (or use the else destination) to your "empty array" path Step 5: Configure the else destination There will always be an else condition, which serves as the default destination if none of the conditions are met—this ensures your conversation flow doesn't get stuck. [(1) ]() Important note: Based on community feedback, using boolean helper variables (like
questions_exist: true/false
) can make conditional transitions more reliable, especially when dealing with values that might be null or 0. [(4) ]()
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy The voice is taking set voicemail greeting as user initiation how do i prevent that
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer --- This is a known issue where the agent interprets voicemail greetings (like "Hello, this is Mark, can't make it to the phone right now...") as a live call and starts talking. [(1) ]() Enable Voicemail Detection Navigate to your agent settings → call settings and enable "Voicemail Detection". [(2) ]() You can configure the agent to either: - **Hang up**: The agent will disconnect when it detects a voicemail - **Leave a message**: The agent will leave a message after it's the agent's turn to speak Configure Voicemail Detection Timeout The
voicemail_detection_timeout_ms
setting configures when to stop running voicemail detection. The minimum value is 5,000 ms (5 s) , maximum is 180,000 ms (3 minutes) , and default is 30,000 ms (30 s) . [(3) ]() Known Limitation Some users have reported that voicemail detection doesn't always work reliably, particularly with: - Voicemails that only have a beep sound and no spoken greeting [(1) ]() - Custom voicemail greetings from various carriers In these cases, the agent may continue talking until it disconnects due to inactivity. If you're using Twilio, you can also enable Twilio's Async AMD (Answering Machine Detection) with
DetectMessageEnd
for additional voicemail detection. ---
​ To learn more, see the sources I considered: [[1] VOICEMAIL](https://discord.com/channels/1186424376300679209/1380663452023914506) [[2] Handle voicemail](https://docs.retellai.com/build/handle-voicemail) [[3] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy Any method to improve the greeting detecttion or something?
a
Thanks for the follow-up, @MehXBot. I'll get back to you soon.
### Answer Based on the available sources, here are the voicemail detection settings you can configure to improve detection: Voicemail Detection Timeout You can adjust
voicemail_detection_timeout_ms
to control how long voicemail detection runs. The minimum value is 5,000 ms (5 s) , maximum is 180,000 ms (3 minutes) , and default is 30,000 ms (30 s) . [(1) ]() Increasing this value gives the system more time to detect voicemail greetings before stopping detection. Voicemail Option Configuration You can configure
voicemail_option
to define what action to take when voicemail is detected (hangup or leave a message) . The call will try to detect voicemail in the first 3 minutes of the call.
Copy code
json
{  
  "action": {  
    "type": "static_text",  
    "text": "Please give us a callback tomorrow at 10am."  
  }  
}
Enable Voicemail Detection Set
enable_voicemail_detection
to
true
. Note that this feature is only available for phone calls. Unfortunately, the available documentation doesn't provide additional methods for improving greeting detection accuracy beyond these configuration options. For more advanced voicemail detection capabilities, you may want to explore your telephony provider's answering machine detection features (like Twilio's Async AMD) . Check out these potentially useful sources: - [Update Voice Agent]() - [Handle voicemail]()
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy I am making calls to multiple countries, US, Canada, UK, 7 to 10 countries in the European region. I want to set up SIP trunk for that. Just want to understand where are retell servers located so that I can set up the SIP server accordingly, which will help me with latency. @User @User @User
a
Thanks for the follow-up, @Demigod0007. I'll get back to you soon.
### Answer ### Answer The available documentation doesn't specify the geographic locations of Retell's SIP servers. However, here's what we know: Retell SIP Server Details - SIP server URI:
sip:sip.retellai.com
[(1) ]() - IP block for traffic:
18.98.16.120/30
(All regions) ,
143.223.88.0/21
(United States only) ,
161.115.160.0/19
(United States only) - Some non-US traffic might go from IPs not listed above, but will be migrated to the first IP block by 12/03/2025 Transport Methods Supported - TCP (Recommended) - UDP - TLS For Latency Optimization with Twilio If using Twilio SIP trunking, you should use a localized termination URI near your region. You can expand and view your localized URIs in the Twilio console. [(2) ]() General Latency Considerations Deploying AI models closer to the customer's location (edge computing or regional hosting) is one strategy for latency optimization. [(3) ]() For specific server location details to optimize your multi-region setup, I'd recommend reaching out to Retell directly: - [Contact Sales]() - [Retell AI GitHub]() Would you like a general answer on SIP trunking best practices for multi-region deployments?
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) [[2] Twilio](https://docs.retellai.com/deploy/twilio) [[3] Latency](https://www.retellai.com/glossary/latency) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Demigod0007. I'll get back to you soon.
d
@AI Evy share support team email, so I can get better info
a
### Answer You can contact Retell AI support at support@retellai.com [(1) ]() [(2) ]() For sales-related inquiries, you can also visit [Contact Sales]() [(3) ]() When reaching out, it can be helpful to share your Org ID (found in the bottom left of your dashboard under account settings) so the team can look into your account directly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.