[NoSIP] WebRTC Gateway for calling legacy SIP Endpoints

233 views
Skip to first unread message

Sebastian Mauer

unread,
May 28, 2018, 5:55:38 AM5/28/18
to meetecho-janus
Hello there,

I have been recently trying to adapt the NoSIP Plugin and sample to build a Gateway allowing my WebRTC clients (which run jsSIP) to call legacy SIP endpoints.
While the client browser runs the SIP stack they are not directly interacting with Janus. I've built a WS Server proxying the SIP messages between the browser
and the UDP/5060 servers. My Server intercepts the local and remote SDP, sends it to Janus, to generate a boring SDP for the legacy side and a WebRTC compliant
SDP for the legacy side that gets passed back to the client.

The signalling seems to be OK, the remote rings and is able to pick up, however I have been unable to receive any audio so far.
To me it seems that Janus seems unable to get into a state where data starts flowing between my WebRTC and legacy endpoint.
Here's a dump from the Janus Admin API for a running session: https://pastebin.com/UH9LFpe6

To me it seems Janus just keeps queuing packets without ever forwarding them. I am stumped as to why that's happening
Any ideas where I should start looking?

Cheers,
Sebastian

Lorenzo Miniero

unread,
May 28, 2018, 7:08:23 AM5/28/18
to meetecho-janus
The Admin API dump seems fine: I see a "disconnected" ICE state, but I guess you captured after the session was being cleaned up (DTLS is marked as "created" for instance). It's more likely an issue in the exchange of plain RTP media between plugin and endpoint, so that's what you should look at. Notice that the NoSIP plugin (and the SIP and SIPre plugins for that matter) doesn't do any NAT traversal, so if it's behind a NAT and with a private address, it may not be able to exchange media with remote endpoints.

L.

Sebastian Mauer

unread,
May 30, 2018, 11:35:27 AM5/30/18
to meetecho-janus
Hey Lorenzo,

thanks for the hints. I'm now taking a closer look at the RTP flow. I don't believe NAT is the issue here, as I was able to get it to work with the SIP plugin before. My test server is located on a small VPS with a direct public IP (no 1:1 NAT)
Calling my own Asterisk on yet another VPS seems to indicate there should be RTP data flowing from the legacy callee to the gateway (rtp debug on).

However it seems the WebRTC leg never fully connects. webrtc-internals seems to suggest the connection is perpetually stuck in
iceConnectionState "checking", with the packet counter showing sent requests but no actual bytes transferred. It would be great if you have any more hints on how to debug that part of the equation.

Cheers,
Sebastian

Lorenzo Miniero

unread,
May 31, 2018, 4:35:58 AM5/31/18
to meetecho-janus
Sounds like an ICE related connectivity issue, then. You should check Admin API, Event Handlers and/or the browsers webrtc-internals to see why that's happening. This blog post may give you some ideas too: https://blog.codeship.com/webrtc-issues-and-how-to-debug-them/

L.
Reply all
Reply to author
Forward
0 new messages