Peel the ginger and garlic and cut into thin slices. Extract the seeds from the cardamom pods and put with the fennel seeds into a wiped-out coffee grinder or a pestle and mortar. Grind fairly finely. Cut open the chillies under running water, discard the seeds and stem and chop the flesh finely. Cut the salmon into 2.5-5cm/1-2in chunks. Cut off the base of the fennel bulbs, remove any marked outer parts, cut in half lengthways and then into thick slices. Peel the onions and slice thinly.
Melt 75 g/3 oz of the butter in a large, heavy-based saucepan, add the onions and cook over a low heat, stirring now and then, until the onions are soft. Add the ginger, garlic, ground spices and chillies. Add the remaining butter and, when melted, add the sliced fennel. Stir around to coat with the butter. Then stir in the flour and gradually add first the lemon juice and grated rind and then the milk. Bring to the boil, stirring all the time, and bubble, still stirring, until the sauce is very thick. Season to taste with sea salt. Remove from the heat, leave until cool, then fold in the salmon pieces.
Preheat the oven to 240°C/475°F/gas mark 9. Cut the top off the pumpkin with a very sharp knife and reserve. Use a big spoon with sharp edges to scoop out the seeds and the stringy interior, leaving only the firm, orange flesh. Spoon the salmon mixture into the pumpkin, put into a roasting pan and put the top back on the pumpkin. Smear the pumpkin skin all over with sunflower oil and put into the oven. Bake for 25-30 minutes, then reduce the heat to 180°C/350°F/gas mark 4 and cook for another 45 minutes-1 hour, until the pumpkin flesh feels very soft right through when you insert a sharp knife. Using a wide spatula and holding the pumpkin with a cloth, carefully lift it from the roasting pan on to a large, round serving plate. To serve, scoop out the salmon filling and the pumpkin flesh.