- Joined
- Feb 13, 2013
- Messages
- 3,845
- Reaction score
- 1,913
I am more than a little confused by this screen:

I have had success authenticating to the XAPI and calling methods, but which APIs work seems to depend on the choices made on the screen above. What I would like to achieve is the ability to invoke any XAPI method, in any Department, -- AND -- subscribe to any real-time events anywhere in the PBX. I can do all of these things with the original (non-web-based) Call Control API.
But perhaps I should start from the beginning.
The first field "Client ID" requires an integer. Is this supposed to be a new extension number, or an existing extension number, or any random integer? I randomly chose "200" on my 3-digit test PBX which is not currently used by any extension and that worked. But a more definitive explanation of what this should be would be helpful. Does this become a potential route destination?
For "Department" if I choose "System Wide" the "Role" field is set to "User" and cannot be changed. Perhaps "System Wide" is synonymous with the "System Owner" role? If so, then presumably the "Role" field should be set to "System Owner" rather than "User" or hidden entirely to avoid confusion. If it is indeed a "User" role, then what limitations does that place on calling the API's or subscribing to real-time events? Curiously, if I chose a specific department, then I can choose the "System Owner" role. That is pretty confusing to me since a System Owner has full rights to everything and every department...
I assume if I am using the WebSocket connection, enabling access to both the XAPI and the Call Control API are appropriate. However, it is unclear if calling the XAPI via the socket returns exactly the same information as a normal non-socket request? In the documentation it talks about data size limitations on the socket.
Finally, it appears I have successfully connected to the WebSocket, but if I place a phone call or delete an extension, I do not receive any events from the socket. Admittingly, I have always worked with SignalR rather than directly with WebSockets so I may be missing something in my C# code. Maybe.... maybe... you might have a multi-tenant scenario where the System Owner wants to limit a tenant's programmer to only do things within their department, but I just want full access to everything -- XAPI and Call Control API and it is unclear how I achieve that on this screen, and it is unclear how to subscribe to real-time events using c#.

I have had success authenticating to the XAPI and calling methods, but which APIs work seems to depend on the choices made on the screen above. What I would like to achieve is the ability to invoke any XAPI method, in any Department, -- AND -- subscribe to any real-time events anywhere in the PBX. I can do all of these things with the original (non-web-based) Call Control API.
But perhaps I should start from the beginning.
The first field "Client ID" requires an integer. Is this supposed to be a new extension number, or an existing extension number, or any random integer? I randomly chose "200" on my 3-digit test PBX which is not currently used by any extension and that worked. But a more definitive explanation of what this should be would be helpful. Does this become a potential route destination?
For "Department" if I choose "System Wide" the "Role" field is set to "User" and cannot be changed. Perhaps "System Wide" is synonymous with the "System Owner" role? If so, then presumably the "Role" field should be set to "System Owner" rather than "User" or hidden entirely to avoid confusion. If it is indeed a "User" role, then what limitations does that place on calling the API's or subscribing to real-time events? Curiously, if I chose a specific department, then I can choose the "System Owner" role. That is pretty confusing to me since a System Owner has full rights to everything and every department...
I assume if I am using the WebSocket connection, enabling access to both the XAPI and the Call Control API are appropriate. However, it is unclear if calling the XAPI via the socket returns exactly the same information as a normal non-socket request? In the documentation it talks about data size limitations on the socket.
Finally, it appears I have successfully connected to the WebSocket, but if I place a phone call or delete an extension, I do not receive any events from the socket. Admittingly, I have always worked with SignalR rather than directly with WebSockets so I may be missing something in my C# code. Maybe.... maybe... you might have a multi-tenant scenario where the System Owner wants to limit a tenant's programmer to only do things within their department, but I just want full access to everything -- XAPI and Call Control API and it is unclear how I achieve that on this screen, and it is unclear how to subscribe to real-time events using c#.