SIP Regester

Why do some devices register to a different port from what i have programmed.

can you be more specific

I programmed device to register on 5060 but it shows it registered on port 50000 in freepbx

That is an issue you need to take up with the phone manufacturer, although I would note that I would not expect them to provide any control over the contact port number. The configuration you used will control the address of record port number, and without that being valid, you would not have seen it listed as registered on FreePBX, at all.