ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

I need ConnectyCube Dashboard to call my API when call is finished #176

Closed stephanoparaskeva closed 3 years ago

stephanoparaskeva commented 3 years ago

My app needs reliable information after every call, which is only called once per call between participants. Must be handled on Server and not in Front End JS.

I would like to provide a URL to ConnectyCube dashboard: POST https://myhostname:4000/call/finished

And when any ConnectyCube 1-to-1 call is finished (Audio call, or Video call). The Call information gets posted to the endpoint. E.g:

  {
    "duration": 100000,
    "callType": "Video",
    "occupant_ids": [123, 223],
    "callStatus": "finished",
    "isSuccessfulCall": "true"
    ...
  }

This is so that in my server I can do:

app.post('/call/finished', function (req, res) {
   console.log(req.body.duration)
})
ccvlad commented 3 years ago

@stephanoparaskeva No way to do it trough server. The WebRTC Peer-to-peer works w/o server. Both users send signaling message via SDP (Session Description Protocol) to each other to setup peer-to-peer connection. Server helps to exchange data to establish communication and doesn't store the info about calls. You can manage this only on front-end side.

stephanoparaskeva commented 3 years ago

Okay, thank you Vlad!