Cancelling Calls
# support
m
Hello! I'm having a hard time figuring out how to cancel the call using the server SDK (typescript) First I tried to call the endCall but I figured out that it was just for the bot to end the conversation when the user asks. I'm trying to have a button on my platform which upon clicking would cancel the call or hang up if the call was in progress. I also tried the abort functionality but somehow it wasn't working for me. What would be my best solution to end or abort a call on click?
v
@Mistermanu#000 Hello! It sounds like you're looking to programmatically end a call from your platform with a button click. To achieve this, you would typically use a method provided by the server SDK that sends a request to the server to terminate the call. Since you've mentioned that you're using TypeScript, you'll want to ensure that you're calling the correct method associated with the server SDK you're using. If the
endCall
method is not working for you, and the
abort
functionality isn't either, it's possible that there might be an issue with how you're implementing the call or there might be a need to check the SDK documentation for the correct method to use. Unfortunately, without specific details about the server SDK you're using, I can't provide a precise code example. However, I can suggest the following general steps: 1. Review the server SDK documentation for methods related to ending or aborting calls. 2. Ensure that you have the correct permissions and that your server is authenticated to make such requests. 3. Implement the method as per the SDK's instructions, typically involving an API call to the server with the call's identifier. 4. Attach this method to the button's click event handler in your platform's front-end code. If you're still having trouble, please provide more details about the server SDK you're using or check the documentation for the specific method to end a call. If there's a support channel or community forum for the SDK, that might also be a good place to seek further assistance. Remember to handle any errors or exceptions that may occur when attempting to end the call, and provide feedback to the user if the action was successful or not. If you need more detailed assistance, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
m
Can you re-explain to me how you would use the endCall function to make a call to end the conversation or dialing using the server SDK? @User
v
Got it. Tagging @User for additional help.
m
@User Can you re-explain to me how you would use the endCall function to make a call to end the conversation or dialing using the server SDK?