Avesta
04/02/2025, 9:52 PMVapi Support Bot
04/02/2025, 9:54 PMjson
{
"message": {
"type": "assistant-request",
"call": { Call Object }
}
}
While I couldn't find explicit details on accessing the extension, the [documentation](https://docs.vapi.ai/api-reference/calls/update) does show that extension fields exist within the system (in "fallbackDestination" and "customer" objects), suggesting that extensions are properties that can be accessed.
To implement your use case, you would:
1. Configure your phone number with assistantId
set to null
and specify your serverUrl
as mentioned in the [SIP documentation](https://docs.vapi.ai/advanced/sip)
2. When a call comes in, Vapi will send the assistant-request event to your server
3. Your server code would need to examine the call object to extract the extension
4. Based on the extension, return the appropriate assistant configuration using the format shown in the [server events documentation](https://docs.vapi.ai/server-url/events):
json
{
"assistant": {
"firstMessage": "Hello, how can I help you today?",
"model": {
"provider": "openai",
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You're an assistant for..."
}
]
}
}
}
Do you have any other questions about implementing this workflow?
Sources:
- [Server URL Events Documentation](https://docs.vapi.ai/server-url/events)
- [API Reference Calls Update](https://docs.vapi.ai/api-reference/calls/update)Vapi Support Bot
04/02/2025, 9:54 PMVapi
04/06/2025, 9:20 AM