Not Working with Squad
# support
s
I am trying to run Vapi using Squadkey but Getting this error {action: 'error', errorMsg: 'Meeting has ended', error: {…}, callFrameId: '17199452136990.358359718185689'}action: "error"callFrameId: "17199452136990.358359718185689"error: details: undefinedmsg: "Exiting meeting because room was deleted"type: "no-room"[[Prototype]]: ObjecterrorMsg: "Meeting has ended"[[Prototype]]: Object var vapiInstance = null; const squad = "429a44a3-9fca-4224-9c3d-11aaf19827ed"; const apiKey = "8ead3148-738a-4bcd-b45d-592c3df52c7e"; (function (d, t) { var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.src = "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js"; g.defer = true; g.async = true; s.parentNode.insertBefore(g, s); g.onload = function () { console.log("Script loaded"); vapiInstance = window.vapiSDK.run({ apiKey: apiKey, // mandatory squad: squad, // assistant // config: buttonConfig, // optional }); // Ensure vapiInstance is initialized before setting up event listeners vapiInstance.on('speech-start', () => { console.log('Speech has started'); }); vapiInstance.on('speech-end', () => { console.log('Speech has ended'); }); vapiInstance.on('call-start', () => { console.log('Call has started'); }); vapiInstance.on('call-end', () => { console.log('Call has stopped'); }); vapiInstance.on('volume-level', (volume) => { console.log(
Assistant volume level: ${volume}
); }); // Function calls and transcripts will be sent via messages vapiInstance.on('message', (message) => { console.log(message); }); vapiInstance.on('error', (e) => { console.error(e); }); }; g.onerror = function () { console.error("Failed to load Vapi script."); }; }) (document, "script");