The plugin is implemented without any other technologies than Outsystems. No public signaling services for WebRTC (e.g. pusher).
It works in a Local Network, and also it can connect users behind NAT. The plugin is using a public free TURN server to serve iceCandidates behind NAT. In production cases this should be replaced with some commercial one to make all connections reliable (free services might go offline). So, if for some reason a communication is not established then it is probably it, and starting over might help. But I did not have any issues during my testing. Anyway, you can provide a json with iceServers.
Tech details:
Events:
Public client actions:
Public server actions:
The application needs only these events and methods. All the WebRTC magic happens inside the plugin.
Usage:
Create an Entity with a relation connecting your Screen (e.g. FormId) with ConnectionId (long integer). For example MyFormConnection
When a caller (client) initiate a connection, the DB record should be crated in MyFormConnection.
Drag'n'Drop RTCPlugin control to your screen/control. If this is a caller (client), assign ConnectionId to NullIdentifier. If it is an accepter (receiver), assign ConnectionId from your MyFormConnection entity.
Use events to be informed when connection is available or closed.
Use client action SendMessage to send message to the other party. If you are client, the message will be send to a accepter (receiver) and vs.
Check the Demo app for working example.
HowTo: (demo app)
You can open the app in two browsers/tabs/(browser+phone). On the first device choose to act as a user, on the second one -- as a Support agent.
You will see a start page where you can login as a user, who needs support or as a Support Agent.
A user will see a form and the button "Ask Support Agent to help".
A Support agent will see a list of the requests. When a user presses a button "Ask Support Agent to help", the agent should see a new request record.
When an agent clicks a request record he/she is redirected to the user's form. When a connection is established, the form fields become enabled and an agent can start filling the form. And at the same time a user will see the changes the agent makes in real time.
When an agent leaves the form, the request changes its state to Completed. When a user leaves the request, the request changes its state to Canceled.