MehXBot
12/16/2025, 5:39 AMAI Evy
12/16/2025, 5:39 AMAI Evy
12/16/2025, 5:39 AMAI Evy
12/16/2025, 5:39 AMAI Evy
12/16/2025, 5:39 AMMehXBot
12/16/2025, 11:45 AMAI Evy
12/16/2025, 11:45 AMAI Evy
12/16/2025, 11:45 AMAI Evy
12/16/2025, 11:46 AM#📒・feature-requests channel. [(1) ]()AI Evy
12/16/2025, 11:46 AMMehXBot
12/16/2025, 11:48 AMAI Evy
12/16/2025, 11:48 AMAI Evy
12/16/2025, 11:48 AMlast_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:
{{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) ]()
---AI Evy
12/16/2025, 11:48 AMAI Evy
12/16/2025, 11:48 AMMehXBot
12/16/2025, 11:52 AMAI Evy
12/16/2025, 11:52 AMAI Evy
12/16/2025, 11:53 AM{{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:
{{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.
---AI Evy
12/16/2025, 11:53 AMAI Evy
12/16/2025, 11:53 AMMehXBot
12/16/2025, 11:53 AMAI Evy
12/16/2025, 11:53 AMAI Evy
12/16/2025, 11:54 AMlast_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:
{{last_node}} == "collect_email"
{{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) ]()
---AI Evy
12/16/2025, 11:54 AMAI Evy
12/16/2025, 11:54 AMMehXBot
12/16/2025, 11:55 AMAI Evy
12/16/2025, 11:55 AMAI Evy
12/16/2025, 11:56 AM{{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?AI Evy
12/16/2025, 11:56 AMAI Evy
12/16/2025, 11:56 AMMehXBot
12/16/2025, 12:06 PMAI Evy
12/16/2025, 12:06 PMAI Evy
12/16/2025, 12:06 PMAI Evy
12/16/2025, 12:06 PMAI Evy
12/16/2025, 12:06 PMlast_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:
{{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) ]()MehXBot
12/17/2025, 11:04 AMAI Evy
12/17/2025, 11:04 AMAI Evy
12/17/2025, 11:04 AMJSON.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?AI Evy
12/17/2025, 11:04 AMAI Evy
12/17/2025, 11:04 AMMehXBot
12/17/2025, 11:05 AMMehXBot
12/17/2025, 11:05 AMAI Evy
12/17/2025, 11:05 AMAI Evy
12/17/2025, 11:06 AM{{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) ]()
{{questions}} exists
{{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) ]()AI Evy
12/17/2025, 11:06 AMAI Evy
12/17/2025, 11:06 AMMehXBot
12/18/2025, 5:50 PMAI Evy
12/18/2025, 5:50 PMAI Evy
12/18/2025, 5:50 PMvoicemail_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.
---AI Evy
12/18/2025, 5:50 PMAI Evy
12/18/2025, 5:50 PMMehXBot
12/19/2025, 9:51 AMAI Evy
12/19/2025, 9:51 AMAI Evy
12/19/2025, 9:52 AMvoicemail_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.
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]()AI Evy
12/19/2025, 9:52 AMAI Evy
12/19/2025, 9:52 AMDemigod0007
12/20/2025, 4:15 PMAI Evy
12/20/2025, 4:15 PMAI Evy
12/20/2025, 4:16 PMsip: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?AI Evy
12/20/2025, 4:16 PMAI Evy
12/20/2025, 4:16 PMAI Evy
12/20/2025, 4:25 PMDemigod0007
12/20/2025, 4:25 PMAI Evy
12/20/2025, 4:25 PMAI Evy
12/20/2025, 4:25 PMAI Evy
12/20/2025, 4:25 PM