Total number of records

juca

New Member
Sep 28, 2024
10
1
3
21
Hello everyone, could you help me get access to the total number of authenticated extensions?

There is the Status > Registrations, but it won't work at the moment because my client needs to know how many people have registered at some point.

Example: I have 10 extensions, and I need to know how many of these 10 extensions have registered at some point, whether they are online or not.

Something like what we have today in User Logs.

My client needs to know how many people have used the extensions.

Is it feasible to create an API that monitors the FreeSwitch authentications? Each time a user authenticates, I save the record in SQLite and access these authentication logs via an API.
 
You will probably need to export and evaluate removing duplicates or write a SQL query to get the distinct list of devices.
 
You will probably need to export and evaluate removing duplicates or write a SQL query to get the distinct list of devices.
Do you know if it is possible to query the extension's login attempt log? in FreeSwitch (fs_cli) or in Postgresql. If possible, I can try to make a script with python + SQLite to save the extensions' login records.
 
What does this do? How can I use it? I downloaded it and activated the permissions but I don't know what it's for and how to use it.
this displays automatic provisioned devices ONLY. You are out of luck checking log files etc for manually provisioned devices, so be aware of the pain of no data manually provisioned devices.

Device log page you will see that device xyz hit the server again on intervals to update the remote phonebook (part of the auto provisioning templates). My memory was that it also shows registration attempts. Is it showing registration attempts?
 
Do you know if it is possible to query the extension's login attempt log? in FreeSwitch (fs_cli) or in Postgresql. If possible, I can try to make a script with python + SQLite to save the extensions' login records.

you can search freeswitch logs
Code:
cd /var/log/freeswitch/
grep -Ern --color --include=freeswitch.log* "REGISTER.*for.*from ip"

in fs cli
Code:
fs_cli -x "show registrations"

Code:
fs_cli -x "show registrations as xml"

count:
Code:
fs_cli -x "show registrations as xml" | grep reg_user | wc -l

I would add to a postgres table since you already have a postres db for fusionpbx. You could use the commands above to populate a table or you could append to a txt/csv file. I have 'build a history of registrations' on my list of projects but have not gotten to it yet. It would be a very useful to know if registrations have dropped off. You do not know what you are missing if you do not see it. You only know what you are missing if it is visible. "XYZ is not registered", "XYZ last regisered N hours/days/weeks ago". We could display un-registered on page, email list of unregistrations on triggers or intervals. I am getting excited again thinking about it. Other higher priorities at the moment. Easily an add-on application to fusionpbx including building tables, pages, sql, emails, and all.