About Public and private ip registration

Hi, this is Sopnill and I have 3 asterisk server in my 3 offices situated in different locations in my country and each asterisk server connecting some phone (hard and soft both) and they are running well internally and individually. Now I want to connect those asterisk server with each other for this resone I have take a vps with public ip and installed asterisk on that vps but I am failling to register my 3 asterisk server (dynamic ip) with my vps. Can any body informed me how to register a public ip with dynamic ip?

It is not clear what you are doing, but you should look at stunaddr, externip, and externhost parameters. Also consider whether you can use a static address.