Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: compsos on January 23, 2014, 02:04:33 AM
-
Hi
We have seen this on a few systems where the $localip in the template files returns -1 instead of the IP address. As systems do not change networks very often putting the IP address in the template is not a big deal.
But a cosmetic issue occurs on the System Info box in Globals
The $localip comes from line 536 in php/sarkglobal/view.php but as the templates are producing the same result the issue must be deeper.
Has anyone else seen this and have a cure?
<span style="color: #696969;" ><span style="font-weight:bold; font-size:small; ">Sysinfo</span><br />Serial #: <strong>534341</strong><br/>Release #: <strong>4.0.0-103 </strong><br/>Web Server: <strong>Apache</strong><br/>Browser: <strong>Firefox</strong><br/><span style="font-weight:bold;
font-size:small; ">Network</span><br />hostname: <strong>server</strong><br/>LAN IP: <strong>-1</strong><br/><span style="font-weight:bold;
font-size:small; ">Hardware</span><br />System Media: <strong>disk</strong><br/>Disk Usage: <strong>1%</strong><br/>RAM Size: <strong></strong>
<br/>RAM Free: <strong></strong><br/><span style="font-weight:bold; font-size:small; ">Status</span><br />PBX State: <strong>RUNNING</strong>
<br/>SysTime: <strong>10:43:02 </strong><br/>
-
SAIL expects eth0 to hold the localip. It's likely on the systems where you've seen this issue that eth0 isn't being used. Check with ifconfig or ip addr.
Kind Regards
S
-
Jeff
I think you are right. We have added OpenVPN to some systems because the standard vpn is unrealiable. OpenVPN creates a br0 that holds the IP address. Will recheck and see if the issue follows OpenVPN. Is there some code that can be adaptive to sensing the LocalIP? Maybe the 'config show InternalInterface | grep IPAddress' is correct.
-
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
-
i've added a note to the development list to suppress display if it doesn't get a valid IP.
Best
S
-
Thanks S
So there is no where else in Sail that is dependent on the $localip variable, just the sys info box?
-
Yes, it is used by the provisioning system so you'll need to override it in your provisioning files if you use them. It isn't used anywhere else as far as I know.
Kind Regards
S
-
S
saw this in the updates to ver9
- Do not hardcode NIC names to eth0 and eth1.
- Return nic names in probeAdapters so we can drop HWAddress.
- Remove HWAddress prop from interfaces.
- Remove the "swap interface" feature.
NIC names maybe more dynamic in 9?