Nithish
Nithish

Reputation: 1640

FreeSWITCH filter registrations

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

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

Upvotes: 0

Views: 1328

Answers (3)

suren
suren

Reputation: 385

I have done something similar to this.

  • first get all the registration of profile using following command:

    "api sofia status profile internal reg" using event socket

  • after this based on your need convert data into json and search based on realm and print the result.

Upvotes: 1

Sasi Varunan
Sasi Varunan

Reputation: 2864

Please refer sofia_presence_data list|status|rpid|user_agent [profile/]<user>@domain cmd.

Even if this doesn't work. You need to get register and unregister events from ESL and save it to common DB and retrieve the user data, which i think a much simpler way.

Upvotes: 0

Stanislav Sinyagin
Stanislav Sinyagin

Reputation: 1961

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.

Upvotes: 2

Related Questions