https://retellai.com/?utm_source=discord&utm_medium=seo logo
I need some help with the call inbound webhook
# ❓・ai-evy-support
c
@AI Evy I need some help with the call inbound webhook. I have a ruby on rails app and i'm returning {"call_inbound"=>{"dynamic_variables"=>{"christmas"=>"false", "new_years_day"=>"false", "out_of_office"=>"false", "should_end_call"=>"false", "found_user"=>"true", ... } } but it's not working? Any reason why this would happen? I've not changed anything
a
Thanks for tagging me @Ciaran. I'll look through relevant sources and get back to you shortly.
### Answer Your webhook response structure looks correct for the inbound webhook format [(1) ]() . The
call_inbound
wrapper with
dynamic_variables
inside is the expected format . A few things to check: 1. Response Status Code Your webhook must return a successful 2xx status code . If it doesn't, Retell will retry up to 3 times, and if all attempts fail, it will try to connect using the default inbound agent (if set) or disconnect the call . 2. All Values Must Be Strings All values in
dynamic_variables
must be strings [(2) ]() . Your example shows
"false"
and
"true"
as strings, which is correct. Numbers, booleans, or other data types are not supported . 3. Check for Null Values If any dynamic variable contains
null
, all variables may be ignored [(3) ]() . Make sure none of your values are
null
. 4. Verify JSON Format The error "dynamic variables must be an object that's key value pairs of strings" indicates the JSON structure may not be valid [(4) ]() . Ensure your Ruby hash is being properly serialized to JSON. Debugging Steps: - Check your call history for the specific call ID and look for error messages in the disconnect reason [(1) ]() - Verify the webhook is returning a 2xx status - Test your JSON output with a validator to ensure it's properly formatted - Check that no values are
null
or non-string types If the webhook fails, you should see
error_inbound_webhook
as the disconnection reason in your call history [(3) ]() .
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] The call connects despite the fact that Inbound Call Webhook returns an error](https://discord.com/channels/1186424376300679209/1343523617744486511) [[4] Dynamic Variables Not Returning To The Agent](https://discord.com/channels/1186424376300679209/1347902728617328741) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy It's because everything you have to return has to be a string and not an integer 🙂
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer --- Glad you figured it out! You're absolutely correct—all values in
dynamic_variables
must be strings [(1) ]() . Numbers, booleans, or other data types are not supported . In Ruby on Rails, make sure you're converting any integers, booleans, or other types to strings before returning them in your webhook response. For example:
Copy code
ruby
{
  call_inbound: {
    dynamic_variables: {
      user_id: user_id.to_s,  # Convert integer to string
      is_active: is_active.to_s,  # Convert boolean to string
      name: name  # Already a string
    }
  }
}
This ensures compatibility with Retell's inbound webhook requirements [(2) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Another thing, my agent transcribes 'prescription' with 'subscription' sometimes? Is there a way to fix that? I've got it down as 'Optimized for speed'.
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer To fix transcription errors where "prescription" is being transcribed as "subscription", use Boosted Keywords [(1) ]() [(2) ]() . Add "prescription" to your agent's
boosted_keywords
array to bias the transcription model toward recognizing this specific term [(1) ]() [(3) ]() .
Copy code
json
{
  "boosted_keywords": ["prescription"]
}
[(3) ]() You can add up to 100 custom keywords [(1) ]() . This is particularly useful for domain-specific terms like medical terminology . Additionally, since you mentioned your agent is set to "Optimized for speed", consider switching to Optimized for accuracy if transcription quality remains an issue . You can control this with the
stt_mode
setting [(3) ]() [(4) ]() :
Copy code
json
{
  "stt_mode": "accurate"
}
If background noise isn't a major factor, you might also try adjusting the
denoising_mode
setting to preserve more audio signal, which can improve accuracy for certain words [(1) ]() [(3) ]() [(4) ]() .
​ To learn more, see the sources I considered: [[1] Increase transcription accuracy](https://docs.retellai.com/reliability/wrong-transcript) [[2] Transcription error with elevenlabs voice leading to hang up!](https://discord.com/channels/1186424376300679209/1384897111514153000) [[3] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[4] 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.
c
@AI Evy One last thing... We have global nodes and then I have a transiiton of 'The user understands', I ask a question, it then jumps to the begin node? I noticed this a lot that it just jumps to begin.
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer I don't have specific information about why your Conversation Flow is jumping back to the begin node when using global nodes with a "The user understands" transition. However, a few general things to check in your flow setup: 1. Transition Logic Verify that your transition conditions are specific enough. If the condition "The user understands" is too broad, the LLM might trigger it unintentionally when the user responds to your question. 2. Global Node Behavior Global nodes are accessible from any point in the conversation. If your global node has a transition back to begin, or if the transition conditions overlap with other paths, it could cause unexpected jumps. 3. Edge Priority Check if there are competing transitions that might be evaluated before your intended path. The order and specificity of your transition conditions matter. Debugging Steps: - Review your call transcripts to see what the user said that triggered the jump - Check if the transition condition is being met unintentionally - Verify that your global node's exit transitions are configured correctly - Test with more specific transition conditions Would you like a general answer based on my knowledge about conversation flow design, or would you prefer to check out these resources? - [Conversation Flow]() - [Documentation]()
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.