Samesh
09/22/2024, 5:13 AMSamesh
09/22/2024, 5:14 AMVapi
09/22/2024, 5:14 AMVapi
09/22/2024, 5:14 AMVapi
09/22/2024, 5:14 AMVapi
09/22/2024, 5:14 AMSamesh
09/23/2024, 5:36 PMShubham Bajaj
09/23/2024, 5:41 PMSamesh
09/24/2024, 6:12 AM919ba550-efd8-4ad1-ab66-afbfd08a0864
You can check the call recording / transcripts, the assistant visibly stops (pause of 1 sec) after everytime I try sending a background message (role: system).Sahil
09/24/2024, 8:13 AMSahil
09/24/2024, 8:13 AMSahil
09/24/2024, 8:13 AMSahil
09/24/2024, 8:13 AMSamesh
09/24/2024, 8:25 AM/call which requires a phone number? But I am only want to use the web call (no phone calls)
b) Is this step required? Because I am using the vapi npm library(web SDK) and I start the call from that so I am not sure how I would continue the call (through the SDK) even after the POST request to /call endpoint. So, I want to understand how can I retrieve the controlUrl of a call if I start it through the web SDK (.start() method)? Does that method return this data?
c) I understand that you probably imply me to use the call control API as given in this example (https://docs.vapi.ai/calls/call-features#example-injecting-a-message). Is the expected format for the query to inject background similar like so:
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
-H 'content-type: application/json'
--data-raw '{
type: "add-message",
message: {
role: "system",
content: "The user has pressed the button, say peanuts",
},
}'
?
d) And if this format is correct, how is call control API different from the web SDK's .send() method https://docs.vapi.ai/assistants/background-messages#scenario-overview used in background messaging ? Does that mean that the background messaging is not currently working right now?Samesh
09/24/2024, 8:25 AMSamesh
09/24/2024, 8:26 AMSahil
09/24/2024, 8:32 AMSahil
09/24/2024, 8:32 AMSahil
09/24/2024, 8:33 AMSamesh
09/24/2024, 8:34 AMSamesh
09/24/2024, 9:30 AM.start() method) but I got the response as job not found.
curl -X POST "https://aws-us-west-2-production2-phone-call-websocket.vapi.ai/ced7d70b-804b-4e34-9f7a-4842fc84ef10/control" \
-H "content-type: application/json" \
--data-raw "{\"type\": \"say\", \"message\": \"Welcome to Vapi, this message was injected during the call.\"}"
Am I missing something?Sahil
09/24/2024, 9:35 AMSahil
09/24/2024, 9:35 AMSamesh
09/24/2024, 9:36 AMSamesh
09/24/2024, 9:37 AMSamesh
09/24/2024, 9:40 AMSamesh
09/24/2024, 10:18 AMSahil
09/24/2024, 1:32 PMSamesh
09/24/2024, 1:32 PMSahil
09/24/2024, 1:35 PMSamesh
09/24/2024, 1:37 PMSamesh
09/25/2024, 2:29 AMSahil
09/25/2024, 8:43 AMSahil
09/25/2024, 8:44 AMSahil
09/25/2024, 8:44 AMSamesh
09/25/2024, 10:35 AMSamesh
09/25/2024, 1:13 PMwindow.vapiSDK.run
b) Then get the controlURL through (await vapiInstance.start(assistantId))["monitor"]
["controlUrl"];
To test this on the link:
a) Click on "Start Vapi" button. It starts a web call and logs the control URL of that call on the page
b) Copy the control url and send a request using the live call control feature (while the call is active on the web page). You will get error as "job not found"
Example request:
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
-H 'content-type: application/json'
--data-raw '{
"type": "say",
"message": "Welcome to Vapi, this message was injected during the call."
}'Samesh
09/25/2024, 1:16 PMSahil
09/25/2024, 1:42 PMSahil
09/25/2024, 1:42 PMSahil
09/25/2024, 1:42 PMZigzagToYou#0504
09/25/2024, 6:56 PMSamesh
09/25/2024, 8:28 PM.send() isn't working?Samesh
09/25/2024, 8:29 PMSamesh
09/25/2024, 8:31 PM.send() is buggy and it is not fixed right?ZigzagToYou#0504
09/26/2024, 5:15 AMSamesh
09/26/2024, 5:29 AM.send() actually work as intended tho, i.e, sending background messages? Because if I send a message with type as system or assistant, that interrupts my assistant every time. The ideal way I assume this should work is that it just adds whatever I send to the context of the conversation without the assistant even stopping the flow of the whatever it was speaking. Currently, it always stops the assistant for atleast 1 sec.
b) Yes. I am experiencing 404 job not found problem as you have stated. @Sahil can you pls check this again? Looks like live call control isn't working as stated in the docs. Can you pls check with the team and give a complete solution? Thanks!Sahil
09/26/2024, 7:34 AMSahil
09/26/2024, 7:34 AMSamesh
09/26/2024, 7:35 AMSamesh
09/26/2024, 7:36 AMZigzagToYou#0504
09/26/2024, 7:52 AMZigzagToYou#0504
09/26/2024, 7:52 AMSamesh
09/26/2024, 8:01 AM.send() API. You will observe that the assistant ALWAYS stutters & then restarts what it was already going to say when you send that background update (the update is successful because you can check that in the transcripts).
Lmk how I can help you better because I want to get this issue resolved ASAP, it's already taken too long for my company. TIAZigzagToYou#0504
09/26/2024, 8:15 AMSamesh
09/26/2024, 8:16 AMZigzagToYou#0504
09/26/2024, 8:19 AMSamesh
09/26/2024, 8:19 AMjob not found error. That's just there to help @Sahil and team debugZigzagToYou#0504
09/26/2024, 8:20 AMSahil
09/26/2024, 10:04 AMSahil
09/26/2024, 10:04 AMSahil
09/26/2024, 10:04 AMSahil
09/26/2024, 10:04 AMSahil
09/26/2024, 10:04 AMZigzagToYou#0504
09/26/2024, 10:13 AMSamesh
09/26/2024, 11:02 AM.send() feature which wasn't working before too.
I want to use Background Messaging!! I want to silently insert a system message into the chat history, not make the assistant speak it!
Can you please connect me to someone else from the team? We were considering to upgrade to enterprise plan at Vapi if our POC works, but if this is the kind of support I am going to get, I don't think I want to anymore.Samesh
09/26/2024, 11:03 AMShubham Bajaj
09/26/2024, 12:26 PMSamesh
09/26/2024, 12:28 PMSamesh
09/26/2024, 6:46 PMSamesh
09/26/2024, 6:54 PMSamesh
09/27/2024, 8:38 AMSamesh
09/28/2024, 3:56 AM