Qatar, a US ally and neighbour of Iran, has acted as a back-channel mediator and helped secure the June ceasefire that briefly led to a cessation of hostilities.