QuickBlox / quickblox-flutter-samples

quickblox-flutter-samples
3 stars 16 forks source link

Hanging up the first call when another call comes in during a call #19

Closed furkanerkl closed 1 year ago

furkanerkl commented 1 year ago

I plan to get the ids of the active calls and close the first call with the hangup function, but I can't figure out how to get the id of the first call. Do you have any suggestions on this?

kirillTolmachev commented 1 year ago

Hello @furkanerkl The id of call it's sessionId You can get sessionId from received CALL event.

await QB.webrtc.subscribeRTCEvent(QBRTCEventTypes.CALL, (data) {
        Map<dynamic, dynamic> payloadMap = Map<dynamic, dynamic>.from(data["payload"]);
        Map<dynamic, dynamic> sessionMap = Map<dynamic, dynamic>.from(payloadMap["session"]);

        String sessionId = sessionMap["id"];
 }

Link to github code

kirillTolmachev commented 1 year ago

@furkanerkl Closed due to no feedback