meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.17k stars 2.47k forks source link

[1.x] Does AudioBridge supports multiple participant join from RTP in a single room . Getting `Already in a room` Error for 2nd participant #3350

Closed keremcadirci closed 5 months ago

keremcadirci commented 5 months ago

What version of Janus is this happening on? Janus version: 1202 (1.2.2) Janus commit: a0175e89735bacfee4e5bc2185ec2e05f02a7358

Have you tested a more recent version of Janus too? No

Was this working before? I don't know

Is there a gdb or libasan trace of the issue? Please find full log at https://gist.github.com/keremcadirci/f4ea619dcc458f80c299182665258b92

Additional context I need to connect multiple SIP audio only sessions into a single audiobridge room. I'm trying to do with join message including rtp

  1. I am able to create audiobridge room ✔️

    {"body":{"request":"create","room":6846789519213138,"description":"6846789519213138","secret":"12345","pin":"12345","permanent":false,"is_private":true,"record":true,"allow_rtp_participants":true},"janus":"message","transaction":"638477021698641580"}
  2. I am able to join first RTP participant ✔️ Request:

    {"body":{"request":"join","room":6846789519213138,"pin":"12345","id":6669739804561543,"group":"unknown","muted":false,"codec":"pcma","rtp":{"ip":"192.168.12.186","port":20070,"payload_type":8}},"janus":"message","transaction":"638477021699804608"}

    Response:

    "janus": "event",
    "session_id": 934176806834367,
    "transaction": "638477021699804608",
    "sender": 3049123928170642,
    "plugindata": {
      "plugin": "janus.plugin.audiobridge",
      "data": {
         "audiobridge": "joined",
         "room": 6846789519213138,
         "id": 6669739804561543,
         "participants": [],
         "rtp": {
            "ip": "192.168.12.92",
            "port": 10000,
            "payload_type": 8
  3. I can't join second participant from rtp ❌ Request:

    {"body":{"request":"join","room":6846789519213138,"pin":"12345","id":2645901459177423,"group":"unknown","muted":false,"codec":"pcma","rtp":{"ip":"192.168.20.202","port":7078,"payload_type":8}},"janus":"message","transaction":"638477021990851334"}

    Response:

    "janus": "event",
    "session_id": 934176806834367,
    "transaction": "638477021990851334",
    "sender": 3049123928170642,
    "plugindata": {
      "plugin": "janus.plugin.audiobridge",
      "data": {
         "audiobridge": "event",
         "error_code": 491,
         "error": "Already in a room (use changeroom to join another one)"
  4. First SIP RTP Session remains connected to room, I am able to connect to the room from WebRTC ✔️ Request:

    {"janus":"message","body":{"request":"join","room":6846789519213138,"pin":"12345","display":"kerem","suspended":false},"transaction":"e7VYqDL12k2E"}

    Response:

      "janus": "event",
      "session_id": 6895538789230000,
      "transaction": "e7VYqDL12k2E",
      "sender": 5432833973896208,
      "plugindata": {
         "plugin": "janus.plugin.audiobridge",
         "data": {
            "audiobridge": "joined",
            "room": 6846789519213138,
            "id": 5306941280937977,
            "participants": []
  5. In addition participant list shows none of RTP stream participants: ❌

    "janus": "success",
    "session_id": 6377906324251837,
    "transaction": "ZHlxuVvY27",
    "sender": 4420750652201167,
    "plugindata": {
    "plugin": "janus.plugin.audiobridge",
    "data": {
      "audiobridge": "participants",
      "room": 6846789519213138,
      "participants": [
        {
          "id": 5306941280937977,
          "display": "kerem",
          "setup": true,
          "muted": false,
          "talking": false
atoppi commented 5 months ago

You need to use a different plugin handle for a second participant.

lminiero commented 5 months ago

Please use the group for further questions on this, we only use GitHub for code issues.

keremcadirci commented 5 months ago

Thank you @atoppi 2nd participant is OK