Janus gateway and Kamailio SIP server

1,106 views
Skip to first unread message

DESSA Rémy

unread,
Jul 11, 2016, 10:34:44 AM7/11/16
to meetecho-janus
Hi everyone,

I am just writing to you cause I have a problem and I don't manage to fix it.
What's the matter ?
My colleague and I, have to set up a communication between a cell phone (SIP protocol) and a browser on a computer.
We have at our disposal 2 computers and one server. The sip phone is emulated by Jitsi software and we work on Ubuntu 14.04 machines.
Concerning the server we have 2 IP addresses. Moreover, we have a STUN and TURN servers open too in order to pass through the NAT.

Currently we have already installed kamailio server(@ip1) and Janus-Gateway(@ip2) on the server. But it is still impossible to establish a connection between Janus SIP gateway website and Jistsi (SIP). After reading all documentations about Janus-Gateway and kamailio and modify as well as possible all of the configuration files, our problem keeps remaining ?

We both think that it is probably due to the configuration files, nevertheless we have don't managed to fix the issue yet.

So I am asking you to help us in this work or, at least, giving us some advices and tips to succeed in this.

Thank you in advance

Lorenzo Miniero

unread,
Jul 11, 2016, 10:58:34 AM7/11/16
to meetecho-janus
The SIP plugin doesn't use ICE on the SIP side. ICE is only used for the WebRTC side, in Janus. I guess that may be part of the reason, if the other peer instead expects ICE support to establish connectivity.

L.

DESSA Rémy

unread,
Jul 12, 2016, 8:41:39 AM7/12/16
to meetecho-janus
Hi Lorenzo,

thank you for your quick answer but we need more informations.

If I understood, We have to use ICE on webSocket side (WEBRTC) and not on the SIP side.
Stop me if I said something wrong please.

We still don't manage to link the Janus Gateway with the SIP server KAMAILIO. How can we proceed ?
And secondly, we think that we have to configure the webSockets on Janus Gateway so as to set up SIP over webSocket but it is always a failure and we are starting of losing hope to be honest

Thank you a lot for your time

RD

Lorenzo Miniero

unread,
Jul 12, 2016, 8:47:43 AM7/12/16
to meetecho-janus
Your confusion comes from the fact you're mixing the concepts. Janus only uses WebSockets, WebRTC, ICE etc. with the WebRTC users, so on the WebRTC side of things. When using the SIP plugin (and so you want to have a WebRTC user get in touch with a SIP infrastructure), on the SIP side none of those things are used. There you use plain SIP over UDP, TCP or TLS (depending on what you configure), NOT SIP over WebSockets: Janus in this case acts as a gateway. ICE, as anticipated, is not supported on the Janus SIP side of things. Besides, web users don't see SIP at all: they talk simple JSON with the SIP plugin, and the whole SIP stack is originated and handled within the SIP plugin itself.

Using it should be quite straightforward: you choose the SIP proxy to register at, provide the credentials if needed, and then either start a call or wait for one. If a call can't be set up for some reason, use whatever tool you're more comfortable with to understand why (you just have to debug plain SIP).

L.

DESSA Rémy

unread,
Jul 13, 2016, 5:22:15 AM7/13/16
to meetecho-janus
Hi Lorenzo,

We are currently talking about what you aid with my colleague, but how to be sure that our data or signaling date pass through the gateway ?
In order to be more precise please find enclosed a scheme made up from our internship master.

Thank you again !
scheme.jpg

Lorenzo Miniero

unread,
Jul 13, 2016, 8:30:14 AM7/13/16
to meetecho-janus
I have the feeling you didn't read my previous mail... ;-)

Between the browser and Janus, you do NOT have SIP over WebSockets. The browser doesn't see any SIP. The only SIP stuff it knows about are SIP URIs, which it uses as identifiers. It uses the Janus API to communicate with Janus and its plugins, and to setup PeerConnections. The SIP plugin, in particular, uses a very simple JSON based protocol to start/stop calls, notify about incoming calls, and things like that. Again, NOT SIP.

Besides, the browser does NOT talk to the SIP server directly, as your diagram seems to suggest on the top part. You should put the SIP server between the gateway and the SIP phone. Think of Janus like a regular SIP endpoint talking "native SIP", on the SIP end.

L.

DESSA Rémy

unread,
Jul 13, 2016, 8:55:38 AM7/13/16
to meetecho-janus
Hi,

We read carefully your previous mail of course ! Don't worry about it ;)
It is less confused in our minds now. Indeed we tried to set up this connexion with a false scheme and it is for this reason that we didn't succeed in understand you and what we really have to do.
We will try to configure our server and connexions and next come back to you to tell whether it works.

Thanks a lot

DESSA Rémy

unread,
Jul 14, 2016, 5:10:43 AM7/14/16
to meetecho-janus
Hi Lorenzo,

Sorry for disturbing you again, but we really want to succeed in this task!
We both understand that the browser talks to the gateway which talks to the sip server and then to the cell phone.

But we wonder how to contact the gateway directly. We have at our disposal 2 interfaces (eth0 and eth1) with 2 different IP addresses.
Have we to use only one of the 2? Besides we have registered 2 sip accounts in mySQL database with Kamailio server. When we start a call how can
we proceed to be sure that our data flow pass through the gateway ? Have we to join a specific IP ?

We are using Janus Sip gateway demo and Jitsi to make theses calls
https://janus.conf.meetecho.com/siptest.html

And if you want our configuration files we can enclose them of course.

Thank you

RD


Le lundi 11 juillet 2016 15:34:44 UTC+1, DESSA Rémy a écrit :

DESSA Rémy

unread,
Jul 14, 2016, 7:34:32 AM7/14/16
to meetecho-janus
It's working now! We just have fixed the "problem".
Thank you for helping us.


Le lundi 11 juillet 2016 15:34:44 UTC+1, DESSA Rémy a écrit :

Lorenzo Miniero

unread,
Jul 14, 2016, 12:47:41 PM7/14/16
to meetecho-janus
Cool! What was the problem eventually? Just in case it can be of help to other people, here.

L.

DESSA Rémy

unread,
Jul 18, 2016, 8:12:57 AM7/18/16
to meetecho-janus
Hi Lorenzo,

We didn't have install a webServer and after installing it the connection between 2 webRTC (pc) client worked.
But we face now to another problem : when we try to contact our server Kamailio from a cell phone browser, a webRTC error appears. (We are using SIPGateway Demo on Janus)
Indeed when we make a call between 2 Pc we can notice that the gateway works ( creating new session, ICE, etc.. ) but it is impossible to contact our server IP address from a cell phone.

Do you think that you can find where is the problem ?

thanks a lot

RD


Le lundi 11 juillet 2016 15:34:44 UTC+1, DESSA Rémy a écrit :
Reply all
Reply to author
Forward
0 new messages