Picture of Sam 4951
Registered 5 years 62 days
Sam 4951 Tuesday, 1 September 2020, 08:10 PM
App installation
Hello,

I'm missing some documentation on how to install an app by uploading a release-binary to the App platform.
In particular: what values provided during the App/instance installation have to be equal to the coded values in AppServiceArgs & AppInstanceArgs (main.cpp)?

Is it required to have the App-ID (App installation) equal to serviceArgs.serviceID (main.cpp)?

Should the domain (instance configuration) match the domain of the PBX? Or should it be equal to instanceArgs.appDomain (main.cpp)?

Sometimes the websocket connection from the GUI fails:

innovaphone.appwebsocket.Connection.js:338 SnomProvisioningApp: send: {"mt":"AppLogin","app":"SnomProvisioningApp","domain":"xqting.be","sip":"SnomProvisioningApp","guid":"00000000000000000000000000000000","dn":"manage","digest":"78aada1ecb7724d20177a90798da75e3f084290eb1432cd3f686c31b7dfd8706","pbxObj":"SnomProvisioningApp"}
innovaphone.appwebsocket.Connection.js:80 SnomProvisioningApp: recv: {"mt":"AppLoginResult","app":"SnomProvisioningApp"}

(the AppLoginResult misses the ok field)

And after App re-installation (with a different App-ID value, but identical passwords):

innovaphone.appwebsocket.Connection.js:338 SnomProvisioningApp: send: {"mt":"AppLogin","app":"SnomProvisioningApp","domain":"xqting.be","sip":"SnomProvisioningApp","guid":"00000000000000000000000000000000","dn":"manage","digest":"d489ab3a1ab8bca0b842dd13201d1621fda1139aed6ebda9a0b897f8fa79cc88","pbxObj":"SnomProvisioningApp"}
innovaphone.appwebsocket.Connection.js:80 SnomProvisioningApp: recv: {"mt":"AppLoginResult","app":"SnomProvisioningApp","ok":true}

This AppLogin message is identical (different digest caused by different challenge), but now succeeds.

In this working configuration the following values are different between instance configuration and source code:

- Domain (instance config) = xqting.be
- instanceArgs.appDomain = "snom.com";

- Webserver pad (instance config) = xqting.be/snomprovisioningapp
- instanceArgs.webserverPath = "/snomprovisioningapp"; (main.cpp)

- Database name (instance config) = xqting.be_snomprovisioningapp
- instanceArgs.dbName = "snomprovisioningapp"; (main.cpp)

- Database user (instance config) = xqting.be_snomprovisioningapp
- instanceArgs.dbUser = "snom"; (main.cpp)

Thus apparently these parameters don't matter at all?

Many thanks for a clarification.

Best regards,
Sam
Picture of Sam 4951
Registered 5 years 62 days
Sam 4951 Thursday, 3 September 2020, 09:14 AM
Re: App installation
Hello,

Related to this topic: according to http://class.innovaphone.com/moodle2/mod/forum/discuss.php?d=25505, the App-ID should match the binary file name.
Is this correct?
Can you please post a link to official documentation regarding this restriction?

Many thanks for your feedback.

Best regards,
Sam
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Monday, 14 September 2020, 02:51 PM
Re: App installation
Hi Sam,

the final idea is to install apps through the App Store (either a local one or our official), but there is no documentation available yet.

Life is easier if the app id is equal to the binary name although this is not neccessary (see usersapp -> users) when working with an app store.
Same for app id vs serviceId in main.cpp.

For the appinstance args inside the main.cpp: these are just used if you start your app while debugging within visual studio!
If you stop debugging and start the app with the AP Manager, the AP Manager uses the values for the instance configured inside the AP Manager when you edit an instance (or using the corresponding PBX Manager Plugin).

I assume this explains why you sometimes don't get a successfull login.
If you edit the values inside your main.cpp to match the values used within the AP Manager, you'll get a successfull login while debugging.

Greetings,
Daniel
Picture of Sam 4951
Registered 5 years 62 days
Sam 4951 Tuesday, 15 September 2020, 11:08 AM
Re: App installation
Hello Daniel,

Many thanks for your clarification, this helps a lot.

It was not clear to me that the hardcoded instance args were only used while debugging from VS.

I'll now try to create a PBX Manager Plugin, as I think this is a requirement to publish the App to the Store.

Best regards,
Sam
← You can define your color theme preference here