Hello all,
I compiled and installed JANUS (apparently) properly. I’m trying to connect from a webrtc/sip client (https://github.com/pion/example-webrtc-applications/tree/master/sip-to-webrtc) which should simply connect via websocket. I enabled http/websocket/sip, I set on the sip cfg the local public IP as the local_ip, local_media and sdo_ip,
here’s the startup log:
Janus version: 1200 (1.2.0)
Janus commit: e1c7704cfdef76cd5b177ba7fbb92c041bddd40e
Compiled on: Sat Jul 15 13:12:33 UTC 2023
Logger plugins folder: /opt/janus/lib/janus/loggers
[WARN] Couldn't access logger plugins folder...
---------------------------------------------------
Starting Meetecho Janus (WebRTC Server) v1.2.0
---------------------------------------------------
Checking command line arguments...
[janus.jcfg]
general: {
configs_folder: /opt/janus/etc/janus
plugins_folder: /opt/janus/lib/janus/plugins
transports_folder: /opt/janus/lib/janus/transports
events_folder: /opt/janus/lib/janus/events
loggers_folder: /opt/janus/lib/janus/loggers
debug_level: 7
admin_secret: janusoverlord
protected_folders: [
/bin
/boot
/dev
/etc
/initrd
/lib
/lib32
/lib64
/proc
/sbin
/sys
/usr
/var
/opt/janus/bin
/opt/janus/etc
/opt/janus/include
/opt/janus/lib
/opt/janus/lib32
/opt/janus/lib64
/opt/janus/sbin
]
}
certificates: {
}
media: {
}
nat: {
nice_debug: false
ice_ignore_list: vmnet
}
plugins: {
}
transports: {
}
loggers: {
}
events: {
}
Debug/log level is 7
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Selecting local IP address...
Using 172.31.90.251 as local IP...
Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
TURN REST API backend: (disabled)
[WARN] Janus is deployed on a private address (172.31.90.251) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN...
Using certificates:
(null)
(null)
Crypto: BoringSSL
No cert/key specified, autogenerating some...
Generating DTLS key / cert
Fingerprint of our certificate: D8:97:EA:7C:E2:59:72:0D:BB:C2:C2:F1:CA:4C:28:67:AA:37:0B:22:D6:BB:63:2C:50:39:C5:45:43:AD:E4:23
Joining RTCP thread for RTP forwarders...
Event handlers support disabled
Plugins folder: /opt/janus/lib/janus/plugins
Loading plugin 'libjanus_recordplay.so'...
Sessions watchdog started
JANUS Record&Play plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.recordplay.jcfg
Joining Janus requests handler thread
[janus.plugin.recordplay.jcfg]
general: {
path: /opt/janus/share/janus/recordings
}
Updating recordings list in /opt/janus/share/janus/recordings
Importing recording '1234.nfo'...
Pre-parsing file /opt/janus/share/janus/recordings/rec-sample-audio.mjr to generate ordered index...
This is an old audio recording, assuming Opus
Pre-parsing file /opt/janus/share/janus/recordings/rec-sample-video.mjr to generate ordered index...
This is an old video recording, assuming VP8
JANUS Record&Play plugin initialized!
Joining Record&Play handler thread
Version: 4 (0.0.4)
[janus.plugin.recordplay] JANUS Record&Play plugin
This is a trivial Record&Play plugin for Janus, to record WebRTC sessions and replay them.
Plugin API version: 102
Loading plugin 'libjanus_videocall.so'...
JANUS VideoCall plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.videocall.jcfg
[janus.plugin.videocall.jcfg]
general: {
}
JANUS VideoCall plugin initialized!
Joining VideoCall handler thread
Version: 6 (0.0.6)
[janus.plugin.videocall] JANUS VideoCall plugin
This is a simple video call plugin for Janus, allowing two WebRTC peers to call each other through a server.
Plugin API version: 102
Loading plugin 'libjanus_sip.so'...
JANUS SIP plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.sip.jcfg
[janus.plugin.sip.jcfg]
general: {
local_ip: 4.3.2.1
local_media_ip: 4.3.2.1
sdp_ip: 4.3.2.1
keepalive_interval: 120
behind_nat: true
register_ttl: 3600
rtp_port_range: 20000-40000
sip_timer_t1x64: 32000
}
[WARN] Error setting local IP address to 4.3.2.1, falling back to detecting IP address...
IP to advertise in SDP: 4.3.2.1
SIP keep-alive interval set to 120 seconds
SIP Timer T1X64 set to 32000 milliseconds
SIP registration TTL set to 3600 seconds
SIP User-Agent set to Janus WebRTC Server SIP Plugin 0.0.8
SIP RTP/RTCP port range: 20000 -- 40000
Local IP set to 172.31.90.251
JANUS SIP plugin initialized!
Joining SIP handler thread
Version: 8 (0.0.8)
[janus.plugin.sip] JANUS SIP plugin
This is a simple SIP plugin for Janus, allowing WebRTC peers to register at a SIP server and call SIP user agents through a Janus instance.
Plugin API version: 102
Loading plugin 'libjanus_textroom.so'...
JANUS TextRoom plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.textroom.jcfg
[janus.plugin.textroom.jcfg]
general: {
json: indented
}
room-1234: {
description: Demo Room
secret: adminpwd
}
Adding TextRoom room 'room-1234'
Created TextRoom: 1234 (Demo Room, public, secret: adminpwd, pin: no pin, history: 0 messages)
::: [1234][Demo Room]
JANUS TextRoom plugin initialized!
Joining TextRoom handler thread
Version: 2 (0.0.2)
[janus.plugin.textroom] JANUS TextRoom plugin
This is a plugin implementing a text-only room for Janus, using DataChannels.
Plugin API version: 102
Loading plugin 'libjanus_audiobridge.so'...
JANUS AudioBridge plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.audiobridge.jcfg
[janus.plugin.audiobridge.jcfg]
general: {
}
room-1234: {
description: Demo Room
secret: adminpwd
sampling_rate: 16000
record: false
}
Local IP set to 172.31.90.251
Adding AudioBridge room 'room-1234'
Sampling rate for mixing: 16000
Created AudioBridge room: 1234 (Demo Room, public, secret: adminpwd, pin: no pin)
::: [1234][Demo Room] 16000 (will NOT be recorded)
Audio bridge thread starting...
Thread is for mixing room 1234 (Demo Room) at rate 16000...
JANUS AudioBridge plugin initialized!
Joining AudioBridge handler thread
Version: 12 (0.0.12)
[janus.plugin.audiobridge] JANUS AudioBridge plugin
This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.
Plugin API version: 102
Loading plugin 'libjanus_videoroom.so'...
JANUS VideoRoom plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.videoroom.jcfg
[janus.plugin.videoroom.jcfg]
general: {
}
room-1234: {
description: Demo Room
secret: adminpwd
publishers: 6
bitrate: 128000
fir_freq: 10
record: false
}
Adding VideoRoom room 'room-1234'
Created VideoRoom: 1234 (Demo Room, public, opus/vp8 codecs, secret: adminpwd, pin: no pin, pvtid: optional)
::: [1234][Demo Room] 128000, max 6 publishers, FIR frequency of 10 seconds, opus audio codec(s), vp8 video codec(s)
JANUS VideoRoom plugin initialized!
Joining VideoRoom handler thread
Version: 9 (0.0.9)
[janus.plugin.videoroom] JANUS VideoRoom plugin
This is a plugin implementing a videoconferencing SFU (Selective Forwarding Unit) for Janus, that is an audio/video router.
Plugin API version: 102
Loading plugin 'libjanus_echotest.so'...
JANUS EchoTest plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.echotest.jcfg
[janus.plugin.echotest.jcfg]
general: {
}
JANUS EchoTest plugin initialized!
Joining EchoTest handler thread
Version: 7 (0.0.7)
[janus.plugin.echotest] JANUS EchoTest plugin
This is a trivial EchoTest plugin for Janus, just used to showcase the plugin interface.
Plugin API version: 102
Loading plugin 'libjanus_nosip.so'...
JANUS NoSIP plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.nosip.jcfg
[janus.plugin.nosip.jcfg]
general: {
rtp_port_range: 20000-40000
}
NoSIP RTP/RTCP port range: 20000 -- 40000
Local IP set to 172.31.90.251
JANUS NoSIP plugin initialized!
Version: 1 (0.0.1)
[janus.plugin.nosip] JANUS NoSIP plugin
This is a simple RTP bridging plugin that leaves signalling details (e.g., SIP) up to the application.
Plugin API version: 102
Loading plugin 'libjanus_streaming.so'...
JANUS Streaming plugin created!
Configuration file: /opt/janus/etc/janus/janus.plugin.streaming.jcfg
[janus.plugin.streaming.jcfg]
general: {
}
rtp-sample: {
type: rtp
id: 1
description: Opus/VP8 live stream coming from external source
metadata: You can use this metadata section to put any info you want!
audio: true
video: true
audioport: 5002
audiopt: 111
audiocodec: opus
videoport: 5004
videopt: 100
videocodec: vp8
secret: adminpwd
}
multistream-test: {
type: rtp
id: 123
description: Multistream test (1 audio, 2 video)
metadata: This is an example of a multistream mountpoint: you'll get an audio stream and two video feeds
media: [
{
type: audio
mid: a
label: Audio stream
port: 5102
pt: 111
codec: opus
}
{
type: video
mid: v1
label: Video stream #1
port: 5104
pt: 100
codec: vp8
}
{
type: video
mid: v2
label: Video stream #2
port: 5106
pt: 100
codec: vp8
}
]
secret: adminpwd
}
file-live-sample: {
type: live
id: 2
description: a-law file source (radio broadcast)
filename: /opt/janus/share/janus/streams/radio.alaw
audio: true
video: false
secret: adminpwd
}
file-ondemand-sample: {
type: ondemand
id: 3
description: mu-law file source (music)
filename: /opt/janus/share/janus/streams/music.mulaw
audio: true
video: false
secret: adminpwd
}
Adding Streaming mountpoint 'rtp-sample'
Adding Streaming mountpoint 'multistream-test'
Starting streaming relay thread
Adding Streaming mountpoint 'file-live-sample'
Starting streaming relay thread
Adding Streaming mountpoint 'file-ondemand-sample'
Filesource (live) thread starting...
[file-live-sample] Opening file source /opt/janus/share/janus/streams/radio.alaw...
[file-live-sample] Streaming audio file: /opt/janus/share/janus/streams/radio.alaw
::: [1][rtp-sample] Opus/VP8 live stream coming from external source (live, RTP source, public, pin: no pin)
::: [123][multistream-test] Multistream test (1 audio, 2 video) (live, RTP source, public, pin: no pin)
::: [2][file-live-sample] a-law file source (radio broadcast) (live, file source, public, pin: no pin)
::: [3][file-ondemand-sample] mu-law file source (music) (on demand, file source, public, pin: no pin)
JANUS Streaming plugin initialized!
Joining Streaming handler thread
Version: 10 (0.0.10)
[janus.plugin.streaming] JANUS Streaming plugin
This is a streaming plugin for Janus, allowing WebRTC peers to watch/listen to pre-recorded files or media generated by an external source.
Plugin API version: 102
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_pfunix.so'...
JANUS Unix Sockets transport plugin created!
Configuration file: /opt/janus/etc/janus/janus.transport.pfunix.jcfg
[janus.transport.pfunix.jcfg]
general: {
enabled: false
json: indented
}
admin: {
admin_enabled: false
}
Unix Sockets server disabled (Janus API)
Unix Sockets server disabled (Admin API)
[WARN] No Unix Sockets server started, giving up...
[WARN] The 'janus.transport.pfunix' plugin could not be initialized
Loading transport plugin 'libjanus_http.so'...
JANUS REST (HTTP/HTTPS) transport plugin created!
Configuration file: /opt/janus/etc/janus/janus.transport.http.jcfg
HTTP transport timer started
[janus.transport.http.jcfg]
general: {
events: true
json: indented
base_path: /janus
http: true
port: 8088
https: true
secure_port: 8089
}
admin: {
admin_base_path: /admin
admin_http: false
admin_port: 7088
admin_https: false
}
cors: {
}
certificates: {
}
Binding to all interfaces for the Janus API HTTP webserver
HTTP webserver started (port 8088, /janus path listener)...
[FATAL] [transports/janus_http.c:janus_http_init:835] Missing certificate/key path
Admin/monitor HTTP webserver disabled
Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
Version: 2 (0.0.2)
[janus.transport.http] JANUS REST (HTTP/HTTPS) transport plugin
This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.
Plugin API version: 8
Janus API: enabled
Admin API: disabled
Loading transport plugin 'libjanus_websockets.so'...
JANUS WebSockets transport plugin created!
Configuration file: /opt/janus/etc/janus/janus.transport.websockets.jcfg
[janus.transport.websockets.jcfg]
general: {
events: true
json: indented
ws: true
ws_port: 8188
wss: true
wss_port: 8989
ws_logging: debug
}
admin: {
admin_ws: false
admin_ws_port: 7188
admin_wss: false
}
cors: {
}
certificates: {
}
libwebsockets logging: 16
[libwebsockets][DEBUG] _realloc: size 9000: context
[libwebsockets][DEBUG] _realloc: size 8192: fds table
[libwebsockets][DEBUG] _realloc: size 8192: lws_lookup
[libwebsockets][DEBUG] _realloc: size 904: event pipe wsi
[libwebsockets][DEBUG] lws_role_transition: 0x5631024c60b0: wsistate 0x200, ops pipe
[libwebsockets][DEBUG] event pipe fd 23
[libwebsockets][DEBUG] __insert_wsi_socket_into_fds: 0x5631024c60b0: tsi=0, sock=23, pos-in-fds=0
[libwebsockets][DEBUG] _realloc: size 776: create vhost
[libwebsockets][DEBUG] _realloc: size 168: vhost-specific plugin table
[libwebsockets][DEBUG] _realloc: size 48: same vh list
[libwebsockets][DEBUG] _realloc: size 904: listen wsi
[libwebsockets][DEBUG] _lws_vhost_init_server: lws_socket_bind says 8188
[libwebsockets][DEBUG] lws_role_transition: 0x5631024c6750: wsistate 0x200, ops listen
[libwebsockets][DEBUG] lws_vhost_bind_wsi: vh default: wsi listen/http-only, count_bound_wsi 1
[libwebsockets][DEBUG] __insert_wsi_socket_into_fds: 0x5631024c6750: tsi=0, sock=24, pos-in-fds=1
Websockets server started (port 8188)...
[FATAL] [transports/janus_websockets.c:janus_websockets_create_ws_server:443] Missing certificate/key path
Admin Websockets server disabled
Secure Admin Websockets server disabled
JANUS WebSockets transport plugin initialized!
Version: 1 (0.0.1)
[janus.transport.websockets] JANUS WebSockets transport plugin
This transport plugin adds WebSockets support to the Janus API via libwebsockets.
Plugin API version: 8
Janus API: enabled
Admin API: disabled
Loading transport plugin 'libjanus_mqtt.so'...
JANUS MQTT transport plugin created!
Configuration file: /opt/janus/etc/janus/janus.transport.mqtt.jcfg
[janus.transport.mqtt.jcfg]
general: {
enabled: false
json: indented
url: tcp://localhost:1883
subscribe_topic: to-janus
publish_topic: from-janus
}
admin: {
subscribe_topic: to-janus-admin
publish_topic: from-janus-admin
}
status: {
enabled: false
}
MQTT SSL support disabled
[WARN] MQTT support disabled for both Janus and Admin API, giving up
JANUS MQTT transport plugin destroyed!
[WARN] The 'janus.transport.mqtt' plugin could not be initialized
Joining NoSIP handler thread
WebSockets thread started
[libwebsockets][DEBUG] _lws_state_transition: system: changed 1 'CONTEXT_CREATED' -> 2 'INITIALIZED'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 2 'INITIALIZED' -> 3 'IFACE_COLDPLUG'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 3 'IFACE_COLDPLUG' -> 4 'DHCP'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 4 'DHCP' -> 5 'TIME_VALID'
[WSS-0x5631024c1d00] 27 (LWS_CALLBACK_PROTOCOL_INIT)
[libwebsockets][DEBUG] _lws_state_transition: system: changed 5 'TIME_VALID' -> 6 'POLICY_VALID'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 6 'POLICY_VALID' -> 7 'REGISTERED'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 7 'REGISTERED' -> 8 'AUTH1'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 8 'AUTH1' -> 9 'AUTH2'
[libwebsockets][DEBUG] _lws_state_transition: system: changed 9 'AUTH2' -> 10 'OPERATIONAL'
from the client side, i just set the public ip and port 8188, since for now i just want to see it connecting.
When i try to connect, i see the client can talk to JANUS but JANUS immediately drops the connection, and i’m not sure why.
[libwebsockets][DEBUG] accepted new conn port 65025 on fd=25
[libwebsockets][DEBUG] lws_get_idlest_tsi: 2 1023
[libwebsockets][DEBUG] _realloc: size 904: new server wsi
[libwebsockets][DEBUG] new wsi 0x7f2ad4000df0 joining vhost default, tsi 0
[libwebsockets][DEBUG] lws_vhost_bind_wsi: vh default: wsi none/none, count_bound_wsi 2
[libwebsockets][DEBUG] lwsi_set_state(0x7f2ad4000df0, 0x20000200)
[libwebsockets][DEBUG] lws_role_transition: 0x7f2ad4000df0: wsistate 0x20000016, ops h1
[libwebsockets][DEBUG] __lws_set_timeout: 0x7f2ad4000df0: 20 secs, reason 3
[libwebsockets][DEBUG] __insert_wsi_socket_into_fds: 0x7f2ad4000df0: tsi=0, sock=25, pos-in-fds=2
[libwebsockets][DEBUG] _realloc: size 976: ah struct
[libwebsockets][DEBUG] _realloc: size 4096: ah data
[libwebsockets][DEBUG] _lws_change_pollfd: wsi 0x7f2ad4000df0: fd 25 events 1 -> 1
[libwebsockets][DEBUG] __lws_set_timeout: 0x7f2ad4000df0: 10 secs, reason 25
[libwebsockets][DEBUG] Attached ah immediately
[libwebsockets][DEBUG] rops_handle_POLLIN_h1: 0x7f2ad4000df0: wsistate 0x20000016
[libwebsockets][DEBUG] lws_read_h1: h1 path: wsi state 0x16
[libwebsockets][DEBUG] lwsi_set_state(0x7f2ad4000df0, 0x2000020a)
[libwebsockets][DEBUG] checking sip
[libwebsockets][DEBUG] __lws_close_free_wsi: real just_kill_connection: 0x7f2ad4000df0 (sockfd 25)
[libwebsockets][DEBUG] _lws_change_pollfd: wsi 0x56028f14cc70: fd 23 events 1 -> 1
[libwebsockets][DEBUG] lwsi_set_state(0x7f2ad4000df0, 0x20000020)
[libwebsockets][DEBUG] __lws_close_free_wsi_final: wsi 0x7f2ad4000df0: fd 25
[libwebsockets][DEBUG] lws_vhost_unbind_wsi: vh default: count_bound_wsi 1
[libwebsockets][DEBUG] __lws_free_wsi: 0x7f2ad4000df0, remaining wsi 2, tsi fds count 2
Any ideas what i could be doing wrong?
Thanks!
David