An agreement would end more than 15 months of fighting that has destabilised the Middle East.