Chat command for custom WDE

Hi at all!
I’ve two new questions :stuck_out_tongue:
Which commands I must use for intercept the release call event from the customer and the close chat event from the agent?
It’s not clear into the developer guide 8.5 :-\

Thank you so much