I’d like to run Asterisk behind NAT with a dynamic public IP address. Probably the easiest way is to edit external_media_address and external_signaling_address after each IP change. The problem is that I’d have to restart the daemon which could interrupt active internal calls.
Hence I tried to use siproxd as the outgoing SIP proxy. Fundamentally it worked fine, at least while testing with Linphone. Unfortunately, Asterisk uses the outgoing_proxy URI as the REGISTER URI, but siproxd cannot extract the real host for forwarding. Linphone sends its REGISTER query with the real host as the URI.
REGISTER sip:realsiphost.com SIP/2.0
REGISTER sip:siproxd.com SIP/2.0
I thought about two Asterisk instances, one for internal calls and the other for outgoing purposes which I can restart regardlessly (in case of an IP change).
Has anyone a better idea?