In the "Change State" handler, the character header property "state" will contain one of the following values: "active", "reconnecting", "failed", or "closed".
Setting up a change-state handler is optional. If not done, the default is to not notify the application of state changes.