Since its not possible to apply for a second visa while you have one you have to exit the country for a short period for the company which is going to sponsor you to apply for the residency visa.