RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
243 stars 215 forks source link

Create javascript application for testing LiveCallModification API #1667

Open gvagenas opened 7 years ago

gvagenas commented 7 years ago

LCM = LiveCallModification (http://documentation.telestax.com/connect/api/calls-api.html#modifying-live-calls)

The application should dynamically generate RCML to connect calls with clients/conferences/numbers and then provide LCM call control functions with a user interface. For example the hold/unhold call flow would be like this:

  1. Bob calls 123456789
  2. Restcomm answers and sends http request to LCM_APP
  3. LCM_APP returns with RCML to connect to Alice. IMPORTANT here is that LCM_APP stores the CALL_SID_BOB for later to be used on the LCM requests
  4. Bob and Alice now talks.
  5. Using the LCM_APP web interface we ask to hold the call. Hold the call means use LCM to move CALL_SID_BOB to new URL (that will return new RCML) that joins the call to conference room with moh and also provide query parameter "MoveConnectedCallLeg=true" in order to move the connected call (Alice) to the conference room also , for example:
    
    curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:$authToken@$restcomm_ip:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls.json/$1 -d "Url=http://$restcomm_ip:8080//restcomm/demos/dial/conference/dial-conference.xml" -d "MoveConnectedCallLeg=true"
1111
6. Next using the LCM_APP web interface we ask to unhold the call. Unhold means move CALL_SID_BOB to the same confernece room as moderator now. This time NO NEED to have "MoveConnectedCallLeg=true":

curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:$authToken@$restcomm_ip:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls.json/$1 -d "Url=http://$restcomm_ip:8080/restcomm/demos/dial/conference/dial-conference-moderator.xml "

1111


* The URL parameter of the LCM request in steps 5 and 6 could be a static xml file as in the example or could be a URL pointing at the LCM_APP again and the LCM_APP will generate the appropriate RCML to connect to conferen with hold/unhold.

This app should start as a standalone application to test ans demonstrate LCM but we should keep in mind that we need to implement CallControl applications and function to RVD so part of the work here should be able to be moved/merged to RVD
deruelle commented 7 years ago

@nicosmaris I assigned that issue to you. Feel free to ping @gvagenas for more information on how to get started here or on gitter channel

gvagenas commented 7 years ago

Hi @nicosmaris , great that you will contribute on the issue. Ping me at gitter or leave a comment here if you need any clarification etc.

gvagenas commented 7 years ago

@nicosmaris a high-level overview of this application would be the following:

A. Accept http requests, respond with generated RCML The application will receive http requests from Restcomm to get RCML and will have to do the following:

  1. Store the details of the http request (either GET or POST). The most important detail is CallSID and this will be used for LCM later
  2. Generate the RCML according to the rules provided by the user. I am thinking of a user interface that the user will either provides the RCML or ask for specific call flow, we can check the details of this step later. After the RCML is generated it will be in the response to Restcomm.

B. LiveCallModification

  1. An interface to present the live calls and options to modify them
  2. To modify a call the user will have to provide either RCML or a predefined call flow (RCML)
  3. The app will genereate a HTTP request to Restcomm using the CallSID (stored earlier) and pointing to the URL that will generate the RCML the user picked.
c5c86a commented 7 years ago

happy new year to all :)

@gvagenas I am trying to setup a test so that I can share the shell output for troubleshooting. I see that Restcomm-Connect uses karma. Can you provide the karma command?

https://github.com/RestComm/Restcomm-Connect/blob/master/restcomm/restcomm.rvd/src/test/karma.conf.js

I did a fork and the following build complains with a 'module is not defined' error. It seams that the current working directory is wrong. The next step is to call the tadhack server from javascript as the deployment is not part of this ticket

https://travis-ci.org/nicosmaris/Restcomm-Connect/builds/188466922

@ipsilantide are you using any service like the following for wireframes?

https://support.draw.io/display/DO/2014/10/25/Bootstrap+mockup+stencils

ipsilantide commented 7 years ago

Happy new year @nicosmaris! Good to see you around ;)

To your question: I am mostly using Photoshop and illustrator cause I like to have the details and get the feeling but there are a lot of wireframe tools out there some of them open source. If you have any questions feel free to ping me!

c5c86a commented 7 years ago

@gvagenas this app needs a backend to keep the CALLSIDs so it is not only javascript. Which java version and library you use at RVD? java 6 and spring?

I want to avoid deploying Connect locally and as tadhack.restcomm.com does not accept Cross-Origin Resource Sharing, the API calls to Connect have to be also at the backend.

I can assist in the analysis but the frontend should be done by someone who knows angular. These days I can assist in the backend and in a jquery-only frontend but it might take us a month.

Feel free to comment on the technical diagram which shows that this ticket can be broken down in 5 pieces.

https://docs.google.com/drawings/d/1GLN6kdYVcdcbrDDPq-HHJtWYeW8ZJ2IXbkrnmAUjFig/edit

Instead of polling we can use pusher.com. The problem with polling is that a UI element might start being refreshed when the user clicks on it so his action will be lost.

The 5th part is the big one as we'll need UI elements for each RCML action and you don't want a programmer to decide the look and feel of 50 buttons in the same page I guess. For example, deciding which audio file to play is an app on its own.

http://documentation.telestax.com/connect/rcml/index.html