Picture of Marko 6403
Registered 2 years 88 days
Marko 6403 Thursday, 6 October 2022, 01:56 PM
GetObjectResult - wrong values for admin user
Using the "GetObject" method of the PbxAdminApi I check whether some users are licensed to use services such as UC, MyPBX, Reporting, Voicemail etc.

This works well for all users expect for my main user called "admin". The values in GetObjectResult for "uc" and "reporting" are correct, while the others are not (they are all false instead of true):

{
 "api": "PbxAdminApi",
 "mt": "GetObjectResult",
 "cn": "admin",
 "h323": "admin",
 "node": "root",
 "loc": "pbx",
 ...
...
 "uclic": true,
 "voicemail": false,
 "fax": false,
 "mobility": false,
 "mypbx": false,
 "video": false,
 "app-sharing": false,
 "reporting": true,
 ...
}

What I have noticed is that the problem is related to all service-licenses that are per default enabled cannot be changed in the PBX settings ( the ones greyed out in the screenshot below). Is this a bug in the API and if it is, is there a workaround for it?
Andreas Fink
Moderator Registered 12 years 277 days
Andreas Fink (innovaphone) Thursday, 6 October 2022, 06:50 PM
Re: GetObjectResult - wrong values for admin user
Hello Marko,

the UC license is a special license that enables the at the same time multiple licenses (voicemail,fax,mobility,mypbxvideo and appsharing). If the UC is set, the other should be also assigned.


Using GetObject of the PbxAdminApi is not a correct way - it is possible to assign a license, but it could happen, that the User Object has no assigned, cause to less licenses are installed on the PBX. CheckAppLic is a better way (https://sdk.innovaphone.com/13r3/doc/appwebsocket/PbxAdminApi.htm#CheckAppLic).

Best Regards
Andreas Fink


Picture of Marko 6403
Registered 2 years 88 days
Marko 6403 Monday, 10 October 2022, 12:15 PM
Re: GetObjectResult - wrong values for admin user
Thanks for the hint!
However, using CheckAppLic for UC, voicemail and other licenses did not work for me. The response for UC, voicemail and other UC-related licenses was always "ok: false" in my case. I have tried various variations for the "lic" parameter (e.g. "Voicemail", starting with a capital letter), but that didn't work either. The same request works for licenses such as "App(softphone)" though.


Request:
{"api":"PbxAdminApi","mt":"CheckAppLic","cn":"admin","lic":"voicemail","src":"foobar"}
Response:
{"api":"PbxAdminApi","src":"foobar","mt":"CheckAppLicResult","ok":false}
← You can define your color theme preference here