Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 09:08 AM
External app connection
Hi

My objective is to connect to the softphone through an external php app to make a call, read a script and then receive an answer. I have read through multiple documentation links but to no avail...
https://wiki.innovaphone.com/index.php?title=Howto:Talking_to_the_v13_Application_Platform_using_PHP#Access_a_PBX_App_service_using_a_PBX_user_login
I tried following this link step by step but couldn't figure it out, it seems like some of the code that are linked to require some access account and password. I feel like I am missing something. In the link above they mentioned how to do certain things with devices and users ("new AppPlatform\AppServiceSpec("innovaphone-devices")"), is there some documentation on these methods, so that I may find something that works for making a call, I found a way to do it with javascript while making an app using SDK, but I need to do it externally as this needs to be implemented on an existing php program already in prod.

Any help is appreciated.. I have been trying to simply connect to the pbx for 2 days just to make a call without succeeding..

Best regards,

Khalil
Picture of Christoph Künkel (innovaphone)
Moderator Registered 15 years 190 days
Christoph Künkel (innovaphone) Wednesday, 22 July 2020, 09:30 AM
1 of 1 users consider this post helpful
Re: External app connection
Hi Khalil,

the Definition of Application Protocols can be found in the SDK. I would assume that RCC is what you are looking for.

Regards, Christoph
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Wednesday, 22 July 2020, 10:18 AM
1 of 1 users consider this post helpful
Re: External app connection
Hi Khalil,

I created a simple rccapi.php example in addition to Christophs answer.
To use this sample, you must follow the instructions in the wiki:

http://wiki.innovaphone.com/index.php?title=Reference13r1:Concept_Talking_to_the_v13_Application_Platform_using_PHP#Using_the_RCC_API

Greetings,
Daniel
rccapi.php
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 10:43 AM
Re: External app connection
This is very helpful thank you!

Sincerely,
Khalil
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 03:23 PM in response to Daniel Deterding (innovaphone)
Re: External app connection
Hi Daniel,

I tried to understand what was asked for in the wiki, but still feels like I am missing some information, for instance it says I need a PBX App Object named rccapi'. How do I create an PBX App Object and where? Is this done with the sdk? Is it possible to do the things I described above without sdk setup, I am trying to avoid using the sdk for this as it is not supported on macOS. Another question I have is in rccapi.php there is a line " require_once './classes/websocket.class.php'; " Where do I find this? Am I suppose to place rccapi.php someplace where the line above works?

What I have is an innovaphone ip411, I connect to it through its ip address, I also have access to the admin page to activate test mode to enter softphone.

I apologize for having a hard time understanding this, this is the first time working with innovaphone.


Picture of Christoph Künkel (innovaphone)
Moderator Registered 15 years 190 days
Christoph Künkel (innovaphone) Wednesday, 22 July 2020, 03:32 PM
1 of 1 users consider this post helpful
Re: External app connection
Hm, did you download the sample code package from http://download.innovaphone.com/ice/wiki-src/ ?

You should have a tree with subfolder "classes" then.
Unbenannt.png

Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 04:05 PM
Re: External app connection
It seems like I don't have access to it. It asks for username and password, I tried the one used for this forum but that didnt work.. but now I know atleast that its this that I am missing.
Picture of Christoph Künkel (innovaphone)
Moderator Registered 15 years 190 days
Christoph Künkel (innovaphone) Wednesday, 22 July 2020, 04:11 PM
1 of 1 users consider this post helpful
Re: External app connection
try ice/technical as user/password.

Regarding the App object: yes, it needs to be created in the PBX's admin GUI (PBX/Config/Objects). Not sure which PBX you are using for development but probably the person maintaining this box should help you.

Christoph
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 05:29 PM
Re: External app connection
Hi again, thanks for the help so far, I couldn't find PBX/Config/Objects (PBX/config didn't have anything named objects) in the pbx's admin GUI, what I found was PBX/Objects and then selected new on app. I assume this is where I create the app object? I filled out everything as instructed in the wiki that was previously linked http://wiki.innovaphone.com/index.php?title=Reference13r1:Concept_Talking_to_the_v13_Application_Platform_using_PHP#Using_the_RCC_API
but get the error message cn missing, please see screenshot attachment.

Screenshot_2020-07-22_at_17.21.43.png

Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 07:08 PM
Re: External app connection
Nevermind I figured it out, needed to add long name as well
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Thursday, 23 July 2020, 08:55 AM in response to Christoph Künkel (innovaphone)
Re: External app connection
Good morning,

I tried to run the code sample but got an error, see attachment. Are you guys familiar with this problem, I followed everything in the wiki, created the object called rccapi with password ip411 and gave it the RCC tick under App, i created the my-pbx-data.php with the 4 lines as the wiki instructed, the 4 lines include the ip address of the pbx, pbxuser I have for entering using external app, the password for that user and finally the app name rccapi.
Screenshot_2020-07-23_at_08.40.28.png

Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Thursday, 23 July 2020, 09:17 AM
Re: External app connection
"404 not found" means, that either the given IP address is the IP of your IP411 or that you're running a way too old firmware on your IP411.

Did you already update to the latest 13r1 SR15?

Greetings,
Daniel
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Thursday, 23 July 2020, 10:19 AM
Re: External app connection
Ah it is the IP of my ip411, what ip address should I use for this code sample?
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Thursday, 23 July 2020, 10:28 AM
1 of 1 users consider this post helpful
Re: External app connection
You must use the IP address of your ip411 ... So if you already used this, it should be fine.
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Thursday, 23 July 2020, 02:58 PM
Re: External app connection
Hi thanks for the help, I got the sample to work, but I cant find the documentation for making a call in php with rcc. As mentioned before my objective is to connect the softphone using a php script, and make a call to a number and read a script wait for the answer and end the call. I see that there is something called UserCall in the sdk doc for RCC https://sdk.innovaphone.com/doc/appwebsocket/RCC.htm but don't see any examples on how to use this.

Sincerely,
Khalil
Picture of Khalil 5054
Registered 4 years 322 days
Khalil 5054 Wednesday, 22 July 2020, 10:42 AM in response to Christoph Künkel (innovaphone)
Re: External app connection
Thank you for the quick response! I will look into RCC smile

sincerely,
Khalil
← You can define your color theme preference here