https://retellai.com/?utm_source=discord&utm_medium=seo logo
what are the voicemail options configuration in ap...
# ❓・ai-evy-support
r
@AI Evy what are the voicemail options configuration in api
a
Thanks for tagging me @ruta1212_29251. I'll look through relevant sources and get back to you shortly.
### Answer The voicemail configuration in the Retell AI API uses the
voicemail_option
object [(1) ]() [(2) ]() [(3) ]() [(4) ]() . When set, the call will attempt to detect voicemail in the first 3 minutes of the call . The
voicemail_option
object contains an
action
field that defines what happens when voicemail is detected . You can set this to
null
to disable voicemail detection . Here's an example configuration:
Copy code
json
{
  "voicemail_option": {
    "action": {
      "type": "static_text",
      "text": "Please give us a callback tomorrow at 10am."
    }
  }
}
[(1) ]() , [(2) ]() Important deprecation note: The original voicemail detection settings
enable_voicemail_detection
and
voicemail_message
are still supported in the API until 6/30/2025, after which they will be deprecated [(5) ]() . The
voicemail_detection_timeout_ms
setting has been removed as it's no longer needed by the system .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy what is the way to turn off voicemail
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer To turn off voicemail detection in Retell AI, set the
voicemail_option
field to
null
[(1) ]() [(2) ]() [(3) ]() [(4) ]() . Here's an example:
Copy code
json
{
  "voicemail_option": null
}
[(1) ]() [(4) ]() This disables voicemail detection for the agent . When voicemail detection is disabled, the system will not attempt to detect voicemail during calls [(5) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
setting it to null throws MongooseError: Operation
configurations.findOne()
buffering timed out after 10000ms
@AI Evy
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer The
MongooseError
you're encountering is not related to Retell AI's API—it's a database timeout error from your own application's MongoDB/Mongoose connection [(1) ]() . When you set
voicemail_option
to
null
in the Retell AI API, this is the correct way to disable voicemail detection . The error suggests your application is having trouble communicating with its own database when trying to save or retrieve this configuration. To resolve this: 1. Check your MongoDB connection and ensure it's properly established before making Retell AI API calls 2. Verify your database query timeout settings in your Mongoose configuration 3. Ensure your database server is running and accessible The
voicemail_option: null
setting itself is valid for the Retell AI API . The issue is with your application's database layer, not with Retell AI's service. If you continue experiencing database timeout issues, you may want to review your Mongoose connection settings and increase the
bufferMaxEntries
or adjust timeout configurations in your application code.
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
how to set hangup on voicemail
@AI Evy
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer To configure your agent to hang up when voicemail is detected, you need to set the
voicemail_option
object with an action type of
"hangup"
[(1) ]() . According to the documentation, you can choose one of two voicemail behaviors: hang up or leave a message . When you select hang up, the agent will disconnect when it detects a voicemail . Based on the API structure shown in the sources, here's the configuration format:
Copy code
json
{
  "voicemail_option": {
    "action": {
      "type": "hangup"
    }
  }
}
[(2) ]() , [(3) ]() The system will run voicemail detection continuously within the timeout period (first 3 minutes of the call) [(1) ]() . When hang up is selected, the system will disconnect the moment it detects a voicemail . You can configure this either when creating a new agent or updating an existing agent through the API [(2) ]() , [(3) ]() .
​ To learn more, see the sources I considered: [[1] Handle voicemail](https://docs.retellai.com/build/handle-voicemail) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy how do i pass request data, such as variables, with create call?
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer To pass dynamic variables when creating a call, use the
retell_llm_dynamic_variables
field in your API request [(1) ]() [(2) ]() . All values must be strings [(3) ]() [(1) ]() . For Phone Calls:
Copy code
json
{
  "from_number": "+14157774444",
  "to_number": "+12137774445",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe",
    "product_name": "Premium Plan",
    "account_status": "active"
  }
}
[(1) ]() For Web Calls:
Copy code
json
{
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  }
}
[(2) ]() These variables can be referenced in your agent's prompts, begin message, tool configurations, and other settings using the
{{variable_name}}
syntax [(3) ]() . For example, you could use
{{customer_name}}
in your greeting: "Hello {{customer_name}}, thanks for calling!" . You can also update dynamic variables during an active call using the Update Call API with the
override_dynamic_variables
field [(4) ]() .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Create Web Call](https://docs.retellai.com/api-references/create-web-call) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[4] Update Call](https://docs.retellai.com/api-references/update-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy why would create call endpoint fail on dev environment and succeed in local? the environment keys are the same
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer [(1) ]() , [(2) ]() ### Answer I don't have specific information in the sources about environment-specific failures for the create call endpoint. However, based on the available documentation, here are the most common causes when the same API keys work in one environment but not another: Common Phone Number Issues: The
from_number
must be properly configured in your Retell AI account [(2) ]() [(3) ]() . Even with the same API keys, if your phone number isn't properly set up for outbound calls in your dev environment's Retell account, you'll get failures [(4) ]() [(3) ]() . Verify your phone number has an
outbound_agent_id
configured
[(3) ]() :
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
 inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 nickname: 'Frontdesk Number',
 outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
Check your request parameters: Ensure you're using the correct parameter names : - Use
override_agent_id
instead of
agent_id
- Use
retell_llm_dynamic_variables
instead of
custom_data
Other potential differences: - Network connectivity or firewall rules in your dev environment - Different phone number configurations between environments - Account-level permissions or features enabled in one environment but not the other If the issue persists, I'd recommend checking: - That your phone number is purchased/imported in both environments [(2) ]() - Your agent configuration exists in the dev environment - Network access to
api.retellai.com
from your dev environment **
​ To learn more, see the sources I considered: [[1] SDKs](https://docs.retellai.com/get-started/sdk) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Here is how that can be fixed](https://retell.discourse.group/t/here-is-how-that-can-be-fixed/23) [[4] 404 Error on Create a Phone Call](https://retell.discourse.group/t/404-error-on-create-a-phone-call/22) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy how much content can you pass to retell_llm_dynamic_variables?
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] How can I create an outbound call](https://retell.discourse.group/t/how-can-i-create-an-outbound-call/132) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer ### Answer I don't have specific information in the available sources about size limits or maximum content length for
retell_llm_dynamic_variables
[(1) ]() [(2) ]() . The documentation confirms that all values in
retell_llm_dynamic_variables
must be strings , and provides examples of passing variables like customer names and other contextual data [(1) ]() [(2) ]() [(3) ]() . However, there's no explicit mention of character limits, payload size restrictions, or maximum number of variables you can include. What we know: - All values must be strings [(1) ]() [(2) ]() - Variables are injected into prompts, tool descriptions, and other agent configurations [(1) ]() - They're passed as key-value pairs in JSON format [(2) ]() [(3) ]() Example format:
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe",
    "product_name": "Premium Plan"
  }
}
[(2) ]() For specific size limits or best practices around large amounts of data in dynamic variables, you may want to reach out to Retell AI support directly: - Visit [Contact Sales]() - Visit [)