Using a macro for 'register'

Our configuration keeps changing. I want to use a macro for the IP address of the remote peer asterisk server.


register => remote_switch:welcome@${REMOTE_IP}/me_here

but it doesn’t work. Is there a way to set this up so I can just change the IP in one place and all my *.conf files use it?


As you’ll need to use a callback extension for this to work at all, use the callbackextension method of registering and set the authentication and host data in a template.

Thanks for the pointer. I don’t see how setting a callbackextension would solve this.
Any chance I can get an example? The documentation says the callbackextension is at the end of the command.

The example is in documentation (sip.conf.sample).

Why dont you use host file and use domain name instead of IP

Okay that worked… this has to be one of those ‘DAAAHHH’ moments.