Ok I try to make an example.
I have my fusionpbx with some domain configured, one domain is called demodomain. I set a dns mypbx.virtualpbx.com to response with ip of my fusionpbx server.
So when I make a device I set extension, in server I set demodomain, in proxy I set mypbx.virtualpbx.com and...