Picture of mitop
Registered 4 years 40 days
mitop Wednesday, 6 March 2024, 09:27 AM
How to use PbxAdmin Api from C++ project
Hi all,

in one of our c++ app projects we want to use the pbxadminapi (https://sdk.innovaphone.com/13r3/sdk/common/interface/pbx_admin.htm) to query the uc lic information and other informations of a user (just as it is possible with js apps). My attempt to integrate and use the Api was unfortunately not successful. I can create the IPbxAdminApi object, but none of the functions, for example "SendGetObject", are executed.
Does anybody has a running example how to use the pbxadminapi from c++?
The second question is: How do i receive the results from "SendGetObject"? Where does the respond arrive?


Best regards
Mladen
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Wednesday, 6 March 2024, 09:58 AM
Re: How to use PbxAdmin Api from C++ project
Hello Mladen,

the pbx_admin.h just extends the json_api.h which has examples in the documentation:

The messages arrive in as Message callback function call on the object that was created using CreateJsonApi on the JsonApiContext.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Wednesday, 6 March 2024, 04:37 PM
Re: How to use PbxAdmin Api from C++ project
Hello Andreas,

can't get it to work. What do I have to do to be able to use the Api? Do I have to create my own classes like here https://sdk.innovaphone.com/14r1/sdk/common/interface/json_api.htm with the Echo class? In my opinion, the given link describes how to create a custom UJsonApiContext, not how to use an existing one. IPbxAdminApi from pbx_admin.h is already a UJsonApiContext. Do I now have to derive my own class from IPbxAdminApi?
Which CreateJsonApi should I use? The one from the IPbxAdminApi object or the one from my app class? When do I call the "Create" from the IPbxAdminApi? When do i call RegisterJsonApi and JsonApiStart?

Don't you have a Microsoft Visual Studio project example that shows how to implement and use the PbxAdminApi inside an App?


Best regards
Mladen Topic
← You can define your color theme preference here