chunkey
05/15/2024, 10:45 AMVapi Support
05/15/2024, 10:45 AMVapi Support
05/15/2024, 10:45 AMassistant-request
and function-call
endpoints. This allows you to handle interactions and transfer logic dynamically [(2)]() , [(3)]() .
To illustrate, here's an example of creating an assistant with a specific configuration programmatically:
json
{
"transcriber": {
"provider": "deepgram"
},
"model": {
"provider": "openai",
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You're a support assistant for Vapi. Help with customer queries."
}
]
},
"voice": {
"provider": "azure",
"voiceId": "en-US-JennyNeural"
},
"firstMessage": "Hello, how can I assist you today?",
"recordingEnabled": true
}
Vapi Support
05/15/2024, 10:45 AMPhone Numbers
API.
2. **Attach the Assistant**: Dynamically attach the assistant to handle inbound calls using the assistant-request
endpoint [(1)]() .
If you're seeing issues with connecting the inbound calls through Twilio, ensure the correct JSON response structure is being sent back from your server as it might be causing the assistant to not attach properly [(4)]() .Vapi Support
05/16/2024, 8:15 AMsudoer
05/16/2024, 8:21 AMWhen condition X is met, use the transferCall function with this phone number: +1123123123.
When condition Y is met, use the transferCall function with this phone number: +1123123141.
I referred to the call forwarding document https://docs.vapi.ai/call_forwarding. Vapi mentions an option called forwardingPhoneNumbers
, but I'm unable to implement it in our code. Can you suggest how to use this option?Sahil
05/16/2024, 10:09 AMsudoer
05/16/2024, 11:02 AMsudoer
05/16/2024, 1:46 PM