Gilang
05/05/2025, 5:43 AMhooks: [
{
on: "call.ending",
do: [
...(number
? [
{
type: "transfer",
destination: {
type: "number",
number
}
}
]
: []),
{
type: "function",
messages: [
{ type: "request-complete" }
]
}
]
}
]
sample Call ID: 79d23f5a-94a0-4a43-befd-cd66e403cd66 & 72c9e0b0-f599-478a-be57-dc6154d2de9a
Could you help us to properly adjust the code for Goodbye Messages and transfer call agents. Thank You
cc @ivy
https://cdn.discordapp.com/attachments/1368825463681712128/1368825463962603570/Screenshot_from_2025-05-05_12-37-09.png?ex=6819a18e&is=6818500e&hm=38ac2a3878af9d64455fb63a68a57509e62e9e38b8c6cf36b2bd9766be5073ac&
https://cdn.discordapp.com/attachments/1368825463681712128/1368825464268918807/Screenshot_from_2025-05-05_12-39-37.png?ex=6819a18e&is=6818500e&hm=a3a59a26252d9fadb37b0dc60bda6f4bccc77af16011c3b65b82d58e1477bcae&Vapi Support Bot
05/05/2025, 5:45 AMjavascript
hooks: [
{
on: "call.ending",
do: [
{
type: "message",
content: "Thank you for calling. Have a great day!"
},
...(number ? [
{
type: "transfer",
destination: { type: "number", number }
}
] : []),
{
type: "function",
messages: [{ type: "request-complete" }]
}
]
}
]
This ensures the goodbye message is spoken before any transfer or call completion occurs.Sahil
05/05/2025, 4:42 PM