Triggering tool call when call is answered
# support
j
Is there a way to trigger a call when user picks up the phone os at some point at the beginning of the conversation? I've tried everything prompting and in the tool description but the AI never triggers the function unless the user tells it to send the sms (function is to send an sms to the user speaking)
v
@Juaní To trigger a call or an action like sending an SMS at the beginning of a conversation, you would typically need to set up an event listener or a webhook that responds to the "call answered" event. However, in the context of VAPI, you would need to configure your voice application logic to perform an action when the call is connected. If you want to send an SMS when the call is answered, you would need to implement this logic within the call flow of your voice application. This might involve setting up a specific trigger within your assistant's configuration that automatically sends an SMS when the call is connected. Unfortunately, without direct access to the VAPI configuration or the specific tools it offers for such automation, I cannot provide a precise method to achieve this. If VAPI has a function to send an SMS, you would need to call that function at the appropriate time in the call flow. If you need further assistance with setting this up, please provide more details about the tools and options available within VAPI, or you may need to ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
@Juaní set the first message mode to
assistant-speaks-first-with-model-generated-message
and use prompting to trigger the tool call as very instruction. Do let me know how it goes.
j
@Shubham Bajaj I coded a custom code to trigger it when i receive the status update. The problem is that it gets triggered on voice mail as the voice mail detector doesn't work properly. I tried your approach but it doesn't work, it doesn't trigger the tool until the user specifically says so
s
@Juaní could you share the call id so i can take a look?
2 Views