You haven’t specified which SIP channel driver is in use (chan_sip or chan_pjsip) so it’s hard to answer. That being said within a Call-ID it doesn’t matter. The Call-ID is just a globally unique string which identifies the call, the IP address is added to add a bit more uniqueness.
I’m still using chan_sip driver. From the time I have changed IP address I also updated my Asterisk version from 1.8 to 15.3. This is very interesting where this IP is remembered?
just checked that earlier, I have only this in /etc/hosts :
127.0.0.1 localhost mypbx.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.30.1.50 mypbx