I know that you can register new SIP peers by creating peers in the sip.conf file. in the following manner -:
[sip-peer-name]
[sip-peer-attributes]
And then doing a sip reload. But how do I unregister them ? If I unregister them how do I re register them again ?
The sip unregister command may force a peer to unregister but then how do I re register it ?
I can also add a SIP provider by
register=>username:password@provider.domain
but how do I unregister myself from SIP provider from the Asterisk cmd line. And again how do I re register ?
One more question, once my provider and peers are registered then what happens if I go to my sip.conf and delete all the peers and the provider registration lines manually and do a sip reload ?
I know that will un register them, but will it cause any problems with my provider ?
Note:
The reason I am asking to unregister SIP providers and peers is because my PBX is on the Amazon EC2 cloud and my public IP keeps changing every time I start my server. Once everything is setup I will buy a static IP which will prevent repeated registering.