fs_cli empty response on list_users

tnot

New Member
Mar 16, 2023
6
0
1
50
Hi,

no matter what I try I cannot get any results from list_users. Response is always like

userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number

+OK


I can do eg fs_cli -x "domain_exists mydomain.com" and get "true" in return. But fs_cli -x "list_users domain mydomain.com" or fs_cli -x "list_users context mydomain.com" is always empty.

Any idea what I am missing?

Thanks,
 
I do not believe that fusionpbx uses the freeswitch directory/user directory.

/etc/freeswitch/freeswitch.xml

Code:
...
  <!-- mod_dingaling is reliant on the vcard data in the "directory" section. -->
  <!-- mod_sofia is reliant on the user data for authorization -->
  <section name="directory" description="User Directory">
    <X-PRE-PROCESS cmd="include" data="directory/*.xml"/>
  </section>
...

but /etc/freeswitch/directory/ only has "empty.xml" which is an empty file. So executing list_users, list_users group default, list_users group, and so on will always return the list of fields and return no entries.

Code:
freeswitch@server1> list_users
userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number

+OK
 
Thanks whut,

I am new at freeswitch/fusionpbx and was thinking that the fs_cli would work as normal with fusionpbx. But maybe not so..

It seems that some fs_cli commands actually do lookups in the fusionpbx database. After activating query logging, when I run the domain_exists, there are queries to the domains table of the fusionpbx database. Nothing when running list_users. Also nothing when using find_user_xml, but that actually gives results.. Strange..

To rely on / use fs_cli is with fusionpbx is perhaps not a good idea?

Thanks again
 
You can use fs_cli with fusionpbx. You have run into one of the items where it was determined that performing actions in fusionpbx instead of freeswitch or fs_cli was better, faster, more reliable. Freeswitch is a requirement for phone registrations, phone calls, and many other things.

If you are looking for registrations/ registered users from fs_cli then you could use
Code:
fs_cli -x "show registrations"
or similar comands. You may prefer the registrations page in fusionpbx Status -> Registrations.
 
Thanks,

yes I know about "show registrations". What I was looking for now, was to list all extensions for a domain and check which ones was not registered by using "show registrations". It would have been convenient to use cli for both but I guess I have to look up the extensions in the database then.

Or is there other/better ways to do this? I guess the database structure easily be changed in some upgrade which could make the scripts fail.
 
The extension webpage has colored dots to display which extensions are registered, not registered, and multiple registrations.