problem with hardware serial, not with altsoftserial

Code snippets here don't work. You need to post all of your code, and describe how the hardware is connected. If you simply changed Serial for AltSoftSerial, without changing any hardware, nothing is going to work.

Using AltSoftSerial, or any software serial, on the hardware serial pins does not make sense.

	Serial.flush();

What is this doing, and why are you using it? I'd hazard a guess that 99.99% of all uses of the flush() method are wrong or unnecessary.