How can I reduce noise errors when detecting DTMF with the Goertzel algorithm?
One technique to reject noise is to use the ratio of the Goertzel filter output power to the total signal power over the same 40 mS sliding time windows, as well as ratio of the absolute Goertzel power to some threshold, as part of your decision criteria.  

You can adjust your buffer size to match this minimum DTMF signal time (2048 may be too long if the sample rate is well below 44.1kHz).  Using a non-rectangular window may require using a longer Goertzel filter than 40 mS.  Adjusting the Goertzel filter length to be close to an integer number of periods of the filter's center frequency will also help reject DC.  

Added:
Using a sliding Goertzel (and sliding RMS power) will reduce the effects of framing.