ChangeLog
# support
g
Can anyone help me to implement Ending Events Call. We need to implement endCallMessage and its not works. so we see this changelog and adjust our code. After the call we got burst request to our webhook with type Tool Calls. this is our req in Update agent endpoint API.
Copy code
hooks: [
  {
    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&
v
To implement a proper goodbye message before ending or transferring the call, modify your hook to include a message action before the function call:
Copy code
javascript
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.
s
Hi Gilang, I'm looking at your call ending implementation issue, but I need more details to provide an effective solution. Could you please: 1\. Explain your specific use case in more detail - what's the full user journey? 2\. Share your complete agent configuration, not just the hooks section 3\. Describe exactly what "not works" means - any error messages, unexpected behaviors? 4\. Clarify what you mean by "burst request to our webhook" - how many requests, what's in them? 5\. Detail what solutions you've already attempted based on the changelog 6\. Share the complete webhook logs for one of those sample call IDs The more specific you can be about what's happening versus what you expect to happen, the better I can help troubleshoot your implementation.