Resident visa expires automatically, if one stays out of the country for over six months. But it is possible to extend this period upto 12 moths by paying an additional fee of around 500QR. I think you should have done this before the expiry, but not sure whether you can still apply for a extention now.