Registration Error

I try registering a SIP phone and I point to it a Dynamic IP (Ex. The server in which I host my PBX is located at that IP and it wont register. But when I point it to a local IP (Ex., everything is fine and it registers…
I have my port forwarding set to UDP 5060-5061 and 10000-20000 too.
Is it something under my Asterisks SIP settings?
Thanks in advance

Not sure how to answer your question properly, however this is going to be a problem later.
If your dynamic IP keeps changing your SIP settings will always be wrong which will require you to change it by hand constantly. You need to get a fixed IP number.
In respect to the reference, is the server and the phone in the same location and you are trying to connect to the external IP?

I managed to fix the issue. It was directly in Asterisks SIP Settings.