Phonebooks processing

Hello,
I’ve installed the phonebooks addon, created a new phonebooks for external contacts, downloaded the csv schema, created my phonebooks csv file and uploaded.
I’ve then copied and pasted the phonebook url and pasted inside my fanvil phone. The contacts show up, but only with one phone number as it seems that the vitalpbx phonebook refuses to upload, even the schema seems to support it, the csv file with more phone numbers (at least 3: “phone,mobile_number,home_number”).
So I managed to create the csv with only one phone number … not optimal but it works.
Now the main problem is that opening the phone book from vitalpbx, it never end processing it and ends without showing me neither a single contact.
I’ve tryied to export the csv file … and all the contacts are there.
I suspected that something went wrong removing the an old address book and for this reason I tryied to uninstall and reinstall the addon, but without luck.
What I should try to do to fix this problem?
Thank-You very much.
Firefox_Screenshot_2021-07-28T10-17-23.026Z

Hi, @technosherpa,

When you say that VitalPBX refuses to upload, you refer that the system doesn’t allow you to upload a CSV with 3 numbers?

What makes me confuse is that you said that your Fanvil Phone shows a single phone number, but then you say that it never end processing it.

Are you using the latest version of VitalPBX and the phonebook add-on?

What Fanvil model are you using?

What O.S and Browser are you using?

Could you attach the CSV you are trying to upload to your PBX?

Hi Miguel,
I apologize to haven’t been enough clear. I will try to explain better:
if I create a new phonebook on VitalPBX and populate it uploading a csv file with more phone numbers, like this:

“first_name”,“last_name”,“phone”,“mobile_number”,“home_number”,“organization”,“job_title”,“email”
“Vi”,“Ing. Sc”,"+390000000008","+393000000003",
“Yu”,“Ma”,"+39393310000014","+39393310000024","+39393310000034",“G Sys S.r.l.”,“tecnico@hisdomain.info”

and then I connect this new address book to my Fanvil IP phone using the url of that VitalPBX phonebook (in this case “https://pbx.mydomain.it/phonebook.php?pb=KE3d8hORb”), the Fanvil IP Phone shows the two contacts but only with one phone number, the first of the three uploaded.
I suspected something wrong with VitalPBX and I have then downloaded the phonebook clicking on the “Export contacts” on the bottom left part of the VitalPBX phonebook page, just to check if all the phone numbers were populated, and I’ve discovered that VitalPBX discarded the second and the third phone numbers. This is the downloaded (exported) csv phonebook:

first_name,last_name,phone,mobile_number,home_number,organization,job_title,email
Vi,“Ing. Sc”,+390000000008,
Yu,Ma,+39393310000014,“G Sys S.r.l.”,tecnico@hisdomain.info

This excludes that is a Fanvil problem.

Regarding the “never end processing” I’m referring to the VitalPBX phonebook interface: if I select the phonebook from the right menu (list), VitalPBX loads the page and populate it with the general details, but it won’t to show me the contacts uploaded: it shows, just below the “contacts” section title, a centered box with “Processing” (take a look at the just uploaded snapshot).

Regarding the VitalPBX version, I’ve just upgraded to the last available version 3.1.0-1 (see snapshot) and the phonebook version is 3.0.2-3 (see snapshot).

Regarding the Fanvil phones, are different models (x201, x3u …), but all are not showing more than one phone number (and I would say: of course … as the export demonstrated that the second and third phone number have been discarded …).

I’m using clients with windows 10 O.S. and I’ve tested the problem with firefox, edge and chrome.

Thank-You very much for Your help.

phonebook-version
version
never_ending_processing
test.csv (257 Bytes)
phonebook-20210730-115432.csv (180 Bytes)

I’ve tested the phone book issue in a brand new installation, and I am unable to reproduce the issue.

Hi Miguel,
it worked for me once as well: then I removed the phonebook and recreated it … and it never worked again.
I’suspecting that is DB related (it’s a sensation … I could be wrong). I’ve already tryied to uninstall and reinstall the phonebook add-on but without luck.
There is, in Your opinion, a way to solve the problem?
Thank-You.

@technosherpa,

I did the same steps you mentioned and am still unable to reproduce the issue. You can try to uninstall the phonebook add-on and then reinstall it.

Once the phonebook is reinstalled, get into the Linux console and execute the commands below.

cd /usr/share/vitalpbx
php scripts/apply_migrations
php scripts/apply_migrations "phone-books"

If any error is shown while executing the commands above, please, post it here.

Hi Miguel,
I followed Your directions, but it seems all ok as I got no error messages:

[root@pbx ~]# cd /usr/share/vitalpbx/
[root@pbx vitalpbx]# php scripts/apply_migrations
[root@pbx vitalpbx]# php scripts/apply_migrations “phone-books”
[root@pbx vitalpbx]#

Thank-You.

Hi Miguel,
I’ve just removed another time the phonebook add-on and reistalled it from scratch.
I’ve managed this time to access the MariaDB VitalPBX’s tables and I’ve found, as I suspected, that the phonebook’s external contact table is wrong (the “mobile_number” and “home_number” filds are missing …):

DB_vista

When I unistalled the phonebook add-on, I verifyied that the three phonebook tables have been removed … thist means that during the installation process something went wrong recreating the tables (or something is wrong in the installation script).

Now I’ve added the missing coulumns by hand, and the csv files has been uploaded with all the three phone numbers, but I’m still having problems with the VitalPBX interface that refuses to show me the uploaded contacts.

Ad this point I think that there is a kind of “cache” storing the old add-on’s files and using them even if I remove and reinstall the addon again. Do You think that there is a folder on the server that has not been deleted with the unistall process?

Thank-You.

Hi Miguel,
I’ve solved the problem!
I don’t know why, but as I suspected it has been a matter of orphan files from my first unistall. In my case, I have uninstalled the add-on, manually removed the (empty) “phone-books” forlder in “/usr/share/vitalpbx/migrations” and reinstalled the add-on.

solved

Thank-You anyway for trying to help me.

1 Like