https://retellai.com/?utm_source=discord&utm_medium=seo logo
could you provide an example of using a transition...
# ❓・ai-evy-support
r
@AI Evy could you provide an example of using a transition based on {{user_number}} ?
a
Thanks for tagging me @Reed. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Here's an example of using
{{user_number}}
in a transition condition for Conversation Flow: Equation-based transition example: [(1) ]() You can check if the user's phone number exists using:
Copy code
{{user_number}} exists
Or check if it doesn't exist:
Copy code
{{user_number}} does not exists
String comparison example: You can also compare against specific phone numbers:
Copy code
{{user_number}} == "+1234567890"
Or check if the number is in a list:
Copy code
"+1234567890, +0987654321" CONTAINS {{user_number}}
Important troubleshooting note: [(2) ]() If you're experiencing issues where
{{user_number}}
transitions aren't working as expected, try adding the variable directly in a static message (like
{{user_number}}
) to verify it's being populated correctly. This helps confirm the variable is available before using it in transition conditions. For inbound calls, system variables like
{{user_number}}
should be automatically available. [(4) ]()
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] {{user_number}} does not work in Conversation Flow](https://discord.com/channels/1186424376300679209/1428211380930220042) ​
r
@AI Evy I have a static node with {{user_number}} being read as "user underscore number" instead of the from_number variable which should be default - why is this ?
a
Thanks for the follow-up, @Reed. I'll get back to you soon.
b call. Recommended fix: Instead of using a static sentence with
{{user_number}}
, try using a prompt-based approach in your Conversation Node where you instruct the agent to mention the caller's number, allowing the LLM to naturally incorporate the variable value. [(4) ]() If the issue persists after trying these approaches, the variable may not be properly set for your specific call type or configuration.
### Answer The issue you're experiencing where
{{user_number}}
is being read literally as "user underscore number" instead of being replaced with the actual phone number value suggests the variable isn't being properly recognized or hydrated in your Conversation Flow. [(1) ]() Common causes and solutions: 1. Variable hydration timing issue - Dynamic variables, including system default variables like
{{user_number}}
, may not be immediately available when the call starts. [(2) ]() The variable needs to be "hydrated" (loaded into memory) before it can be used. 2. For static sentences in Conversation Nodes - When you set a static sentence that includes
{{user_number}}
, the agent should automatically replace it with the actual value. [(3) ]() If it's reading it literally, this indicates the variable isn't being recognized. 3. Troubleshooting steps from the community: [(4) ]() - Change your first message to use a prompt instead of static text, and include the variable in the prompt instruction - This allows the LLM to dynamically generate speech that incorporates the variable value - Review the call transcription to verify whether the variable is actually being populated 4. Verify the call type -
{{user_number}}
represents the user's phone number and should work for phone calls (for inbound calls, it's the `from_number`; for outbound calls, it's the
to_number
) . [(1) ]() Make sure you're testing with an actual phone call, not a we
​ To learn more, see the sources I considered: [[1] Discord message from @q40478 on 2025-10-19](https://discord.com/channels/1186424376300679209/1186462578310910112/1429479310925758515) [[2] Discord message from @q40478 on 2025-10-30](https://discord.com/channels/1186424376300679209/1186462578310910112/1433471315293110413) [[3] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[4] {{user_number}} does not work in Conversation Flow](https://discord.com/channels/1186424376300679209/1428211380930220042) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy I've set a dynamic variable in the custom function mocks and am testing a prompt node to read out {{user_number}} on a test web call - however it's reading out the actual error message.
a
Thanks for the follow-up, @Reed. I'll get back to you soon.
### Answer The issue you're experiencing is expected behavior.
{{user_number}}
is a system default dynamic variable that's only available for phone calls, not web calls. [(1) ]() For phone calls: - **Inbound calls**:
{{user_number}}
represents the
from_number
- **Outbound calls**:
{{user_number}}
represents the
to_number
Since you're testing on a web call,
{{user_number}}
doesn't exist in that context, which is why the agent is reading out an error message instead of a phone number value. To test dynamic variables on web calls: You can configure test variables and function mocks in the LLM Playground. [(2) ]() When you save a test case, you can specify dynamic variables to be used during testing. This ensures consistent results across test runs without calling actual functions. Recommendation: If you need to test
{{user_number}}
functionality, you'll need to test with an actual phone call (inbound or outbound) rather than a web call, since this variable is specific to the phone call context. **
​ To learn more, see the sources I considered: [[1] Discord message from @noahreis on 2024-11-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1308171340859183164) [[2] Automatically test your agent](https://docs.retellai.com/test/llm-simulation-testing) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy provide an example of how phone numbers could be blacklisted from calling an AI agent
a
Thanks for the follow-up, @Reed. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation about implementing phone number blacklisting directly within Retell AI's platform. However, you could implement blacklisting using the inbound webhook feature. When a phone number is configured, you can set an
inbound_webhook_url
that receives call information before the agent answers. [(1) ]() [(2) ]() Here's the concept using the phone number configuration:
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
  inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
  nickname: 'Frontdesk Number',
  inbound_webhook_url: '<https://example.com/inbound-webhook'>
}) ;
[(2) ]() Your webhook endpoint at ` would receive the incoming call details (including the caller's number as
from_number
) , check it against your blacklist, and either: - Return configuration to proceed with the call normally - Return a configuration that rejects/ends the call immediately The
inbound_webhook_url
allows you to override agent settings and set dynamic variables for specific calls, [(1) ]() which gives you the control point needed to implement blacklisting logic in your own system. Would you like me to try providing a more general approach to implementing this pattern, even though it's not explicitly documented in the Retell AI sources? **
​ To learn more, see the sources I considered: [[1] List Phone Numbers](https://docs.retellai.com/api-references/list-phone-numbers) [[2] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.