how exactly can i configure the sip gateway with astersik

1,592 views
Skip to first unread message

alejo...@gmail.com

unread,
Oct 18, 2017, 9:46:07 AM10/18/17
to meetecho-janus
Greetings meetecho group, 

im having trouble trying to configure the sip-gateway with an freepbx 14 gateway, i have successfully made a connection inside the same network with a hardphone and the sip-gateway, i had to use local addreses to made said connection and sometimes it wouldnt be bi-directional (i could made call from hard-phone to meetecho, but couldnt call from meetecho to hardphone) or other hardphones wont even work.

for the application i want to use the gateway to voip video calls to remote phones, the sip-gateway would be inside a local network with a normal Nat and various kinds of hardphones would contact the gateway via video calls. 

i dont have much understanding of the sip stack, but i have sucesfully made connection between sip phones inside and outside nats.But understanding when to use stun how to configure stun with asterisk or trickle ice has me stuck and wasting time, since there not so much written about using webrtc and asterisk. 

anybody has an extension.conf or details in what should be enabled to get video calls?

for example, do i need to allow dtls? force mux, etc?

Jan Dolan

unread,
Oct 19, 2017, 2:04:34 AM10/19/17
to meetecho-janus
Hello,

I'm not sure about setting up freepbx, in our environment we use Asterisk and kamailio for routing. Basically you should just create a SIP trunk for Janus gateway and route your calls to it (in extensions.conf you will dial it like sipnumber@janus_sip_trunk_name). First you should focus just on audio calls and then try video.

The SIP trunk should enable video codecs, especially vp8 and h264 (depends on used browser), also allow ulaw/alaw for audio transfer. We alowed force_rport, rewrite_contact, rtp_symmetric. You have to set an aor, with contact to Janus Gateway (like sip:janus.ip:sipport).

I'm sorry I cannot post you simply the extensions.conf, we store most of our configuration in the database.

Dne středa 18. října 2017 15:46:07 UTC+2 alejo...@gmail.com napsal(a):

saul diaz

unread,
Oct 19, 2017, 12:03:39 PM10/19/17
to meetecho-janus
We use asterisk as the register, we run an older version of asterisk (11) and pretty much the sip gateway works as a proxy sending the registration to asterisk, webrtc in 11 was a nightmare b/c keeps breaking after chrome changes so we move to janus (great work Lorenzo) , it took us a day to set up all with janus. 

Create your users as friends in asterisk (sip registration), so your configuration works as a device in freepbx 

the janus client will behave just like sip client in freepbx. you don't need srtp or even ice or webrtc in the asterisk or freepbx, specially if janus and asterisk can see each others. ensure you are also opening the rtp ports asterisk usually work 10-20k and janus 10-40k , plus all the settings jan just wrote. specially force_rport, comedia for the nat settings of your devices. you life will be way easier if asterisk/janus will be in public ips, b/c asterisk and double nat is not something funny. 

alejo...@gmail.com

unread,
Oct 19, 2017, 1:20:37 PM10/19/17
to meetecho-janus
ensure you are also opening the rtp ports asterisk usually work 10-20k and janus 10-40k , plus all the settings jan just wrote. specially force_rport, comedia for the nat settings 

this could be my problem, thanks!

i had 10k-20k ports open, but i would see it taking <20k ports, yea i have a public ip and a domain, so in order words, janus works like a normal softphone, but the connection between the browser and janus server is doing all the heavy lifting?

i only had open the ports 10k-20k for asterisk. 

Lorenzo Miniero

unread,
Oct 20, 2017, 4:27:22 AM10/20/17
to meetecho-janus
Notice that the SIP plugin currently doesn't have a configurable RTP range as the Janus core, and so it will always pick a port between 10000 and 60000 for its own RTP/RTCP bindings (so for the media on the RTP side). We might make it configurable in the future.

L.

Lorenzo Miniero

unread,
Oct 20, 2017, 4:28:28 AM10/20/17
to meetecho-janus

Lorenzo Miniero

unread,
Oct 20, 2017, 9:15:11 AM10/20/17
to meetecho-janus
Looked an easy enough change, so I added the ability to configure a range of ports for the SIP plugin too:


Notice that this only applies to RTP and RTCP, and not to the ports the SIP stack uses for signalling.

L.
Reply all
Reply to author
Forward
0 new messages