Hi there
while config show InternalInterface | grep IPAddress may indeed work, it is rather too distro-centric to put into the mainline, at least without some further work. As far as possible, we try to keep the mainline to vanilla Linux so it will run anywhere. For individual installs you can just override $localip with a real address and you're done. You can either do it for each phone extension or copy/create your own custom template.
Best
S