Heat the oil in a large flameproof casserole dish or saucepan over a medium-high heat. Fry the onions with a pinch of salt for 7 mins, or until softened and just caramelised. Add the garlic, chilli and ras el hanout, and cook for 1 min more.
Stir in the squash and lentils. Pour over the stock and season to taste. Bring to the boil, then reduce the heat to a simmer and cook, covered, for 25 mins or until the squash is soft. Blitz the soup with a stick blender until smooth, then season to taste. To freeze, leave to cool completely and transfer to large freezerproof bags.
Stir in the coriander leaves and ladle the soup into bowls. Serve topped with the dukkah, yogurt and extra coriander leaves.