https://retellai.com/?utm_source=discord&utm_medium=seo logo
Webhook response different from docs
# ❓・bug-report
p
Hi
Copy code
{'event': 'call_started', 'call': {'call_id': 'call_4a73d15d0ba18578f63cbb63b00', 'call_type': 'phone_call', 'agent_id': 'agent_a364366bb9118dfd13543a5c73', 'agent_version': 0, 'agent_name': '(philip test)', 'collected_dynamic_variables': {'current_agent_state': 'introduction_service_verification_preferred_date_time'}, 'call_status': 'ongoing', 'start_timestamp': 1757599526056, 'public_log_url': 'https://dxc03zgurdly9.cloudfront.net/dbd99d8b14c53a56c32bca3e3d60b19b1af2ad492ef59a97fac045b888cbbe78/public.log', 'latency': {}, 'call_cost': {'total_duration_unit_price': 0, 'product_costs': [], 'combined_cost': 0, 'total_duration_seconds': 0}, 'opt_out_sensitive_data_storage': False, 'data_storage_setting': 'everything', 'from_number': '+14169120859', 'to_number': '+18705227311', 'direction': 'inbound'}}
this is the example webhook i got if i want to set dynamic variable what is the response payload i should reply?
I try reply with { "call_started": { "dynamic_variables": { "customer_name": "John Doe" }, "metadata": { "random_id": "12345" } } } i tested the agent in retell dashboard using simulation but i dont see any dynamic variable being set in call_ended
o
Hello @phmedme ,you should respond with this format , but for the inbound webhook, not the call started https://docs.retellai.com/features/inbound-call-webhook#inbound-call-webhook
p
but i didnt get inbound webhook call_inbound
i only got call_started call_ended and call_analysed
o
to get the inbound webhook you need to put your webhook at the phone number level.
not the agent level
p
ah ok
o
then you will get a inbound webhook before each call
p
ok
is inbound webhook and call even webhook can use same url?
o
that is up to you , we will send you the requests on your server you can handle them as you want.
p
this inbound webhook should be called first before call started right?
because i want to use it for setting dynamic variable
call event webhook like call started will have all dynamic variable i set from inbound webhook right?
o
you will get the inbound webhook before the call start you can respond to with the variables you want to set and it will be accessible through the call.