Trigger a tool when call is idle
# support
l
I would like to trigger a tool when my assistant ask something to the user but the user does not respond in the following 10 seconds. I tried updating the prompt with a "Silent Handler" section, a "Idle Handler" section, updating the conversation flow specifying to wait for 10 seconds and if there is no answer, then trigger a function, but nothing seems to work for me. I also tried to set some idle messages and updating the prompt to trigger a tool when any idle message is triggered. Is there a way to set a tool to be executed before finishing the call by the reason "silence-timed-out"? Here is a callId that may be helpful: 84935f84-6e77-4bdb-a587-dea59c8572d7
v
Thanks for your question about triggering a tool when a call is idle in Vapi. I understand you want to execute a tool when a user doesn't respond within 10 seconds, before the call ends due to "silence-timed-out". To help you better, could you share: 1. Which specific silence timeout parameters are you currently using in your configuration? (For example, what values do you have set for
silenceTimeoutSeconds
or
machineDetectionSilenceTimeout
?) 2. Have you tried implementing custom endpointing rules as mentioned in [this gist](https://gist.github.com/bajajcodes/cd664c81344ef9f27a4d304de43bd313)? If so, what was the result? 3. Could you share the specific tool configuration you're trying to trigger during silence? Is it set as asynchronous (
async: true
)? 4. Are you using a custom LLM or the default Vapi LLM configuration? This information would help me provide a more targeted solution for your specific setup. Source: - [Custom endpointing rules gist](https://gist.github.com/bajajcodes/cd664c81344ef9f27a4d304de43bd313)
l
1.- I don't use machineDetection. My silenceTimeoutSeconds is 30 2.-I am not using custom endpointing rules. I don't know how will this help me, as my problem is that the user doesn't respond and the assistant doesn't seem to do any action until the user says at least 1 word. 3.- This is the tool configuration: { type: 'function', function: { name: 'UserRequestedHelp', strict: true, description: 'This tool will be executed when the user request help, when the user does not answer or when we don\'t understand what the user said.' }, messages: [ { type: 'request-start', content: requestHelpMessage } ], server: { url:
XXXXX
, headers: { 'x-api-key': 'XXXXX' } } } 4.- I am using the default Vapi LLM configuration
v
Hey! To help track down this issue, could you share: - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!