WebRTC no audio?

Discussion in '3CX Phone System - General' started by lukepower, Jan 27, 2015.

Thread Status:
Not open for further replies.
  1. lukepower

    Joined:
    Jan 26, 2015
    Messages:
    5
    Likes Received:
    0
    Hello,

    I finally upgraded to 12.5 yesterday, and everything is working fine. So I went on and tried the WebRTC-Link feature, generated a Link for an extension and tried to load it on both an Android (htc One) phone and a computer (running windows 7, using latest version of Google Chrome), the page itself loads without real problems. As soon as I click the "Call" button the call is initiated and the extension rings, but I hear no audio (both at the extension phone nor at the WebRTC client).

    I tried several different scenarios: From outside (going through the firewall) as locally (so direct connection to the server), no difference. I ran Wireshark on the server to find out more, there are actually quite a few packets running from the client to the server and vice-versa, but they are not being decoded as RDP...

    Here is the Server Log:
    Code:
    27-Jan-2015 08:44:23.597   [CM503001]: Call(C:43): Incoming call from Queue:802 to <sip:100@127.0.0.1:5060>
    27-Jan-2015 08:44:22.984   [CM503007]: Call(C:42): Queue:802 has joined, contact <sip:802@127.0.0.1:5488>
    27-Jan-2015 08:44:22.983   [CM503007]: Call(C:42): Line:90000<<WebRTC has joined, contact <sip:90000@127.0.0.1:5062>
    27-Jan-2015 08:44:22.979   L:42.2[Queue] has joined to L:42.1[Line:90000<<WebRTC]
    27-Jan-2015 08:44:22.781   [CM503025]: Call(C:42): Calling T:Queue:802@[Dev:sip:802@127.0.0.1:5488;rinstance=08ad0a493209f40f] for L:42.1[Line:90000<<WebRTC]
    27-Jan-2015 08:44:22.769   [CM503027]: Call(C:42): From: Line:90000<<WebRTC ("WebRTC (192.168.1.22)" <sip:WebRTC@192.168.1.215:5060>)  to  T:Queue:802@[Dev:sip:802@127.0.0.1:5488;rinstance=08ad0a493209f40f]
    27-Jan-2015 08:44:22.769   [CM503004]: Call(C:42): Route 1: from L:42.1[Line:90000<<WebRTC] to T:Queue:802@[Dev:sip:802@127.0.0.1:5488;rinstance=08ad0a493209f40f]
    27-Jan-2015 08:44:22.769   [CM505002]: Gateway:[webrtc] Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [3CX WebRTC proxy] PBX contact: [sip:90000@127.0.0.1:5060]
    27-Jan-2015 08:44:22.768   [CM503001]: Call(C:42): Incoming call from Line:90000<<WebRTC to <sip:802@192.168.1.215:5060>
    27-Jan-2015 08:44:22.763   Line limit check: Current # of calls for line Lc:90000(@webrtc[<sip:90000@127.0.0.1:5062>]) is 1; limit is 25
    27-Jan-2015 08:44:22.760   [CM503012]: Inbound any hours rule (unnamed) for 90000 forwards to DN:802
    Using Chrome's WebRTC-internals, I found out this:
    Code:
    Statistics Conn-audio-1-0
    timestamp	27.1.2015 08:44:26
    googChannelId	Channel-audio-1
    bytesSent	0
    bytesReceived	0
    googWritable	false
    googReadable	false
    googActiveConnection	true
    googLocalAddress	192.168.1.22:52980
    googRemoteAddress	255.255.255.255:9148
    googRtt	3000
    googTransportType	udp
    googLocalCandidateType	local
    googRemoteCandidateType	local
    Looks like there are no audio packets coming or going anywhere... Also the remote address sounds wrong to me...

    I am a bit out of ideas, and grateful for any hint or help :)

    Thanks

    Lukas
     
  2. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    646
    Likes Received:
    1
    Hi there,

    If remote you need to open and forward UDP ports 9100-9199 to the pbx in firewall/router for the audio.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. lukepower

    Joined:
    Jan 26, 2015
    Messages:
    5
    Likes Received:
    0
    Hi Pierre,

    thanks for your kind reply. I tried what you said, but found no wrong IP (besides WRTC_TRUSTEDIPS = 127.0.0.1,192.168.1.215, the second one being the correct IP of the server). I had already the port forwarding configured correctly, so... Well, I am running out of ideas :) I am not sure if the script in the webRTC client uses the right IP, but don't know how to debug that part.

    Here the console part from Google Chrome, trying a local connection to the server using it's IP address:
    Code:
     0.125: This appears to be Chrome
    3cxwebrtc.js:61 0.212: Initializing with params {"clientId":"393bbb3a7a","stunAddress":null,"videoSupported":true,"videoEnabled":false,"allowNewClient":false,"callDestination":"304535","videoConstraints":{"mandatory":{"maxWidth":320,"maxHeight":200,"maxFrameRate":15},"optional":[]},"maxChatMessageLength":500}
    3cxwebrtc.js:61 0.450: Requested access to local media with mediaConstraints:  '{"audio":true,"video":false}'
    3cxwebrtc.js:61 0.462: user media success, num audio: 1, num video: 0
    3cxwebrtc.js:61 0.462: User has granted access to local media, stream = [object MediaStream]
    3cxwebrtc.js:61 0.463: Connecting to notification channel...
    3cxwebrtc.js:456 'EventSource.URL' is deprecated. Please use 'EventSource.url' instead.
    3cxwebrtc.js:61 0.467: notif channel opened: {"path":{"length":0},"cancelBubble":false,"returnValue":true,"srcElement":{"readyState":1,"withCredentials":false,"url":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a","URL":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a"},"defaultPrevented":false,"timeStamp":1422380942418,"cancelable":false,"bubbles":false,"eventPhase":2,"currentTarget":{"readyState":1,"withCredentials":false,"url":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a","URL":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a"},"target":{"readyState":1,"withCredentials":false,"url":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a","URL":"https://192.168.1.215:5001/webrtc/a.ChannelAsyncHandler?clientId=393bbb3a7a"},"type":"open"}
    3cxwebrtc.js:61 0.467: got message: {"type":"addp","data":null}
    tpc-check.html:11 Resource interpreted as Script but transferred with MIME type text/plain: "chrome-extension://noojglkidnpfjbincgijbaiedldjfbhh/data/shared/libs/postmessage.js".
    tpc-check.html:12 Resource interpreted as Script but transferred with MIME type text/plain: "chrome-extension://noojglkidnpfjbincgijbaiedldjfbhh/data/shared/tpc-check-add-cookie.js".
    3cxwebrtc.js:61 2.561: got message: {"type":"addp","data":null}
    3cxwebrtc.js:61 6.347: Making call...
    3cxwebrtc.js:61 6.347: pcConfig: {"iceServers":[]}
    3cxwebrtc.js:61 6.348: Created RTCPeerConnnection with config {"iceServers":[]}
    3cxwebrtc.js:61 6.348: Adding local stream.
    3cxwebrtc.js:61 6.349: Creating offer, with constraints: '{"mandatory":{"OfferToReceiveAudio":true,"OfferToReceiveVideo":false},"optional":[]}'.
    3cxwebrtc.js:61 6.351: SDP created: type = offer, value: v=0
    o=- 4389980702495180193 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio
    a=msid-semantic: WMS uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D
    m=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ElCZWQ6ncmA0bc7H
    a=ice-pwd:3GeolH7YlA5LbTrxaWqcShT6
    a=ice-options:google-ice
    a=fingerprint:sha-256 E2:B0:10:71:E6:D9:CF:60:31:71:03:A8:86:AF:46:34:97:A7:89:35:6A:77:DB:8D:1B:D1:E4:66:09:B9:97:31
    a=setup:actpass
    a=mid:audio
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:111 opus/48000/2
    a=fmtp:111 minptime=10
    a=rtpmap:103 ISAC/16000
    a=rtpmap:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:126 telephone-event/8000
    a=maxptime:60
    a=ssrc:239020577 cname:RHisLFEdqxnOHUcr
    a=ssrc:239020577 msid:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D 85ae12bd-dba4-4d31-b9ae-82dec426741d
    a=ssrc:239020577 mslabel:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D
    a=ssrc:239020577 label:85ae12bd-dba4-4d31-b9ae-82dec426741d
    
    3cxwebrtc.js:61 6.351: setting local SDP: {"sdp":"v=0\r\no=- 4389980702495180193 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio\r\na=msid-semantic: WMS uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D\r\nm=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:ElCZWQ6ncmA0bc7H\r\na=ice-pwd:3GeolH7YlA5LbTrxaWqcShT6\r\na=ice-options:google-ice\r\na=fingerprint:sha-256 E2:B0:10:71:E6:D9:CF:60:31:71:03:A8:86:AF:46:34:97:A7:89:35:6A:77:DB:8D:1B:D1:E4:66:09:B9:97:31\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:126 telephone-event/8000\r\na=maxptime:60\r\na=ssrc:239020577 cname:RHisLFEdqxnOHUcr\r\na=ssrc:239020577 msid:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D 85ae12bd-dba4-4d31-b9ae-82dec426741d\r\na=ssrc:239020577 mslabel:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D\r\na=ssrc:239020577 label:85ae12bd-dba4-4d31-b9ae-82dec426741d\r\n","type":"offer"}
    3cxwebrtc.js:61 6.353: Set local session description success.
    3cxwebrtc.js:61 6.354: Got candidate: type = HOST, value = candidate:514002099 1 udp 2122260223 192.168.1.22 53453 typ host generation 0, mLineIdex = 0, mid = audio
    3cxwebrtc.js:61 6.354: addCandidate: component = 1, protocol = udp, ip = 192.168.1.22, port = 53453
    3cxwebrtc.js:61 6.355: addCandiate: mediaPrefix = m=audio
    3cxwebrtc.js:61 6.355: Got candidate: type = HOST, value = candidate:514002099 2 udp 2122260223 192.168.1.22 53453 typ host generation 0, mLineIdex = 0, mid = audio
    3cxwebrtc.js:61 6.355: addCandidate: component = 2, protocol = udp, ip = 192.168.1.22, port = 53453
    3cxwebrtc.js:61 6.356: addCandiate: mediaPrefix = m=audio
    3cxwebrtc.js:61 6.455: Got candidate: type = HOST, value = candidate:1344335939 1 tcp 1518280447 192.168.1.22 0 typ host tcptype active generation 0, mLineIdex = 0, mid = audio
    3cxwebrtc.js:61 6.455: addCandidate: component = 1, protocol = tcp, ip = 192.168.1.22, port = 0
    3cxwebrtc.js:61 6.455: addCandiate: mediaPrefix = m=audio
    3cxwebrtc.js:61 6.456: Got candidate: type = HOST, value = candidate:1344335939 2 tcp 1518280447 192.168.1.22 0 typ host tcptype active generation 0, mLineIdex = 0, mid = audio
    3cxwebrtc.js:61 6.456: addCandidate: component = 2, protocol = tcp, ip = 192.168.1.22, port = 0
    3cxwebrtc.js:61 6.456: addCandiate: mediaPrefix = m=audio
    3cxwebrtc.js:61 6.506: End of candidates.
    3cxwebrtc.js:61 6.506: Sending SDP, type: offer,  data: v=0
    o=- 4389980702495180193 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio
    a=msid-semantic: WMS uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D
    m=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
    c=IN IP4 0.0.0.0
    a=candidate:1344335939 2 tcp 1518280447 192.168.1.22 0 typ host tcptype active generation 0
    a=candidate:1344335939 1 tcp 1518280447 192.168.1.22 0 typ host tcptype active generation 0
    a=candidate:514002099 2 udp 2122260223 192.168.1.22 53453 typ host generation 0
    a=candidate:514002099 1 udp 2122260223 192.168.1.22 53453 typ host generation 0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:ElCZWQ6ncmA0bc7H
    a=ice-pwd:3GeolH7YlA5LbTrxaWqcShT6
    a=ice-options:google-ice
    a=fingerprint:sha-256 E2:B0:10:71:E6:D9:CF:60:31:71:03:A8:86:AF:46:34:97:A7:89:35:6A:77:DB:8D:1B:D1:E4:66:09:B9:97:31
    a=setup:actpass
    a=mid:audio
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:111 opus/48000/2
    a=fmtp:111 minptime=10
    a=rtpmap:103 ISAC/16000
    a=rtpmap:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:126 telephone-event/8000
    a=maxptime:60
    a=ssrc:239020577 cname:RHisLFEdqxnOHUcr
    a=ssrc:239020577 msid:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D 85ae12bd-dba4-4d31-b9ae-82dec426741d
    a=ssrc:239020577 mslabel:uM9R9Zgq7BcKS83CYJiQ1wfWGwjUX57uoQ3D
    a=ssrc:239020577 label:85ae12bd-dba4-4d31-b9ae-82dec426741d
    , is renegotiating: false
    3cxwebrtc.js:61 6.519: MakeCall success: {"d":{"success":true,"reason":"MakeCall started call with SDP offer"}}
    3cxwebrtc.js:61 8.721: got message: {"type":"sdp_answer","data":{"type":"answer","sdp":"v=0\r\no=WebRTC 61157130 84106485 IN IP4 192.168.1.215\r\ns=3CXWebRTC audio call\r\nc=IN IP4 192.168.1.215\r\nt=0 0\r\nm=audio 9112 RTP/SAVPF 9 0 8 126\r\nc=IN IP4 255.255.255.255\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:126 telephone-event/8000\r\na=candidate:1234 1 udp 914120514 255.255.255.255 9112 typ host generation 0\r\na=candidate:1234 2 udp 914120514 255.255.255.255 9112 typ host generation 0\r\na=ice-ufrag:QXpfMztCUzw1Kitj\r\na=ice-pwd:WXg8WWdzdm9ZPWovVGFGfipH\r\na=fingerprint:sha-256 79:22:91:81:A6:E1:05:FB:5D:07:45:73:6A:52:FD:7E:AC:14:EB:8D:04:1A:0D:D7:20:D3:74:EF:CB:69:11:3D\r\na=rtcp-mux\r\na=setup:active\r\n","transactionId":0}}
    3cxwebrtc.js:61 8.721: setRemoteDescription sdp: v=0
    o=WebRTC 61157130 84106485 IN IP4 192.168.1.215
    s=3CXWebRTC audio call
    c=IN IP4 192.168.1.215
    t=0 0
    m=audio 9112 RTP/SAVPF 9 0 8 126
    c=IN IP4 255.255.255.255
    a=rtpmap:9 G722/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:126 telephone-event/8000
    a=candidate:1234 1 udp 914120514 255.255.255.255 9112 typ host generation 0
    a=candidate:1234 2 udp 914120514 255.255.255.255 9112 typ host generation 0
    a=ice-ufrag:QXpfMztCUzw1Kitj
    a=ice-pwd:WXg8WWdzdm9ZPWovVGFGfipH
    a=fingerprint:sha-256 79:22:91:81:A6:E1:05:FB:5D:07:45:73:6A:52:FD:7E:AC:14:EB:8D:04:1A:0D:D7:20:D3:74:EF:CB:69:11:3D
    a=rtcp-mux
    a=setup:active
    
    3cxwebrtc.js:61 8.725: Set remote session description success.
    3cxwebrtc.js:61 8.725: Not receiving any stream.
    3cxwebrtc.js:61 8.725: Remote stream added.
    3cxwebrtc.js:61 12.508: got message: {"type":"bye","data":null}
    3cxwebrtc.js:61 12.508: Session terminated.
    3cxwebrtc.js:61 12.509: stop
    3cxwebrtc.js:61 12.561: got message: {"type":"addp","data":null}
    3cxwebrtc.js:61 22.564: got message: {"type":"addp","data":null}
    3cxwebrtc.js:61 32.580: got message: {"type":"addp","data":null}
    Thanks anyway
     
  4. lukepower

    Joined:
    Jan 26, 2015
    Messages:
    5
    Likes Received:
    0
    Update: I added to my windows hosts file the IP address of the 3CX server together with its external FQDN, and now it works locally.

    So I guess that now it's up to the firewall doing the right job, something is wrong on that side: The call gets correctly initiated and also the end is ok, just the audio is still missing :)
     
Thread Status:
Not open for further replies.