How to identify in the events table that conversation has ended

There is no conversation end event. Rasa has a session timeout value that you can configure (I think 60m is the default) but it will not create an end of conversation when this timeout is exceeded. That value is used when the same user (session_id) restarts. At that point, it determines if a new session should be started in which case the prior session slot values will not be used.