• Welcome to SAIL Community Supported PBX . Please login or sign up.
 
April 29, 2024, 07:08:39 PM

News:

SMF updated to 2.0


Mac address rejected

Started by compsos, June 17, 2023, 05:06:13 AM

Previous topic - Next topic

compsos

Hi S
PBX release: 16.28.0
SAIL Release: 6.2.0-16+deb10u1
HPE Release: 6.0.0-9

If I add and extension using 249AD82AB0FA as the mac it says it is invalid, but if I add 001565.... it works. Both are Yealink phones.
Maybe a clue, it is a system where I restored the backup from ver5 and all extensions bar the 2 that start with 249AD8... came across.
Do we need to update the DB with the OUI?

compsos

OK Edited the /opt/sark/www/sark-common/manuf.txt file and added a line for that manufacturer. So now get the "mac already exists"
Looking in the IPphone table in the DB, both extensions that use 24:9A:D8 macs are there but do not display in extensions screen. I reset the system to factory and reapplied a backup and still the same failure.
Any clues as to why the phones with those macs would not add or display?

sysadmin

July 28, 2023, 05:39:43 PM #2 Last Edit: July 28, 2023, 06:43:11 PM by sysadmin
Apologies for the late reply.  We've been moving offices and it took longer than we planned.  Anyhow, we're settled now.  I just did a from scratch install of Ubuntu 22.04 on a VM here.  It appears that our MAC/Manufacturer source is giving problems.   I'll address it with some haste and come back to you.  Thanks for calling this in to us.

sysadmin

July 31, 2023, 12:04:24 AM #3 Last Edit: July 31, 2023, 11:42:10 AM by sysadmin
OK, I think we have a fix for this.  We're testing it in source at the moment but you can try it too if you wish.  There are two modules you need to change. 

The first module is /opt/sark/scripts/getmaclist.  Take a copy of it and save it somewhere safe.  Now open the module in your favorite editor and completely replace the existing code with this new code:-

#!/bin/sh
# get a list of macs amd manufacturers from IEEE
#

[ ! -e /opt/sark/www/sark-common/manuf.txt ]  && touch /opt/sark/www/sark-common/manuf.txt
chown www-data:www-data /opt/sark/www/sark-common/manuf.txt
curl -L -s "http://www.sailpbx.com/sail/public/manuf.txt" > /tmp/manuf.txt
ret=$?
if test "$ret" != "0"; then
     logger SARKgetmaclist - **** Link fail - Could not fetch new manufacturer MAC DB ****
     exit 4
fi   

if [ -s /tmp/manuf.txt ]; then
        diff /opt/sark/www/sark-common/manuf.txt /tmp/manuf.txt
        if [  "$?" -ne "0" ] ; then
                mv /tmp/manuf.txt /opt/sark/www/sark-common/manuf.txt
                logger SARKgetmaclist - updated manufacturer MAC DB
        else
                logger SARKgetmaclist - manufacturer MAC DB up to date
        fi
else
        logger SARKgetmaclist - **** Could not fetch new manufacturer MAC DB ****
fi

Next you must make a small change to /opt/sark/php/sarkextensions/view.php

At, or around, line 1956 you should find the following line

$short_vendor_cols = explode($delim,$vendorline,3);

You should replace this line with...

$short_vendor_cols = preg_split('/\s+/',$vendorline,3);

That's the changes done.  Now you can run the maclist...

sudo rm /opt/sark/www/sark-common/manuf.txt
sudo sh /opt/sark/scripts/getmaclist.sh

You should now have a new file in /opt/sark/www/sark-common/manuf.txt.  It will look a little different to the MAC list you used to have.

Now go ahead and add your new Yealink.  It should be picked up OK.

Let me know how this works for you.

compsos

Thanks S
That solved the issue.
Are you planning on drooping Debian as a base OS?

sysadmin

September 07, 2023, 03:17:09 AM #5 Last Edit: September 07, 2023, 03:25:57 AM by sysadmin
No, I don't think we'll drop it.   It's difficult to know for now what will happen with Debian 12 and Asterisk.  I suspect it will come back in 13 and someone will do a backport to fetch it into 12 but that's just a guess so we'll have to see.

I've just tidied up the 6.2 installer for Ubu 22.04 and Deb11 and it looks OK.  You will see this appear as 6.2.0-34 or 35.   These will be the last few releases for 6.2 and it will move into maintenance as we begin to roll out 6.5 over the next few months. 

I've also been playing around with a 64bit arm install for RaspberryPi.   You've always been able to install sark on the 64 bit Pi but we've put up a ready-to-run image here:-

http://www.sailpbx.com/sail/raspi-arm-64-img/

Download it and burn it onto a microSD card with the RaspberryPi imager and it should just run on any Pi 4. 
N.B.  The image inflates to about 7.6Gb do you'll need a micro SDcard of at least 8Gb.

SSH creds are

UID sark
PWD sarkadmin

The front-end browser is just the same as always.

UID admin 
PWD sarkadmin