Picture of Daniel 450
Registered 14 years 34 days
Daniel 450 Saturday, 30 April 2022, 12:43 PM
1 of 1 users consider this post helpful
database connection with serverside javascript
Hello,
how i could use the app own database to store and read information with serverside javascript is excelent explained in your sdk. Thank you for that.
But how could i connect to another database on this app plattform of another app?

I need a solution for the serverside javascripting to communicate with databases from other apps, for example to read informations from the reporting db or read and write to the contacts database.

I know that is possible in c++ but i want to do that in serverside javascript.
Andreas Fink
Moderator Registered 12 years 277 days
Andreas Fink (innovaphone) Monday, 2 May 2022, 12:25 PM
1 of 1 users consider this post helpful
Re: database connection with serverside javascript
Hello Daniel,

we do not provide such possibility in the JavaScript Environment. Also in C++ it is not a recommended way to access databases of other apps directly.

The overall recommendation is to use WebSocket APIs to access data on other services.

For example, APIs like com.innovaphone.search, com.innovaphone.phonelookup and com.innovaphone.callist could be helpful:

https://sdk.innovaphone.com/13r2/doc/reference.htm#APIs

Best Regards
Andreas Fink
Picture of Daniel 450
Registered 14 years 34 days
Daniel 450 Monday, 2 May 2022, 02:19 PM
Re: database connection with serverside javascript
Hello Andreas,

you are right APIs are the better way, and your listet apis are great.
But i didn´t know an api to read the reporting db and i didn´t know an api to write to the phonebook. If you have so, then i didn´t need any direct database connection possibility. Otherwise it would be great to have that posibility.
Andreas Fink
Moderator Registered 12 years 277 days
Andreas Fink (innovaphone) Tuesday, 3 May 2022, 10:33 AM
Re: database connection with serverside javascript
Hello Daniel,

the decision to not allow direct access to the apps db is by design and i don't think it will be changed.

We could elaborate, what your use cases are and extend the APIs by the necessary functionality.

When I understand correctly, you would like to add entries to the Contacts App?

What is the use case for the Reporting App?

Best Regards
Andreas Fink
Picture of Daniel 450
Registered 14 years 34 days
Daniel 450 Tuesday, 3 May 2022, 12:03 PM
1 of 1 users consider this post helpful
Re: database connection with serverside javascript
Hello Andreas,

yes we want to add entries to the contacts app.

We want to read the reporting db to do analytics and transfer call times to another appplication, without to do it with CDRs. Also only 2 CDR destinations acutally are possible in the pbx. So one for reporting, to have callist etc. and one for our app, then no other app is possible.
So in our pbx we have under this circumstances the requirement to have three CDR destintions.

Picture of Daniel 450
Registered 14 years 34 days
Daniel 450 Monday, 6 June 2022, 02:46 PM in response to Andreas Fink (innovaphone)
Re: database connection with serverside javascript
Hello Andreas,

in the last days i in V13r2 i noticed something and i didn´t understand how it is realised. Maybe thats a solution for the restriction of only two CDRs destinations could be configured.

I checked the V13r2 CallList App of a user without that the user has a reporting license. I saw that the CallList has entrys. But i know of a past check of the reporting db, that the reporting database has only entries of the objects which have a reporting license. So how could the Call List App get the CDRs for their call entries?
If another App could do the same, we would try that, because then no extra CDR destination has to be configured.
Picture of KenyattaBrownl
Registered 1 year 232 days
KenyattaBrownl Tuesday, 4 April 2023, 05:57 AM
Re: database connection with serverside javascript
I once read an article about an application that can do the same thing as you said. I see said there is no need to configure any additional CDR destination. Looks like there's something about technology or techloky.
← You can define your color theme preference here