yonnigm
03/11/2025, 6:38 AMVapi Support Bot
03/11/2025, 6:40 AMsquadCall
method rather than the regular assistant call method. Here's how:
1. **Install the SDK**:
bash
npm install @vapi-ai/web
2. **Initialize the SDK**:
javascript
import Vapi from "@vapi-ai/web";
const vapi = new Vapi("your-public-key");
3. **Create a squad call**:
javascript
const squadMembers = [
{ type: 'assistant', id: 'assistant_id' }, // The assistant to initiate the call
{ type: 'destination', number: '+1234567890' } // Destination phone number
];
vapi.squadCall(squadMembers)
.then(response => {
console.log('Call initiated successfully:', response);
})
.catch(error => {
console.error('Error initiating call:', error);
});
The first member should be an assistant who will initiate the call [VAPI Integration Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/1333667779039203380).
Be aware of some known issues with squad web calling:
- Call transfer issues between agents in a squad
- Voice selection problems specific to squads
- Webhook call inconsistencies
- Function call errors
Since web calling works when using the "talk with squad" button in the dashboard, it suggests the squad configuration itself is correct. The issue might be in how you're implementing the SDK call. Double-check your API key, assistant IDs, and make sure you're using the correct method for squad calls.
Let me know if you need any clarification or run into specific errors!
Sources:
- [Vapi Web SDK Documentation](https://docs.vapi.ai/sdk/web)
- [VAPI Integration Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333667779039203380)yonnigm
03/11/2025, 6:55 AMShubham Bajaj
03/12/2025, 7:43 PMts
vapi.start(null, null, <insert-your-squad-config-here>)
@yonnigm you need to pass the squad config as third parameter to the start method. Let me know if you need any clarification on any part of this integration, or if you'd like more specific details about any aspect of the configuration.giorgior27
03/22/2025, 11:34 PMKings Big
03/23/2025, 11:20 AMgiorgior27
03/23/2025, 11:25 AMgiorgior27
03/23/2025, 11:25 AMKings Big
03/23/2025, 11:33 AM