endCallFunction sends 2x end-of-call-reports
# support
j
I've noticed when the Assistant ends the call, we get double the call reports.
v
message has been deleted
@Jotham I'm sorry to hear that you're experiencing an issue with duplicate call reports. Let's try to resolve this. Could you provide me with more details about the circumstances under which this happens? For instance, does it occur every time a call ends, or only under specific conditions? Any additional information you can provide will help me assist you better.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
c
You need to turn off one of options in the assistant if it is in the dashboard.
j
Sorry I don't understand. I am using the API for this and have end-of-call-report in my serverMessages. If I end the call myself, it sends a single report to my server. If the assistant says its endCallPhrase, is immediately sends an end-of-call-report, then another one 5 seconds later
c
Yo should be able to select the specifin function out of all them (for contenxt i do everything API and not dashboard)
j
Hmm I still don't get you. I think its a bug from Vapi, rather than a config fix. I have setup end-of-call-reports correctly, and receive these as expected. (When the user presses the hang up button). The bug is when the AI decides to end the call. It says the endCallPhrase which terminates the Vapi connection (as expected) but it leaves a 3 second pause before actually terminating the phone call connection. This results in a report getting sent when the Vapi connection ends, and a second report when the phone call connection ends.
s
Can you send me the call_id @Jotham
j
Sure I will make a fresh one 1 sec
s
Thanks!
j
@Sahil Have you guys changed the payload structure when trying to fetch assistants from serverUrl? const customerNumber = req.body.message.call.customer.number; ^ TypeError: Cannot read properties of undefined (reading 'number') Was working fine last night
s
Yeah, we did you can get the num via message->customer->num
j
Fixed, Just ran a call then - 66a76d7b-64f8-4354-ac81-1fa18f6df96b It said the endCallPhrase, which ended the vapi connection instantly, but then the phone connection was still live for another 5 seconds. It sent a second end of call report when the phone connection was terminated
s
As per i can see, only one Server message was sent. šŸ”µ 10:49:47:540 Server Message Requested... Can you record a loom video and sent it to me?
j
sent you the vid in dm's