Public IP change after restart

Hi,

I have implemented Asterisk SIP server & I am able to make call using Android SIP UA.
The problem is when the DSL modem restart, the public IP changes & the same need to be modified in the SIP UA so that UA can do the registration again.

How can we avoid changing SIP server public IP in SIP UA again & again ?
Is it possible to configure a SIP URI ? If yes, how will the SIP server URI & new public IP mapping happen.

Kindly share the detailed procedure,

Thanks !!
BR///Ankush Makkar

A fixed ip-address would be the best. Normally your ISP can provide that for a small cost.

Else you can make an dns record like sip.mycompany.com that resolves to the ip-address of your modem. But then you still have to change the DNS-record after each reboot of the modem instead of the Android-cliënt. And you can have a delay between changing the record and the propagation to the dns-server that your android sends his queries to.

Or you could use a service like no-ip.com that automaticly catches the change of the ip-address and changes the dns-record.

Cheers,
Tom

If you browse the forum you will see that may people have problem with this setup. When the public IP address changes, Asterisk experiences network problems and needs to be restarted.

The only smart thing to do, if you want to run Asterisk on a public IP, is that you get yourself a STATIC IP address. Servers are made to run on static IP address-es.

One more thing if you want to run Asterisk on a public IP - think long and hard about SECURITY. Harden your system, so yo don’t have abuse and big bills from the telephony provider for calls that you did not do.