Posting here in case someone experience the same things. There are some mismatch in snake_case / single word param names which is what got me.
The correct (aka working in Janus v0.11.3) syntax is the following.
mountpoint creation request (portion).
%{
audio: true,
audioport: 0,
audiopt: 111,
audiortcpport: 0,
audiortpmap: "opus/48000/2",
id: 4156689202136007071,
request: "create",
type: "rtp",
video: true,
videoport: 0,
videopt: 96,
videortcpport: 0,
videortpmap: "VP8/90000"
},
Notice for instance the param name audioport. If audio_port is provided instead, Janus replies with: "error" => "Missing mandatory element (audioport)", "error_code" => 453.
Response (portion):
%{
"plugindata" => %{
"data" => %{
"created" => "mp-4156689202136007071",
"permanent" => false,
"stream" => %{
"audio_port" => 10000,
"audio_rtcp_port" => 10001,
"description" => "mp-4156689202136007071",
"id" => 4156689202136007071,
"is_private" => false,
"type" => "live",
"video_port" => 10002,
"video_rtcp_port" => 10003
},
"streaming" => "created"
}
}
...
}
In the response, the param name is audio_port.
Now, the forwarder request MUST have snake_case variables, so it should look something like (portion):
%{
audio_port: 10000,
audio_pt: 111,
audio_rtcp_port: 10001,
host: "192.168.56.4",
publisher_id: 4156689202136007071,
request: "rtp_forward",
room: 5059931385069278060,
video_port: 10002,
video_pt: 96,
video_rtcp_port: 10003
}
And you'll get a response confirming that both channels and RTCP are set up (also in snake_case):
"plugindata" => %{
"data" => %{
"publisher_id" => 4156689202136007071,
"room" => 5059931385069278060,
"rtp_stream" => %{
"audio" => 10000,
"audio_rtcp" => 10001,
"audio_stream_id" => 3429034396,
"host" => "192.168.56.4",
"video" => 10002,
"video_rtcp" => 10003,
"video_stream_id" => 3001958328
},
"videoroom" => "rtp_forward"
},
"plugin" => "janus.plugin.videoroom"
},
...
}
If you use the same variable naming in the forwarder request as in the mountpoint (so non-snake_case variables such as audioport, etc), then the forwarder is created but doesn't work, see the difference in the response that is missing all of the port information:
"plugindata" => %{
"data" => %{
"publisher_id" => 5650305750134037649,
"room" => 5059931385069278060,
"rtp_stream" => %{"host" => "192.168.56.4"},
"videoroom" => "rtp_forward"
}
},
...
}
Lorenzo, I appreciate both of your help and the work you do on Janus. I'm actually working to promote its usage. However, I can assure you that if I post to a mailing list I've previously read docs & examples, and unfortunately sometimes there are confusing elements, hence my original question.
I hope this can provide some feedback and help others.
All the best,
r.