Remove deprecated function and call on hangup