I think this code will result in a JSON response being sent to sprout containing both a server name and a (possibly empty) list of server capabilities. Is this what you meant?

The API (https://github.com/Metaswitch/homestead/blob/readme/docs/homestead_api.md) says we either send server name OR server capabilities. Does sprout expect there to sometimes be both?

Same comment below for on_lir_response.