When we switched from Time Warner's cable based VOIP to PhonePower's VOIP ($35/year) using an Obihai ATA at our Adirondack cottage, our rural number could not be ported to them since they did not have access to the Frontier rate center that controlled our number. Rather than lose the number, we found out that Verizon could port the number, so we had it ported to my wife's cell phone instead.
When a number is ported, it does not actually leave the originating carrier's rate center. If the new carrier does not have access to the original rate center, either directly or through a third-party service, the number cannot be ported. Small rural rate centers belonging to smaller carriers are the most problematic in that regard. More technical porting details can be found
here.