meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.15k stars 2.47k forks source link

[ SIP Gateway ] register failed. #11

Closed ducdung0909 closed 10 years ago

ducdung0909 commented 10 years ago

Hi, I got demo Video Call, Video MCU successfully but I still stucked at SIP Gateway feature. I can't register a sip user to Asterisk Sip Server. Log of Janus gives thounsand of lines and It doesn't stop unless I quit janus.

tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 9303, trying 12032 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 12032, trying 14761 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 14761, trying 17490 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 17490, trying 20219 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 20219, trying 22948 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 22948, trying 25677 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 25677, trying 28406 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 28406, trying 31135 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 31135, trying 33864 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 33864, trying 36593 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 36593, trying 39322 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 39322, trying 42051 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 42051, trying 44780 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 44780, trying 47509 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 47509, trying 50238 ............................................

What should I do to resolve this issue ? Thanks !

lminiero commented 10 years ago

This looks like a sofia-sip issue: I guess something on your machine is preventing it to bind to a port for the SIP client. I'll have to check whether there's a way to force it to stop after a number of attempts, rather than trying indefinitely.

Do you have anything installed that may interfere? The only related issue I could find around was on SElinux that could cause something like this. If so, you may try disabling it temporarily to see if that fixes it, and in case then try to prepare a policy for it rather than disabling it entirely.

tchandler48 commented 10 years ago

I have been able to register devices to Asterisk via the Janus-gateway and complete calls. (there are some issues that are being investigated, but it does work somewhat)...

I am using Ubuntu 12.04 and Asterisk 11.8.0, with the vp8/opus patch applied. I have listed below the configuration files that I had to change

Hope this helps you get going, if not post question(s) and I will be glad to help.

Cheers Tom C.

Config files:

http.conf [general] enabled=yes bindaddr=0.0.0.0 bindport=8088

rtp.conf [general] rtpstart=10000 rtpend=20000 icesupport=yes stunaddr=stun.l.google.com:19302

sip.conf [general] allowoverlap=no realm=192.168.1.171 (your ip address) udpbindaddr=0.0.0.0:5060 transport=udp,ws videosupport=always nat=force_rport,comedia encryption=yes avpf=yes

[authentication] [2250] ;ata device type=friend secret=1234 host=dynamic context=local qualify=yes transport=udp directmedia=no videosupport=no disallow=all allow=ulaw

[8000] ;chrome browser windows 7 secret=1234 context=local host=dynamic trustrpid=yes sendrpid=no type=friend qualify=yes transport=udp,ws callcounter=yes icesupport=yes directmedia=no disallow=all allow=ulaw,vp8

[8001] ;chromium linux browser secret=1234 context=local host=dynamic trustrpid=yes sendrpid=no type=friend qualify=yes transport=ws callcounter=yes icesupport=yes directmedia=no transport=udp,ws disallow=all allow=ulaw,vp8

On Wed, Mar 19, 2014 at 3:24 AM, ducdung0909 notifications@github.comwrote:

Hi, I got demo Video Call, Video MCU successfully but I still stucked at SIP Gateway feature. I can't register a sip user to Asterisk Sip Server. Log of Janus gives thounsand of lines and It doesn't stop unless I quit janus.

tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 9303, trying 12032 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 12032, trying 14761 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 14761, trying 17490 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 17490, trying 20219 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 20219, trying 22948 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 22948, trying 25677 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 25677, trying 28406 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 28406, trying 31135 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 31135, trying 33864 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 33864, trying 36593 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 36593, trying 39322 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 39322, trying 42051 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 42051, trying 44780 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 44780, trying 47509 tport_bind_server(0x7f7b842ad0d0): cannot bind all transports to port 47509, trying 50238 ............................................

What should I do to resolve this issue ? Thanks !

Reply to this email directly or view it on GitHubhttps://github.com/meetecho/janus-gateway/issues/11 .

ducdung0909 commented 10 years ago

Hi, @lminiero I have set disabled on SELinux before.

@tchandler48 : Here is my asterisk configuration. htttp.conf and rtp.conf is same as yours. sip.conf [1000] type=peer username=1000 host=dynamic secret=1000 context=local1xxx hasiax = no hassip = yes encryption = yes avpf = yes icesupport = yes videosupport=yes directmedia=no

Should I adjust anything ?

lminiero commented 10 years ago

I don't think Asterisk has anything to do with this. The problem lies within the SIP stack the plugin uses even before getting to Asterisk at all. What is the output of the console when the gateway is started? I'm especially thinking about the output when the SIP plugin is first started, as it may display information on the cause of the issue.

tchandler48 commented 10 years ago

Hi,

What release of Asterisk are you running? (11.x.x, etc)

I would add in the [1000] disallow=all allow=ulaw,vp8

I would change type=peer to type=friend

if running Asterisk 11.x.x, and you want video, you must apply the patch I attached to my earlier message.

So If, I understand your issue, the sip gateway web page will not register to the Asterisk?

Cheers Tom C

On Wed, Mar 19, 2014 at 11:11 PM, ducdung0909 notifications@github.comwrote:

Hi, @lminiero https://github.com/lminiero I have set disabled on SELinux before.

@tchandler48 https://github.com/tchandler48 : Here is my asterisk configuration. htttp.conf and rtp.conf is same as yours. sip.conf [1000] type=peer username=1000 host=dynamic secret=1000 context=local1xxx hasiax = no hassip = yes encryption = yes avpf = yes icesupport = yes videosupport=yes directmedia=no

Should I have adjust anything ?

Reply to this email directly or view it on GitHubhttps://github.com/meetecho/janus-gateway/issues/11#issuecomment-38133808 .

tchandler48 commented 10 years ago

In my testing of the sip plugin, registration was not a problem. The first time I tried it, it registered to Asterisk. I later had issues on connections between different end points, but registering with Asterisk was painless......

Cheers Tom C

On Thu, Mar 20, 2014 at 5:03 AM, Lorenzo Miniero notifications@github.comwrote:

I don't think Asterisk has anything to do with this. The problem lies within the SIP stack the plugin uses even before getting to Asterisk at all. What is the output of the console when the gateway is started? I'm especially thinking about the output when the SIP plugin is first started, as it may display information on the cause of the issue.

Reply to this email directly or view it on GitHubhttps://github.com/meetecho/janus-gateway/issues/11#issuecomment-38150529 .

ducdung0909 commented 10 years ago

@tchandler48 : I can't make register for an user, I haven't made a call yet. @lminiero : Here is the output of console when gate start.


Starting Meetecho Janus (WebRTC Gateway)

Reading configuration from ./conf/janus.cfg [janus.cfg] [general] configs_folder: ./conf plugins_folder: ./plugins [webserver] http: yes port: 8088 https: no secure_port: 8889 base_path: /janus [certificates] cert_pem: certs/mycert.pem cert_key: certs/mycert.key Checking command line arguments... [janus.cfg] [general] configs_folder: ./conf plugins_folder: ./plugins [webserver] http: yes port: 8088 https: no secure_port: 8889 base_path: /janus [certificates] cert_pem: certs/mycert.pem cert_key: certs/mycert.key Available interfaces: lo: 127.0.0.1 eth0: 192.168.16.60 br0: 192.168.16.60 virbr0: 192.168.122.1 Using 192.168.16.60 as local IP... Using certificates: certs/mycert.pem certs/mycert.key Fingerprint of our certificate is C5:5F:DA:7D:84:47:B1:BF:6B:55:16:62:48:31:3E:D3:F1:7B:25:89:92:4A:4B:4D:4D:D9:D5:AF:EA:D8:15:44 Plugins folder: ./plugins Loading plugin 'janus_streaming.so'... JANUS Streaming plugin created! Configuration file: ./conf/janus.plugin.streaming.cfg [janus.plugin.streaming.cfg] [gstreamer-sample] type: rtp id: 1 description: Opus/VP8 live stream coming from gstreamer audio: yes video: yes audioport: 5002 audiopt: 111 audiortpmap: opus/48000/2 videoport: 5004 videopt: 100 videortpmap: VP8/9000 [file-live-sample] type: live id: 2 description: a-law file source filename: ./plugins/streams/radio.alaw audio: yes video: no [file-ondemand-sample] type: ondemand id: 3 description: mu-law file source filename: ./plugins/streams/music.mulaw audio: yes video: no Adding stream 'gstreamer-sample' Audio enabled, Video enabled Adding stream 'file-live-sample' Adding stream 'file-ondemand-sample' ::: [3][file-ondemand-sample] mu-law file source (on demand, file source) ::: [2][file-live-sample] a-law file source (live, file source) ::: [1][gstreamer-sample] Opus/VP8 live stream coming from gstreamer (live, RTP source) [janus_streaming.c:janus_streaming_filesource_thread:960:] [janus_streaming.c:janus_streaming_relay_thread:1065:] Filesource RTP thread starting... Opening file source ./plugins/streams/radio.alaw... Starting relay thread JANUS Streaming plugin initialized! Streaming audio file: ./plugins/streams/radio.alaw Version: 1 (0.0.1) [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 gstreamer. [gstreamer-sample] Audio listener bound to port 5002 Loading plugin 'janus_videoroom.so'... [gstreamer-sample] Video listener bound to port 5004 JANUS VideoRoom plugin created! Configuration file: ./conf/janus.plugin.videoroom.cfg [janus.plugin.videoroom.cfg] [1234] description: Demo Room publishers: 6 bitrate: 128000 fir_freq: 10 Adding video room '1234' Created videoroom: 1234 (Demo Room) ::: [1234][Demo Room] 128000, max 6 publishers, FIR frequency of 10 seconds JANUS VideoRoom plugin initialized! Version: 1 (0.0.1) [janus.plugin.videoroom] JANUS VideoRoom plugin This is a plugin implementing a videoconferencing MCU for Janus, something like Licode. Loading plugin 'janus_videocall.so'... [janus_videoroom.c:janus_videoroom_handler:538:] Joining thread JANUS VideoCall plugin created! Configuration file: ./conf/janus.plugin.videocall.cfg [janus.plugin.videocall.cfg] JANUS VideoCall plugin initialized! Version: 1 (0.0.1) [janus.plugin.videocall] JANUS VideoCall plugin [janus_videocall.c:janus_videocall_handler:349:] This is a simple video call plugin for Janus, allowing two WebRTC peers to call each other through the gateway. Joining thread Loading plugin 'janus_sip.so'... JANUS SIP plugin created! Configuration file: ./conf/janus.plugin.sip.cfg [janus.plugin.sip.cfg] Available interfaces: lo: 127.0.0.1 eth0: 192.168.16.60 br0: 192.168.16.60 [janus_streaming.c:janus_streaming_handler:644:] virbr0: 192.168.122.1 Joining thread Using 192.168.122.1 as local IP... JANUS SIP plugin initialized! Version: 1 (0.0.1) [janus.plugin.sip] JANUS SIP plugin [janus_sip.c:janus_sip_handler:491:] This is a simple SIP plugin for Janus, allowing WebRTC peers to register at a SIP server and call SIP user agents through the gateway. Joining thread Loading plugin 'janus_voicemail.so'... JANUS VoiceMail plugin created! Configuration file: ./conf/janus.plugin.voicemail.cfg [janus.plugin.voicemail.cfg] [general] path: ./html/voicemail/ base: /voicemail/ Recordings path: ./html/voicemail/ Recordings base: /voicemail/ JANUS VoiceMail plugin initialized! Version: 1 (0.0.1) [janus.plugin.voicemail] JANUS VoiceMail plugin This is a plugin implementing a very simple VoiceMail service for Janus, recording Opus streams. [janus_voicemail.c:janus_voicemail_handler:416:] Loading plugin 'janus_echotest.so'... Joining thread JANUS EchoTest plugin created! Configuration file: ./conf/janus.plugin.echotest.cfg [janus.plugin.echotest.cfg] JANUS EchoTest plugin initialized! Version: 1 (0.0.1) [janus.plugin.echotest] JANUS EchoTest plugin This is a trivial EchoTest plugin for Janus, just used to showcase the plugin interface. Loading plugin 'janus_audiobridge.so'... [janus_echotest.c:janus_echotest_handler:323:] Joining thread JANUS AudioBridge plugin created! Configuration file: ./conf/janus.plugin.audiobridge.cfg [janus.plugin.audiobridge.cfg] [1234] description: Demo Room sampling_rate: 16000 record: yes Adding audio room '1234' Created audiobridge: 1234 (Demo Room) ::: [1234][Demo Room] 16000 (will be recorded) JANUS AudioBridge plugin initialized! Version: 1 (0.0.1) [janus.plugin.audiobridge] JANUS AudioBridge plugin This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams. Audio bridge thread starting... [janus_audiobridge.c:janus_audiobridge_handler:498:] Thread is for mixing room 1234 (Demo Room)... Joining thread Recording requested, opened file /tmp/janus-audioroom-1234.wav for writing HTTP webserver started (port 8088, /janus path listener)... HTTPS webserver disabled

lminiero commented 10 years ago

From the log I can only see that, for what concerns interfaces, the gateway is using 192.168.16.60, while 192.168.122.1 is used by the SIP plugin. Was this done on purpose, e.g., via configuration? Do both the interfaces work fine? Anyway, that should not be the issue here, as that autodetection is only used to populate the IP addresses in SIP and SDP accordingly.

Can you try building and running the Sofia-SIP test applications that you can find here, and check whether they work fine? Just to try and understand where the specific issue might be:

https://gitorious.org/sofia-sip/pages/SofiaTutorial

This will build two small applications, a caller and callee, that you can use to test both sides of a SIP session using the stack. The only difference when creating the NUA between the tests and my plugin is that the test application binds to a specific port (5060 for the callee, 5062 for the caller) for all interfaces (0.0.0.0), while the plugin uses a wildcard for the port instead (0.0.0.0:*).

Keep me posted!

ducdung0909 commented 10 years ago

Dear Iminero, I'm going try to use your recommendation applications for checking. I will reply soon. Thank you.

ducdung0909 commented 10 years ago

Hi, I turned off all virt interface ( br0, virbr0 ) and got successful registeration. But now, I can't make a call and get warning from asterisk :

[Mar 24 10:30:43] WARNING[3994][C-00000000]: chan_sip.c:10124 process_sdp: Received AVP profile in audio offer but AVPF is enabled: audio 17194 RTP/AVP 111 103 104 0 8 106 105 13 126 [Mar 24 10:30:43] WARNING[3994][C-00000000]: chan_sip.c:10464 process_sdp: Insufficient information in SDP (c=)...

I think I should install newest version of Asterisk ( my current version is 11.5 without any patch ).

lminiero commented 10 years ago

I guess that was the reason then: maybe sofia-sip doesn't like virtual interfaces? I'll check if there's an easy way to skip them, and I'll add a way to instruct the plugin to only bind on specific interfaces rather than all of them.

For what concerns the Asterisk error, no need to update anything. I guess you just have a avpf=yes in your sip.conf, that when enabled rejects all SDPs that are just AVP instead. If it's not there for a specific reason, you may want to comment that or turn it into an avpf=no; otherwise, try changing the code in line 673 of the SIP plugin, so that the RTP/SAVPFis turned into an RTP/AVPF rather than RTP/AVP, which should make your Asterisk happy.

ducdung0909 commented 10 years ago

Hi, As your suggestion, I can make call now without any warning of Asterisk. I try to make some noise but I dont hear anything at both side. Moreover, the caller is only asked about using microphone but the callee is asked to use both camera and microphone. I see caller have 2 black screens at video area while callee has local video and black screen of remote video area.

lminiero commented 10 years ago

That's a problem I noticed as well. Specifically, even when the caller only negotiates audio, if video is enabled on Asterisk the SDP for the callee has a video line as well. In case the callee supports video this means it is negotiated as well, despite the fact that the caller never asked for it and is not going to do it. This is why you're getting the black video on the callee side: you have a video element, but no video frames.

Can you at least confirm that calling generic default extensions on Asterisk (e.g., echo test, confbridge, any DTMF-based menu, etc.) works fine?

Apart from that, there still are issues @tchandler48 documented in a different issue, and that I hope I'll be able to look into ASAP.

lminiero commented 10 years ago

Try disabling video on the Asterisk side (in sip.conf, video=no) to also check whether or not you're able to get audio calls to work that way.

ducdung0909 commented 10 years ago

Hi, I remove these configuration in sip.conf at every specific user. avpf=yes encryption=yes videosupport=yes

Now, the call is established and connected but still not heard anything at bothside. Here is log of asterisk.

== Using SIP RTP CoS mark 5 -- Executing [1001@local1xxx:1] Dial("SIP/1000-00000000", "SIP/1001") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1001 -- SIP/1001-00000001 is ringing -- SIP/1001-00000001 answered SIP/1000-00000000 -- Channel SIP/1000-00000000 joined 'simple_bridge' basic-bridge <6b7791d0-0d81-4ac2-a8be-cf24cf4fd1c3> -- Channel SIP/1001-00000001 joined 'simple_bridge' basic-bridge <6b7791d0-0d81-4ac2-a8be-cf24cf4fd1c3>

and output of gateway:

Request completed, freeing data Got a HTTP GET request on /janus/1698893131... ... Just parsing headers for now... Host: 192.168.16.64:8088 Connection: keep-alive Accept: application/json, text/javascript, /; q=0.01 Origin: http://192.168.16.64 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 Referer: http://192.168.16.64/janus/siptest.html Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Got a HTTP GET request on /janus/1698893131... ... parsing request... Session: 1698893131 Session 1698893131 found... returning message ... handling long poll... [3562290375] Got an RTCP packet (audio stream)! [1062166045] Got an RTCP packet (audio stream)! [3562290375] Got an RTCP packet (audio stream)! Long poll time out for session 3086404912... We have a message to serve... {"janus" : "keepalive"} Request completed, freeing data Got a HTTP GET request on /janus/3086404912... ... Just parsing headers for now... Host: 192.168.16.64:8088 Connection: keep-alive Accept: application/json, text/javascript, /; q=0.01 Origin: http://192.168.16.64 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.76 Safari/537.36 Referer: http://192.168.16.64/janus/siptest.html Accept-Encoding: gzip,deflate,sdch Accept-Language: vi,fr-FR;q=0.8,fr;q=0.6,en-US;q=0.4,en;q=0.2,ko;q=0.2,af;q=0.2 Got a HTTP GET request on /janus/3086404912... ... parsing request... Session: 3086404912 Session 3086404912 found... returning message ... handling long poll... [1062166045] Got an RTCP packet (audio stream)! [3562290375] Got an RTCP packet (audio stream)! [1062166045] Got an RTCP packet (audio stream)!

ducdung0909 commented 10 years ago

Sorry, but I see I get one more issue. When I hangup the call, at both points ( caller and callee ), the button "hangup" switch to blur effect, they don't switch back to call button for making another calls. The call doesn't hangup completely.

tchandler48 commented 10 years ago

I am traveling, but will look at this tonight. I see a couple of things and also I need to check the chrome settings.

Tom C.

On Mon, Mar 24, 2014 at 10:54 PM, ducdung0909 notifications@github.comwrote:

Hi, I remove these configuration in sip.conf at every specific user. avpf=yes encryption=yes videosupport=yes

Now, the call is established and connected but still not heard anything at bothside. Here is log of asterisk.

== Using SIP RTP CoS mark 5 -- Executing [1001@local1xxx:1] Dial("SIP/1000-00000000", "SIP/1001") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1001 -- SIP/1001-00000001 is ringing -- SIP/1001-00000001 answered SIP/1000-00000000 -- Channel SIP/1000-00000000 joined 'simple_bridge' basic-bridge -- Channel SIP/1001-00000001 joined 'simple_bridge' basic-bridge

and output of gateway:

Request completed, freeing data Got a HTTP GET request on /janus/1698893131... ... Just parsing headers for now... Host: 192.168.16.64:8088 Connection: keep-alive Accept: application/json, text/javascript, /; q=0.01 Origin: http://192.168.16.64 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 Referer: http://192.168.16.64/janus/siptest.html Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Got a HTTP GET request on /janus/1698893131... ... parsing request... Session: 1698893131 Session 1698893131 found... returning message ... handling long poll... [3562290375] Got an RTCP packet (audio stream)! [1062166045] Got an RTCP packet (audio stream)! [3562290375] Got an RTCP packet (audio stream)! Long poll time out for session 3086404912... We have a message to serve... {"janus" : "keepalive"} Request completed, freeing data Got a HTTP GET request on /janus/3086404912... ... Just parsing headers for now... Host: 192.168.16.64:8088 Connection: keep-alive Accept: application/json, text/javascript, /; q=0.01 Origin: http://192.168.16.64 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.76 Safari/537.36 Referer: http://192.168.16.64/janus/siptest.html Accept-Encoding: gzip,deflate,sdch Accept-Language: vi,fr-FR;q=0.8,fr;q=0.6,en-US;q=0.4,en;q=0.2,ko;q=0.2,af;q=0.2 Got a HTTP GET request on /janus/3086404912... ... parsing request... Session: 3086404912 Session 3086404912 found... returning message ... handling long poll... [1062166045] Got an RTCP packet (audio stream)! [3562290375] Got an RTCP packet (audio stream)! [1062166045] Got an RTCP packet (audio stream)!

Reply to this email directly or view it on GitHubhttps://github.com/meetecho/janus-gateway/issues/11#issuecomment-38528612 .

lminiero commented 10 years ago

@ducdung0909 I just updated the SIP plugin, could you let me known if the new version still gives you the same issues? Please notice that the syntax for registering and calling has changed a bit to make the plugin more generic and usable with other SIP servers as well (e.g., Kamailio).

ducdung0909 commented 10 years ago

Dear lminiero, I have tried new source of janus gateway but not successful registering. The "register" button was blured all time and I got the warning as below #################

..... Creating new session: 1531118051 Creating new handle in session 1531118051: 825975178 There's a message for JANUS SIP plugin [ERR] [janus_sip.c:janus_sip_handler:678:] Missing or invalid element (proxy) ################# Moreover, I switch back to last previous source and got successful registering. But I also got warning below: ################# ..... There's a message for JANUS SIP plugin outbound(0x7f17d4001690): FAILED to validate sip:1001@192.168.16.64:59385;transport=udp outbound(0x7f17d4001690): FAILED with 404 Not Found Detaching handle from JANUS SIP plugin No WebRTC media anymore Destroying session 2327869492 ##################

For more information, I used same configuration content of janus. Asterisk or Kamailio is normal, successfully registering and calling by using softphone ( zoiper, xlite, jitsi ...).

lminiero commented 10 years ago

Hi,

As I said to Tom in the other issue, the web page and JavaScript code for the SIP demo have changed, since the syntax used by the plugin were modified. Are you using the updated ones for interacting with the updated plugin and gateway?

Lorenzo Il 16/mag/2014 04:24 "ducdung0909" notifications@github.com ha scritto:

Dear lminiero, I have tried new source of janus gateway but not successful registering. The "register" button was blured all time and I got the warning as below #################

..... Creating new session: 1531118051 Creating new handle in session 1531118051: 825975178 There's a message for JANUS SIP plugin [ERR] [janus_sip.c:janus_sip_handler:678:] Missing or invalid element (proxy) ################# Moreover, I switch back to last previous source and got successful registering. But I also got warning below: ################# ..... There's a message for JANUS SIP plugin outbound(0x7f17d4001690): FAILED to validate sip:1001@192.168.16.64:59385;transport=udp outbound(0x7f17d4001690): FAILED with 404 Not Found Detaching handle from JANUS SIP plugin No WebRTC media anymore Destroying session 2327869492 ##################

For more information, I used same configuration content of janus. Asterisk or Kamailio is normal, successfully registering and calling by using softphone ( zoiper, xlite, jitsi ...).

— Reply to this email directly or view it on GitHubhttps://github.com/meetecho/janus-gateway/issues/11#issuecomment-43289092 .

ducdung0909 commented 10 years ago

Dear @lminiero , I know you made some changes .I have downloaded newest one from https://github.com/meetecho/janus-gateway and run install.sh. As i said in previous comment, I faild on registering with newest and still successful registering with older source. The test with newest source ( updated 1-2 days ago ) give warning :

There's a message for JANUS SIP plugin [ERR] [janus_sip.c:janus_sip_handler:678:] Missing or invalid element (proxy)

lminiero commented 10 years ago

I know you updated the gateway :-)

What I meant is that the demo pages that interface to it have changed as well. The error you're getting (missing proxy) means that the web page (siptest.html+siptest.js) are not sending any proxy field in the JSON request. The updated SIP plugin asks for a proxy value, while the old one used a proxy_ip and proxy_port separated pieces of info, which makes me think you're still using the old siptest.html/.js demos to contact the gateway, and that would explain the issue.

Make sure you're using the updated web demos and keep me posted.

ducdung0909 commented 10 years ago

Dear @lminiero , Sorry, I forget replace the newest client. Now I can register and make a call with clearly voice. One more thing, the caller is asked for using microphone but the callee is asked for using both camera and microphone. This is a only a voice call so we can disable camera request at callee side ? Thank you very much.

lminiero commented 10 years ago

You're right, good catch, I think that by default, when answering, siptest.js is requesting accesso to both audio and video no matter what is being negotiated, while we should first look at the offer we got and chech whether both audio and video were requested. I'll add this check in the next update and keep you posted.

ducdung0909 commented 10 years ago

Hi, Sorry for post many seperated comments, I keep posting as soon as possible. I run the command "sip show peers" in Asterisk CLI and see that.

Name/username Host
1000/1000 192.168.16.64
1001/1001 192.168.16.64
1002/1002 192.168.16.164

but

lminiero commented 10 years ago

I just pushed a fix for the getUserMedia thing: just replace the siptest.js you have with the new one, and let me know if that works for you now. PS: make sure the updated version is loaded, clearing the browser cache might help there.

About sip show peers, yes, that's normal. In fact, with Janus involved the actual SIP client is Janus itself, and not the web browser: the Janus SIP plugin acts as a SIP client on behalf of the browser, and so that's why it's the Janus IP that appears when looking at registered peers.

ducdung0909 commented 10 years ago

Hi @lminiero , The request of using camera at callee dissappear now, audio call is clear. About the host IP, that's right, I clearly understand. Thank you so much.

lminiero commented 10 years ago

Ok closing the issue then.