Search code examples
freeswitch

FreeSWITCH filter registrations


I have a multi tenant FreeSWITCH setup and I am trying to retrieve the registrations belonging to a particular tenant.

  • I am aware of the mod command show registrations described here which returns all the current registrations on the FreeSWITCH.

  • I am also aware of sofia status profile <profile name> reg described here which shows registrations on a particular profile. This won't help either as the profiles on my FreeSWITCH are shared by multiple tenants.

Is there a way I can retrieve the data through event socket for a specified tenant?


Solution

  • you can execute show registrations via ESL and retrieve its output. The second field is realm, which is basically the name of the tenant. So, you would get all the registrations, and later you can filter by realm name. Also in theory, you can get direct access to the registation SQL database and run the queries directly in it.