It could be the drain itself,have you checked that at all?
Ok it sounds like your pump works when it wants to. I would look for a loose wire connection on the pump itself also you can take a meter and see if your getting the prope volts going to the pump which is 120 volts. If your not nervous around volts you can do this yourself but if you are the best would be to get a tech. If you do get a tech tell him/her to look at the pump itself. It also could be the control board not sending the proper volts to the drain pump. I dont think so though but them are your options.
Please press the accept button this is how im paid for helping you today. Thanks.