WRT your query regarding session management and call disconnection. This could be achieved using the accounting plugin and dial-plan plugin features provided in V2 upwards.
Another note, when you are relaying media, consider that the type of media and packet size really matters. You may want to decline media that is G.711 or only allow G.729 / iLBC. You can use &net. ...