Picture of Rico 1837
Registered 10 years 303 days
Rico 1837 Wednesday, 3 November 2021, 02:13 PM
Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
Scenario: An app with "user" and "admin" entry to the app using RCC and PbxApi, in a MultiPbx environment.

There are two Pbx objects (user, admin) that have RCC and PbxApi checked respectively. The slave Pbxes have replication configured so that both Pbx Objects are replicated to all slaves. Each slave Pbx now creates its own connections for both Pbx Objects (user,admin) and RCC and PbxApi respectively.

In User/Admin Connections from myApps Client I find dn, sip, guid etc. of the connecting user, but I don't see there any information about the Pbx in which the userobject of the user is located.

So my question: for example, I want to set the presence of a user, through which of the Api Connections do I send messages?

{
"api": "PbxApi",
"mt": "SetPresence",
"guid":"dg0d8fg09d8mf0g____of_a_slave_1_user",
"contact": "tel:",
"activity": "busy",
"note": "where will all of this end?",
"src":"callback0.26676369090662666"
}

Does it matter to which of the multiple PbxApi Connections of the Appservice I send the message?

Can I send such a presence message of a user from slave1 via a PbxApi of slave2 or the master (and the Pbxes are signaling the change to each other slave2/master -> slave1)?

Or must this message send exactly to the PbxApi Connection of slave1? Where do I get the info to which Pbx a user/admin belongs in the myApps client? Because this info is missing in the initial JSON message (red in the graphic below).

Unbenannte_Zeichnung.png

2013
Moderator Registered 16 years 72 days
Guntram Diehl (innovaphone) Friday, 5 November 2021, 09:45 AM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
With Pbx Objekt (User) and PBX Object (Admin) you mean App objects right? These App Objects have the Websocket checkmark set, so the arrows in the picture are these Websocket connections from the App Object to the App Service?

You use these Websocket connections for SetPresence in behalf of any Users?

This can be done to any of the PBXs, the changes are replicated to all other PBXs
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Friday, 5 November 2021, 09:46 AM in response to Rico 1837
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
Hello Rico,

I'm not sure about exact use case of your scenario (if it works at all to share users over multiple PBXes).

However if you establish a connection to a PBX with PbxAdmin Api, you will get the info about the PBX:
{"mt":"PbxInfo","domain":"test.com","pbx":"master","pbxDns":"","apis":["EpSignal","PbxAdminApi","PbxApi","PbxMessages","PbxSignal","PbxTableUsers","RCC","Services"],"version":"13r2 sr4 [13.6164/134877/600]","build":"136164"}

Best Regards
Andreas Fink
Picture of Rico 1837
Registered 10 years 303 days
Rico 1837 Tuesday, 9 November 2021, 11:15 AM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
should be solved with

https://forum.innovaphone.com/moodle2/mod/forum/discuss.php?d=27148

thanks
Picture of Rico 1837
Registered 10 years 303 days
Rico 1837 Thursday, 25 November 2021, 02:12 PM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
I´ve updated my pbx and sdk/generic-app to sr6, but i cant see that the new 'pbx' key is included in the user/admin conn object.

new JsonApi("user").onconnected(function(conn) {
new JsonApi("admin").onconnected(function(conn) {


or am i missing something?
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Thursday, 25 November 2021, 07:44 PM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
The JsonApi object is used on App Service side, as server side implementation of the API.

If you use PbxApi from the App Service like this:
new PbxApi("PbxAdminApi").onconnected(function (conn) {

you will get a message containing the pbx element:

{
"apis": [
"EpSignal",
"PbxAdminApi",
"PbxApi",
"PbxMessages",
"PbxSignal",
"PbxTableUsers",
"RCC",
"Services"
],
"build": "136223",
"domain": "test.com",
"mt": "PbxInfo",
"pbx": "master",
"pbxDns": "",
"version": "13r2 sr6 [13.6223/134877/600]"
}

Best Regards
Andreas Fink

Picture of Rico 1837
Registered 10 years 303 days
Rico 1837 Friday, 26 November 2021, 08:37 AM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
yes, correct. But thats the pbx the api is connected from.
i need the pbx of a connected user, to send apicalls to the correct api connection.
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Friday, 26 November 2021, 07:29 PM
Re: Mapping myApps users of a JS app service to Pbx API connections in master/slave environments.
I'm sorry, the client side implementation for JavaScript Environment is still missing in V13r2 SR6 and will be released with V13r2 SR7.
← You can define your color theme preference here