I am not familiar with this setup but i believe there is a misunderstanding. on linksys it seems like you are trying to register to freepbx while on freepbx you are trying to register to linksys. I dont think there is nothing wrong with that but probably this is your problem…
So what i believe is just remove the PSTN line config from linksys and let freepbx be UAC and send the register request. Then take your pcaps and see if it still responds with 501.
Also 501 means that the UAS sending the 501 doesnt understand the request that UAC sent which is register here.