Peel onions and garlic, and dice. Wash chili pepper, then slice open and remove seeds. Wash chili pepper again and finely dice. Heat olive oil in a big pot and lightly braise the onions, garlic, and chili. Deglaze with vermouth and add tomatoes with liquid. Mash tomatoes with a wooden spoon. Pour in cream and season with salt and pepper. Let it simmer for 10-15 minutes.
For the pesto, wash herbs, shake dry, and chop them coarsely. Chop walnuts. Puree herbs, walnuts, and olive oil in a hand blender and season to taste with salt and pepper. Coarsely chop up the cranberries and fold into mixture.
Puree soup until smooth. Again, season to taste with salt and pepper and serve with the pesto.