rtp_forward API error 456

571 views
Skip to first unread message

be...@newrow.com

unread,
May 9, 2018, 6:05:37 AM5/9/18
to meetecho-janus
Hey guys, I'm trying to forward a stream from one janus to a different one, both hosted on 2 different virtual machines
no matter what I do , I keep getting the same API error, 

Got a Janus API request from janus.transport.websockets (0x7f30a8006b40)
[(null)] Returning Janus API error 456 (Missing mandatory element (transaction))

once I add the transaction field

I get Got a Janus API request from janus.transport.websockets (0x7f30a8006b40)
[(null)] Returning Janus API error 456 (Missing mandatory element (janus))

which both aren't listed in the videoroom rtp_forward documentation -> https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_videoroom.c

after ive added "janus": "message"

and still getting another API error (janus API  error 457 unhandled reqest 'message' at this path... ), after numerous attempts, following related topics in the group, couldn't find a working solution, came here..

I'm using websockets to communicate between my signaling server and the janus service


I'm probably missing something.

The steps that I have done so far:

  1. configured streaming plugin to expect to receive audio stream on port x and video stream on port y
  2. published a stream from a webserver to my signaling server , and published it to Janus media server
  3. sent an rtp_forward message to Janus server A to forward that stream to Janus server B
note both januses are running on debug level 7 , im expecting to see that stream running on both servers after forwarding, without no success


configurations:


configured the streaming plugin to 

[gstreamer-testing]
type = rtp
id = 4
description = Opus/VP8 live stream coming from gstreamer
audio = yes
video = yes
audioport = 10030
audiopt = 111
audiortpmap = opus/48000/2
videoport = 10035
videopt = 100
videortpmap = VP8/90000
secret = password


rtp forwarding with failed attempts:


attempt 1.

{
"videoroom" : "rtp_forward",
"room" : <unique numeric ID, same as request>,
"publisher_id" : <unique numeric ID, same as request>,
"rtp_stream" : {
"host" : "<host this forwarder is streaming to, same as request>",
"audio" : <audio port, same as request if configured>,
"audio_stream_id" : <unique numeric ID assigned to the audio RTP forwarder, if any>,
"video" : <video port, same as request if configured>,
"video_stream_id" : <unique numeric ID assigned to the main video RTP forwarder, if any>,
"video_2" : <second video port, same as request if configured>,
"video_stream_id_2" : <unique numeric ID assigned to the second video RTP forwarder, if any>,
"video_3" : <third video port, same as request if configured>,
"video_stream_id_3" : <unique numeric ID assigned to the third video RTP forwarder, if any>,
"data" : <data port, same as request if configured>,
"data_stream_id" : <unique numeric ID assigned to datachannel messages forwarder, if any>
}
}


Attempt 2.

{
"request" : "rtp_forward",
"room" : <unique numeric ID of the room the publisher is in>,
"publisher_id" : <unique numeric ID of the publisher to relay externally>,
"host" : "<host address to forward the RTP and data packets to>",
"audio_port" : <port to forward the audio RTP packets to>,
"audio_ssrc" : <audio SSRC to use to use when streaming; optional>,
"audio_ptype" : <audio payload type to use when streaming; optional>,
"video_port" : <port to forward the video RTP packets to>,
"video_ssrc" : <video SSRC to use to use when streaming; optional>,
"video_ptype" : <video payload type to use when streaming; optional>,
"video_port_2" : <if simulcasting or doing VP9-SVC, port to forward the video RTP packets from the second substream/layer to>,
"video_ssrc_2" : <if simulcasting or doing VP9-SVC, video SSRC to use to use the second substream/layer; optional>,
"video_ptype_2" : <if simulcasting or doing VP9-SVC, video payload type to use the second substream/layer; optional>,
"video_port_3" : <if simulcasting or doing VP9-SVC, port to forward the video RTP packets from the third substream/layer to>,
"video_ssrc_3" : <if simulcasting or doing VP9-SVC, video SSRC to use to use the third substream/layer; optional>,
"video_ptype_3" : <if simulcasting or doing VP9-SVC, video payload type to use the third substream/layer; optional>,
"data_port" : <port to forward the datachannel messages to>,
"srtp_suite" : <length of authentication tag (32 or 80); optional>,
"srtp_crypto" : "<key to use as crypto (base64 encoded key as in SDES); optional>"
}




attempt 3.
{

"videoroom":"rtp_forward",

         "room":"487",

         "publisher_id"123,

         "rtp_stream" :{

             "host",ip

          }

     }



attempt 4.


{"body":{"request":"rtp_forward","publisher_id":3153615434288867,"room": 1234, "host":"127.0.0.1","port":5000,"secret":"adminpwd" }, "janus":"message","apisecret" : "janusrocks","transaction":"o4vup0qoomd"}

Lorenzo Miniero

unread,
May 9, 2018, 6:22:24 AM5/9/18
to meetecho-janus
You're likely using the Janus API wrong: https://janus.conf.meetecho.com/docs/rest

L.

be...@newrow.com

unread,
May 10, 2018, 12:03:04 PM5/10/18
to meetecho-janus
great, managed to get a successful response for the rtp forwarding video and audio,
but I can't see the stream on the other janus machine while im on debug level 7...

Is that normal?
Reply all
Reply to author
Forward
0 new messages