sorvani / freepbx-helper-scripts

Assorted scripts and files that work with FreePBX
GNU General Public License v3.0
68 stars 27 forks source link

ContactManager_to_Yealink_AddressBook no longer able to pull contacts #25

Open BrendanTCC opened 1 month ago

BrendanTCC commented 1 month ago

ContactManager_to_Yealink_AddressBook/cm_to_yl_ab.php is no longer able to pull contacts from ContactManager as of FreePBX 17 with the way it's currently configured.

It's now triggering the below:

Whoops\Exception\ErrorException thrown with message "Undefined variable $username"

Stacktrace:

4 Whoops\Exception\ErrorException in /var/www/html/admin/libraries/gui_auth.php:21

3 Whoops\Run:handleError in /var/www/html/admin/libraries/gui_auth.php:21

2 require in /var/www/html/admin/bootstrap.php:275

1 require_once in /etc/freepbx.conf:12

0 require_once in /var/www/html/contacts/contacts_friends.php:49

To me it looks like something I'll need to chase up with Sangoma/the FreePBX community to poke at, and if I knew how the hell to fix this, I would, but figured I'd raise this for someone to poke at anyway.

chewy-chewbacca commented 3 weeks ago

I'm interested too in an updated version that's 17 compatible. Thanks Jared - appreciate all your contributions

francinum commented 1 week ago

From experimenting, simply slipping $bootstrap_settings['freepbx_auth'] = false; in before pulling in freepbx.conf seems to patch things up just fine,

chewy-chewbacca commented 1 week ago

Seems to work! I initially got an error, but then realized that I had two of the same names contact groups (maybe from the 16 restore). Once I removed one of the dupes, this worked perfectly.