"Travelling" is not wrong and "Travelling" vs "Traveling" is a "British English" vs "American English" thing as well-explained in the linked Wikipedia article:
The British English doubling is used for all inflections (-ed, -ing,
-er, -est) and for the noun suffixes -er and -or. Therefore, British English usage is cancelled, counsellor, cruellest, labelled,
modelling, quarrelled, signalling, traveller, and travelling.
Americans typically use canceled, counselor, cruelest, labeled,
modeling, quarreled, signaling, traveler, and traveling.
I think the linked article, "Why do some words have double consonants while others have only one?" seems to be a good starting point. You have to get yourself familiarized with all those examples.
It is important to note that, in two-syllable words such as happening or entering, etc.
If the stress is on the first syllable, the word gets only one
consonant + -ing.
"Travelling" is an exception. There is no rule but has some exceptions.
This is more or less correct, but in most of your examples a native English speaker doesn’t hear these as their voiceless counterparts because the preceding vowel is longer than it would be if the consonant was its "voiceless" counterpart.
“I have two” = [a͡ɪː hæːf tu]; it’s not pronounced the same as “I haff to”, where the middle vowel would be short (or “clipped”).
English "voiced" plosives /b d g/ (and the affricate /d͡ʒ/) tend to be most strongly voiced when they are between two other voiced sounds—vowels, semivowels, or sonorant consonants such as /l r m n/—and least strongly voiced when they are next to voiceless obstruents such as /p t k tʃ s ʃ f θ/. (I think it is impossible for "voiced" plosives to be surrounded on both sides by voiceless obstruents.) However, the exact degree of voicing given to these sounds varies between speakers. The key things that differentiate /b d g/ from /p t k/ are that /p t k/ are aspirated at the start of a stressed syllable, and that vowels are "clipped"--which means that they are phonetically shorter--before a "voiceless" phoneme.
Transcription notes
Some people don’t like to transcribe the consonant found in contexts like "have two" with the symbol “f” because even though it is voiceless (or mostly voiceless), it is also “lenis”, a vague word that I think in the context of voiceless fricatives is mostly related to the length of friction ("lenis" fricatives are shorter than "fortis" ones). Rather, they transcribe it with the "v" symbol along with a "voiceless" ring diacritic: [v̊]. So "I have two" would be something like "[a͡ɪː hæːv̊ tu].
The difference in pronunciation between "vegetable" and a hypothetical "vetchtable" isn't as obvious to me, maybe because this is a polysyllabic word, or maybe because the consonant involved is /d͡ʒ/. Nonetheless, I would recommend pronouncing vegetable as [ˈvɛːd̥͡ʒ̊təbl̩] rather than as [ˈvɛt͡ʃtəbl̩].
Special circumstances where a voiced fricative is truly replaced with its voiceless counterpart
There are a few special phrases where a historically voiced fricative is truly turned into its "voiceless" counterpart phoneme. One of these is "have to", in the sense "must". This is pronounced the same as "haff to" for many speakers, with /f/ instead of /v/. We also see this with /s/ instead of /z/ in "has to", "used to" and "supposed to". And I've heard that this can occur for some speakers inside some historically compound words, such as "newspaper": Merriam-Webster lists a pronunciation with /s/ as well as a pronunciation with /z/. But these are exceptions, not the rule.
Best Answer
To expand on the other answers, you will find that some American English pronunciation of consonants is different from that of British English. For example, the Ts in butter are pronounced distinctly as Ts in the UK (buht-er), but just the same as Ds in America (buh-der). Note that both of these pronunciations use only one consonant sound, not two.
An audial example can be heard at 01:52 in this video.