Picture of marcorcau
Registered 5 years 321 days
marcorcau Monday, 16 August 2021, 06:14 PM
Check licence status for a not loged in user
Hello,

thank you for adding the Licencing page to the SDK documentation.

We are currently developing an app which we plan to release using the Innovaphone licencing model.

Our app requires checks for licence status for users which are not the current loged in user. Is this information available through any way?

Reasonable place seems to be PbxTableUsers which we have never used yet. Will we find the information there?

Does the "apps" field in "users" table take into account this new licenced / unlicenced concept?

Thanks a lot for your help
2013
Moderator Registered 16 years 15 days
Guntram Diehl (innovaphone) Friday, 10 September 2021, 01:40 PM
Re: Check licence status for a not loged in user
I thought about this a little bit: The PbxTableUsers is not the right place. This is dynamic information also dependent on available licenses. Would be difficult to generate Updates with reasonable load.

Can you explain a little bit, how this shall be used:
  • Do you want to query this on demand for a specific App and a specific user?
  • Do you want to have all license Info for a given user in one request?
  • Including the info which license is configured and which actually acquired?
  • Do you want to get the info for all users and receive updates? This would be hard and maybe there is a way to query online.
At the moment we have no API, but it should be easy to add this.
Picture of marcorcau
Registered 5 years 321 days
marcorcau Friday, 10 September 2021, 02:13 PM
Re: Check licence status for a not loged in user
Our use-case is the first one you mentioned:
  • Do you want to query this on demand for a specific App and a specific user?
Yes !!! And in fact in our use-case its not exactly "a specific app" but my own app.

The essense of what I really need is "If this user accessed the app, what would be the value of app.logindata.info.unlicensed, ¿true or false?".

Something like an "unlicenced" field in the [user-id] object of the SearchUsers resonse in PbxAdminApi, I think.

Regarding the third option you mention
  • Including the info which license is configured and which actually acquired?
I really don't understand the difference yet so I am not really able to respond.

Thank you !!

2013
Moderator Registered 16 years 15 days
Guntram Diehl (innovaphone) Tuesday, 7 December 2021, 07:31 PM
Re: Check licence status for a not loged in user
Actually we implemented this quite a while ago, but to forgot to update the documentation. This is now done, look for CheckAppLic
Picture of marcorcau
Registered 5 years 321 days
marcorcau Monday, 13 December 2021, 04:27 PM
Re: Check licence status for a not loged in user
Thanks for your reply.

I see the GetAppLics method of the PbxAdminApi provides the total amount of licenses.

Is there a way to know if a specific user has a licence assigned?
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Monday, 13 December 2021, 05:06 PM
Re: Check licence status for a not loged in user
Hello Marc,

please take a look on the following document:
SDK / Licensing / Checking the license:
https://sdk.innovaphone.com/13r2/doc/licensing.htm

The flag 'unlicensed' on the app connection shows if a user has no license for the app.

Best Regards
Andreas Fink


Picture of marcorcau
Registered 5 years 321 days
marcorcau Monday, 13 December 2021, 05:29 PM
Re: Check licence status for a not loged in user
Hello Andreas,

we are using that "unlicensed" flag successfully in one of our apps, but what I require now is to check license status of a different user, not the one currently connected.

Is this possible?

Marc ///
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Monday, 13 December 2021, 07:05 PM
Re: Check licence status for a not loged in user
It is possible to use PbxAdminApi to check app license of a specific user via GetObject .Te response will contian an element "app-lics":

{
"api": "PbxAdminApi",
"mt": "GetObjectResult",
"app-lics": "+innovaphone-pbx-conferencing",

To check all users, you have to replicate all user objects from the PBX or use replicator.

Best Regards
Andreas Fink
Picture of marcorcau
Registered 5 years 321 days
marcorcau Tuesday, 14 December 2021, 12:58 PM
Re: Check licence status for a not loged in user
Hello Andreas,

thanks a lot, this is what I was looking for.

But the GetObject method only returns the licenses applied directly to the user object, not those inherited from the user's template.

Wouldn't it be reasonable it returned the inherited licenses too?

Regards,
Marc ///
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Wednesday, 15 December 2021, 10:22 AM
Re: Check licence status for a not loged in user
Hello Marc,

with the next service release the GetObject method will get a new parameter "template", which will switch this behaviour as required (with or without templates).

Best Regards
Andreas Fink
Picture of marcorcau
Registered 5 years 321 days
marcorcau Monday, 3 January 2022, 02:35 PM
Re: Check licence status for a not loged in user
Hello Andreas,

is 136254 sr7 the release which includes the new parameter? We have updated our PBX and tried to use the new "template" parameter like this:

{
 "api": "PbxAdminApi",
 "mt": "GetObject",
 "src": "my-custom-app|load-user",
 "template": true,
 "cn": cn
}

But we still get only an app-lics property in the GetObjectResult response when the user has licenses assigned on its own. Those inherited from the template don't appear.

Is this the correct way to use the "template" parameter?

Regards,
Marc ///
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Monday, 10 January 2022, 06:23 PM
Re: Check licence status for a not loged in user
Hello Marc,

I checked again, and unfortunately the parameter "template" was not added to v13r2. It is only available in v13r3. I'm sorry for the wrong information.

The usage is:

{ "mt": "GetObject", "api": "PbxAdminApi", "src": Source, "guid": string, "cn": string, "template": "with"/"without" }

Best Regards
Andreas Fink
← You can define your color theme preference here