Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to pion/webrtc@v3 #2

Closed
Sean-Der opened this issue Dec 31, 2020 · 11 comments
Closed

Port to pion/webrtc@v3 #2

Sean-Der opened this issue Dec 31, 2020 · 11 comments

Comments

@Sean-Der
Copy link

Hey @tylerlong

I just released pion/webrtc@v3 would you be open to accepting a PR upgrading this repo to v3?

I also can add a demo of sending audio as well (and not just playing) we created pion/mediadevices that shows how to capture microphone/webcam in Go.

thanks!

@tylerlong
Copy link
Contributor

@Sean-Der thanks for the update. I will definitely add this to my todo list.

@tylerlong
Copy link
Contributor

tylerlong commented Feb 20, 2021

I am working on it. But I encountered some issue.

@Sean-Der Appreciate if you could give me some advice.

I think it might be caused by the ICE server configuration.

Source code is here https://github.com/ringcentral/ringcentral-softphone-go/tree/dev (dev branch instead of master branch)

Output is here:

➜  softphone git:(dev) ✗ go test
2021/02/19 17:17:27 ↑↑↑
 REGISTER sip:sip.ringcentral.com SIP/2.0
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
Contact: <sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws>;expires=600
Via: SIP/2.0/WSS ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK5871d360-6268-49da-85cd-3e9884ae3426
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
To: <sip:17203861294*[email protected]>
Content-Length: 0
User-Agent: github.com/ringcentral/ringcentral-softphone-go
CSeq: 8082 REGISTER


2021/02/19 17:17:27 ↓↓↓
 SIP/2.0 100 Trying
Via: SIP/2.0/WSS ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK5871d360-6268-49da-85cd-3e9884ae3426;received=98.33.76.34
To: <sip:17203861294*[email protected]>
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
CSeq: 8082 REGISTER
Content-Length: 0


2021/02/19 17:17:27 ↓↓↓
 SIP/2.0 401 Unauthorized
Via: SIP/2.0/WSS ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK5871d360-6268-49da-85cd-3e9884ae3426;received=98.33.76.34
To: <sip:17203861294*[email protected]>;tag=e8355122b9829038163286be13f77b9a-9b61
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
CSeq: 8082 REGISTER
WWW-Authenticate: Digest realm="sip.ringcentral.com", nonce="YDBkU2AwYydfP0KJ+HcgkX1JT5pFVNTu"
Content-Length: 0


2021/02/19 17:17:27 ↑↑↑
 REGISTER sip:sip.ringcentral.com SIP/2.0
Via: SIP/2.0/TCP ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK6027441b-17d5-4d87-ac85-192a2ad57c7d
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
To: <sip:17203861294*[email protected]>
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
Contact: <sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws>;expires=600
Content-Length: 0
User-Agent: github.com/ringcentral/ringcentral-softphone-go
Authorization: Digest algorithm=MD5, username="802398772016", realm="sip.ringcentral.com", nonce="YDBkU2AwYydfP0KJ+HcgkX1JT5pFVNTu", uri="sip:sip.ringcentral.com", response="58b6e9da6fd5386feae4ecc42407f2a4"
CSeq: 8083 REGISTER


2021/02/19 17:17:27 ↓↓↓
 SIP/2.0 100 Trying
Via: SIP/2.0/TCP ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK6027441b-17d5-4d87-ac85-192a2ad57c7d;received=98.33.76.34
To: <sip:17203861294*[email protected]>
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
CSeq: 8083 REGISTER
Content-Length: 0


2021/02/19 17:17:27 ↓↓↓
 SIP/2.0 200 OK
Via: SIP/2.0/TCP ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;branch=z9hG4bK6027441b-17d5-4d87-ac85-192a2ad57c7d;received=98.33.76.34
To: <sip:17203861294*[email protected]>;tag=e8355122b9829038163286be13f77b9a-f38e
From: <sip:17203861294*[email protected]>;tag=2f1b3545-0843-4faf-8b31-ef10eb166d51
Call-ID: 3bc64b24-50cb-4d9c-81bd-c9868dd6b3ca
CSeq: 8083 REGISTER
Contact: <sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws>;expires=53
Content-Length: 0


2021/02/19 17:17:38 ↓↓↓
 INVITE sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.227:8083;branch=z9hG4bKnot2H0jCKQc
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.123.246-5070-c87825ca-a7a8-429
Call-Id: b5eae1f6-e3d5-4ad8-9892-5362be8809c8
CSeq: 571341309 INVITE
Max-Forwards: 67
Contact: <sip:[email protected]:8083;transport=wss>
Content-Type: application/sdp
Call-Info: <[email protected]>;purpose=info
P-rc: <Msg><Hdr SID="35740065514848" Req="168655862252121355527787" Cmd="6" From="#[email protected]:5060" To="17203861294*11115"/><Bdy SrvLvl="-149699523" SrvLvlExt="406" Phn="+1650430xxxx" Nm="WIRELESS CALLER" ToPhn="+16502886382" ToNm="Tyler Liu" RecUrl=""/></Msg>
p-rc-api-call-info: callAttributes=reject,send-vm
p-rc-api-ids: party-id=p-c7016cdeb4924ffa96215552824e1d43-2;session-id=s-c7016cdeb4924ffa96215552824e1d43
User-Agent: RC_SIPWRP_123.246
Content-Length: 872

v=0
o=- 478673684804790855 8151817297159307898 IN IP4 104.245.57.133
s=SmcSip
c=IN IP4 104.245.57.133
t=0 0
m=audio 24356 RTP/SAVPF 109 111 18 0 8 9 96 101
a=rtpmap:109 OPUS/16000
a=fmtp:109 useinbandfec=1
a=rtcp-fb:109 ccm tmmbr
a=rtpmap:111 OPUS/48000/2
a=fmtp:111 useinbandfec=1
a=rtcp-fb:111 ccm tmmbr
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 g722/8000
a=rtpmap:96 ilbc/8000
a=fmtp:96 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:24357
a=rtcp-mux
a=setup:actpass
a=fingerprint:sha-1 EB:36:59:40:1B:FA:6F:9E:37:74:EF:56:6C:B7:FD:BF:0C:48:DB:99
a=ice-ufrag:GxmXscbc
a=ice-pwd:chIviiFjSIONWU2kHj99WJTJUM
a=candidate:NgOC1oKBrTNj8SpZ 1 UDP 2130706431 104.245.57.133 24356 typ host
a=candidate:NgOC1oKBrTNj8SpZ 2 UDP 2130706430 104.245.57.133 24357 typ host

pc INFO: 2021/02/19 17:17:38 signaling state changed to have-remote-offer
ice DEBUG: 17:17:38.547192 agent.go:449: Started agent: isControlling? false, remoteUfrag: "GxmXscbc", remotePwd: "chIviiFjSIONWU2kHj99WJTJUM"
pc INFO: 2021/02/19 17:17:38 signaling state changed to stable
ice INFO: 2021/02/19 17:17:38 Setting new connection state: Checking
pc INFO: 2021/02/19 17:17:38 ICE connection state changed: checking
ice WARNING: 2021/02/19 17:17:38 pingAllCandidates called with no candidate pairs. Connection is not possible yet.
2021/02/19 17:17:38 ↑↑↑
 SIP/2.0 200 OK
CSeq: 571341309 INVITE
Call-Id: b5eae1f6-e3d5-4ad8-9892-5362be8809c8
Content-Length: 781
User-Agent: github.com/ringcentral/ringcentral-softphone-go
Content-Type: application/sdp
Contact: <sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws>
Via: SIP/2.0/WSS 199.255.120.227:8083;branch=z9hG4bKnot2H0jCKQc
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.123.246-5070-c87825ca-a7a8-429
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>;tag=6516fb18-74b0-4654-a395-c8d3ba3c427d

v=0
o=- 5466197311491597952 1613783858 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 DE:0A:6D:43:F2:EA:C8:95:4F:0E:86:09:DF:9E:D8:F0:75:CE:03:70:D1:BA:68:C6:93:5E:2A:E2:F4:9D:C7:82
a=group:BUNDLE 0
m=audio 9 UDP/TLS/RTP/SAVPF 109 111
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:GqnYQAuyubhSCtYx
a=ice-pwd:BcDcZotieyZYzVBNxgZKJswiXRlZLFVe
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:109 OPUS/16000
a=fmtp:109 useinbandfec=1
a=rtcp-fb:109 ccm tmmbr
a=rtpmap:111 OPUS/48000/2
a=fmtp:111 useinbandfec=1
a=rtcp-fb:111 ccm tmmbr
a=ssrc:1521264290 cname:LdywLmuUynXxLXIe
a=ssrc:1521264290 msid:LdywLmuUynXxLXIe XMwZtXrMAQCUWdFs
a=ssrc:1521264290 mslabel:LdywLmuUynXxLXIe
a=ssrc:1521264290 label:XMwZtXrMAQCUWdFs
a=msid:LdywLmuUynXxLXIe XMwZtXrMAQCUWdFs
a=sendrecv

ice WARNING: 2021/02/19 17:17:38 failed to resolve stun host: 74.125.194.127:19302: address 74.125.194.127: no suitable address found
ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
2021/02/19 17:17:38 ↓↓↓
 ACK sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.227:8083;branch=z9hG4bK6yozLF6z0ou
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>;tag=6516fb18-74b0-4654-a395-c8d3ba3c427d
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.123.246-5070-c87825ca-a7a8-429
Call-Id: b5eae1f6-e3d5-4ad8-9892-5362be8809c8
CSeq: 571341309 ACK
Max-Forwards: 69
Contact: <sip:[email protected]:8083;transport=wss>
User-Agent: RC_SIPWRP_123.246
Content-Length: 0


ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:38 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24356: sendto: no route to host
ice WARNING: 2021/02/19 17:17:39 failed to send packet: write udp 100.64.0.1:59839->104.245.57.133:24357: sendto: no route to host
ice WARNING: 2021/02/19 17:17:43 could not get server reflexive address udp4 stun:74.125.194.127:19302: read udp4 0.0.0.0:55872: i/o timeout
2021/02/19 17:17:53 ↓↓↓
 BYE sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.227:8083;branch=z9hG4bKp6a1F5bng79
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>;tag=6516fb18-74b0-4654-a395-c8d3ba3c427d
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.123.246-5070-c87825ca-a7a8-429
Call-Id: b5eae1f6-e3d5-4ad8-9892-5362be8809c8
CSeq: 571342210 BYE
Max-Forwards: 69
Contact: <sip:[email protected]:8083;transport=wss>
User-Agent: RC_SIPWRP_123.246
Content-Length: 0


2021/02/19 17:17:53 ↓↓↓
 MESSAGE sip:4bbdebd6-98e2-4c84-a8aa-99dac50c75f0@ac3872c1-bfec-4119-af8a-8241f5de2dd7.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.227:8083;branch=z9hG4bK42hidSyzMas
To: <sip:17203861294*[email protected]>
From: <sip:%[email protected]>;tag=10.13.123.246-5070-39e126d7-6a10-460
Call-ID: 71d8d0b8-af46-4d3e-9713-4dc114a00488
CSeq: 571342213 MESSAGE
Max-Forwards: 67
Content-Type: x-rc/agent
User-Agent: RC_SIPWRP_123.246
Content-Length: 181

<Msg><Hdr SID="" Req="" Cmd="2" From="#[email protected]:5060" To="17203861294*[email protected]:5060"/><Bdy Mny="98.684000" MB="65535" SrvLvl="-149699523"/></Msg>
ice INFO: 2021/02/19 17:18:08 Setting new connection state: Failed
pc INFO: 2021/02/19 17:18:08 ICE connection state changed: failed
pc INFO: 2021/02/19 17:18:08 peer connection state changed: failed

@Sean-Der
Copy link
Author

Hey @tylerlong thanks for doing the upgrade, I am not exactly sure yet. Here are the things I am thinking.

  • 100.64.0.1:59839-> I am guessing that is an interface for Docker or some kind of LAN that can't route packets? So that should be fine.
  • Pion isn't controlling so we are waiting on the server to send us ICE traffic.
  • Is it possible Pion isn't meant to be the controlling ice-agent? Try adding a=ice-lite, lots of WebRTC servers run ice-lite
  • Can you set PION_LOG_TRACE=ice and see what that gives you? I am curious if the server is sending anything.
  • pingAllCandidates called with no candidate pairs this happens if we have no remote candidates. Since it stopped that is good, means we have at least one remote candidate!

@tylerlong
Copy link
Contributor

tylerlong commented Feb 20, 2021

@Sean-Der in master branch there is the pion/webrtc/v2 version https://github.com/ringcentral/ringcentral-softphone-go/blob/master/answer.go

And it worked (not sure it works now but it used to work). So I am wondering what I did wrong in pion v3. I mean if I upgrade everything correctly it should just work. So it's kind of a pion upgrade question.

I am reading your list of things and I am trying. I will post update later. Thanks again.

@tylerlong
Copy link
Contributor

tylerlong commented Feb 20, 2021

Output with PION_LOG_TRACE=ice:

2021/02/19 18:55:36 ↓↓↓
 INVITE sip:705a42e1-b505-4c17-93a4-4adf9d1e0e71@3dfa0689-9d4d-40a9-b014-a1fcf1f10c97.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.223:8083;branch=z9hG4bKbJoAxvjO3o7
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.23.227-5070-e78a9c4e-44bb-4eff
Call-Id: be980e04-3b19-47b3-bbe5-8f696191f5f6
CSeq: 459484304 INVITE
Max-Forwards: 67
Contact: <sip:[email protected]:8083;transport=wss>
Content-Type: application/sdp
Call-Info: <[email protected]>;purpose=info
P-rc: <Msg><Hdr SID="35740079571848" Req="168630243302701024804743" Cmd="6" From="#[email protected]:5060" To="17203861294*11115"/><Bdy SrvLvl="-149699523" SrvLvlExt="406" Phn="+1650430xxxx" Nm="WIRELESS CALLER" ToPhn="+16502886382" ToNm="Tyler Liu" RecUrl=""/></Msg>
p-rc-api-call-info: callAttributes=reject,send-vm
p-rc-api-ids: party-id=p-5c566d720c20478799d4fd562cd3a2de-2;session-id=s-5c566d720c20478799d4fd562cd3a2de
User-Agent: RC_SIPWRP_23.227
Content-Length: 877

v=0
o=- 2820957676795103763 7787460075247171372 IN IP4 199.255.120.232
s=SmcSip
c=IN IP4 199.255.120.232
t=0 0
m=audio 47226 RTP/SAVPF 109 111 18 0 8 9 96 101
a=rtpmap:109 OPUS/16000
a=fmtp:109 useinbandfec=1
a=rtcp-fb:109 ccm tmmbr
a=rtpmap:111 OPUS/48000/2
a=fmtp:111 useinbandfec=1
a=rtcp-fb:111 ccm tmmbr
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 g722/8000
a=rtpmap:96 ilbc/8000
a=fmtp:96 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:47227
a=rtcp-mux
a=setup:actpass
a=fingerprint:sha-1 4E:45:72:84:B5:A2:BF:3A:D5:3B:22:AC:CB:CE:55:85:0B:69:12:6E
a=ice-ufrag:ypMSgqEV
a=ice-pwd:NUsX9gp1lboeHfd6FvHELsXb4h
a=candidate:QGKlQEpfwh6frJJ9 1 UDP 2130706431 199.255.120.232 47226 typ host
a=candidate:QGKlQEpfwh6frJJ9 2 UDP 2130706430 199.255.120.232 47227 typ host

pc INFO: 2021/02/19 18:55:36 signaling state changed to have-remote-offer
ice TRACE: 18:55:36.082915 agent.go:563: Set selected candidate pair: 
ice DEBUG: 18:55:36.082992 agent.go:449: Started agent: isControlling? false, remoteUfrag: "ypMSgqEV", remotePwd: "NUsX9gp1lboeHfd6FvHELsXb4h"
ice INFO: 2021/02/19 18:55:36 Setting new connection state: Checking
pc INFO: 2021/02/19 18:55:36 ICE connection state changed: checking
ice TRACE: 18:55:36.083050 agent.go:591: pinging all candidates
ice WARNING: 2021/02/19 18:55:36 pingAllCandidates called with no candidate pairs. Connection is not possible yet.
pc INFO: 2021/02/19 18:55:36 signaling state changed to stable
2021/02/19 18:55:36 ↑↑↑
 SIP/2.0 200 OK
Contact: <sip:705a42e1-b505-4c17-93a4-4adf9d1e0e71@3dfa0689-9d4d-40a9-b014-a1fcf1f10c97.invalid;transport=ws>
Via: SIP/2.0/WSS 199.255.120.223:8083;branch=z9hG4bKbJoAxvjO3o7
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.23.227-5070-e78a9c4e-44bb-4eff
Content-Type: application/sdp
Call-Id: be980e04-3b19-47b3-bbe5-8f696191f5f6
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>;tag=52ff9cbd-02b1-4c06-a1f2-2dffd1997a97
Content-Length: 773
User-Agent: github.com/ringcentral/ringcentral-softphone-go
CSeq: 459484304 INVITE

v=0
o=- 2415969228228013870 1613789736 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 10:C1:7B:4D:FA:89:84:30:78:57:DF:58:F8:11:1D:C5:70:FB:DC:7C:E0:9D:34:2D:E9:09:1E:63:14:67:83:2B
a=group:BUNDLE 0
m=audio 9 UDP/TLS/RTP/SAVPF 109 111
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:UVFeeeCTyVTRXOoM
a=ice-pwd:ZBPrXdYXZMFjYaTnRKVCLvFTiOmdBuJT
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:109 OPUS/16000
a=fmtp:109 useinbandfec=1
a=rtcp-fb:109 ccm tmmbr
a=rtpmap:111 OPUS/48000/2
a=fmtp:111 useinbandfec=1
a=rtcp-fb:111 ccm tmmbr
a=ssrc:25555621 cname:uXzFEBZmGlkPKKkf
a=ssrc:25555621 msid:uXzFEBZmGlkPKKkf keQdBfeJrVzGaCPR
a=ssrc:25555621 mslabel:uXzFEBZmGlkPKKkf
a=ssrc:25555621 label:keQdBfeJrVzGaCPR
a=msid:uXzFEBZmGlkPKKkf keQdBfeJrVzGaCPR
a=sendrecv

ice WARNING: 2021/02/19 18:55:36 failed to resolve stun host: 74.125.194.127:19302: address 74.125.194.127: no suitable address found
ice TRACE: 18:55:36.083302 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.083347 agent.go:947: ping STUN from udp4 host 192.168.1.118:57183 to udp4 host 199.255.120.232:47226
ice TRACE: 18:55:36.083420 agent.go:947: ping STUN from udp4 host 192.168.1.118:57183 to udp4 host 199.255.120.232:47227
ice TRACE: 18:55:36.083478 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.083502 agent.go:947: ping STUN from udp4 host 192.168.1.118:57183 to udp4 host 199.255.120.232:47226
ice TRACE: 18:55:36.083575 agent.go:947: ping STUN from udp4 host 192.168.1.118:57183 to udp4 host 199.255.120.232:47227
ice TRACE: 18:55:36.083608 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:36.083700 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:36.099112 selection.go:221: inbound STUN (SuccessResponse) from udp4 host 199.255.120.232:47226 to udp4 host 192.168.1.118:57183
ice TRACE: 18:55:36.099153 selection.go:231: Found valid candidate pair: prio 9151314440652587007 (local, prio 2130706431) udp4 host 192.168.1.118:57183 <-> udp4 host 199.255.120.232:47226 (remote, prio 2130706431)
ice TRACE: 18:55:36.099287 selection.go:221: inbound STUN (SuccessResponse) from udp4 host 199.255.120.232:47227 to udp4 host 192.168.1.118:57183
ice TRACE: 18:55:36.099321 selection.go:231: Found valid candidate pair: prio 9151314436357619712 (local, prio 2130706431) udp4 host 192.168.1.118:57183 <-> udp4 host 199.255.120.232:47227 (remote, prio 2130706430)
ice TRACE: 18:55:36.099678 selection.go:221: inbound STUN (SuccessResponse) from udp4 host 199.255.120.232:47227 to udp4 host 192.168.1.118:57183
ice TRACE: 18:55:36.099696 selection.go:231: Found valid candidate pair: prio 9151314436357619712 (local, prio 2130706431) udp4 host 192.168.1.118:57183 <-> udp4 host 199.255.120.232:47227 (remote, prio 2130706430)
ice TRACE: 18:55:36.099776 selection.go:221: inbound STUN (SuccessResponse) from udp4 host 199.255.120.232:47226 to udp4 host 192.168.1.118:57183
ice TRACE: 18:55:36.099799 selection.go:231: Found valid candidate pair: prio 9151314440652587007 (local, prio 2130706431) udp4 host 192.168.1.118:57183 <-> udp4 host 199.255.120.232:47226 (remote, prio 2130706431)
2021/02/19 18:55:36 ↓↓↓
 ACK sip:705a42e1-b505-4c17-93a4-4adf9d1e0e71@3dfa0689-9d4d-40a9-b014-a1fcf1f10c97.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WSS 199.255.120.223:8083;branch=z9hG4bKKPX5140a2t
To: "WIRELESS CALLER" <sip:17203861294*[email protected]>;tag=52ff9cbd-02b1-4c06-a1f2-2dffd1997a97
From: "WIRELESS CALLER" <sip:[email protected]>;tag=10.13.23.227-5070-e78a9c4e-44bb-4eff
Call-Id: be980e04-3b19-47b3-bbe5-8f696191f5f6
CSeq: 459484304 ACK
Max-Forwards: 69
Contact: <sip:[email protected]:8083;transport=wss>
User-Agent: RC_SIPWRP_23.227
Content-Length: 0


ice TRACE: 18:55:36.288814 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.288915 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:36.289020 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:36.493679 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.493752 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:36.493825 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:36.698328 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.698450 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:36.698557 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:36.899891 agent.go:591: pinging all candidates
ice TRACE: 18:55:36.899968 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:36.900127 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:36 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:37.101023 agent.go:591: pinging all candidates
ice TRACE: 18:55:37.101130 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:37.101244 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:37.301387 agent.go:591: pinging all candidates
ice TRACE: 18:55:37.301499 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:37.301609 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:37.504838 agent.go:591: pinging all candidates
ice TRACE: 18:55:37.504941 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47226
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47226: sendto: no route to host
ice TRACE: 18:55:37.505052 agent.go:947: ping STUN from udp4 host 100.64.0.1:49779 to udp4 host 199.255.120.232:47227
ice WARNING: 2021/02/19 18:55:37 failed to send packet: write udp 100.64.0.1:49779->199.255.120.232:47227: sendto: no route to host
ice TRACE: 18:55:37.707972 agent.go:591: pinging all candidates
ice TRACE: 18:55:37.708079 agent.go:605: max requests reached for pair prio 9151314440652587007 (local, prio 2130706431) udp4 host 100.64.0.1:49779 <-> udp4 host 199.255.120.232:47226 (remote, prio 2130706431), marking it as failed
ice TRACE: 18:55:37.708114 agent.go:605: max requests reached for pair prio 9151314436357619712 (local, prio 2130706431) udp4 host 100.64.0.1:49779 <-> udp4 host 199.255.120.232:47227 (remote, prio 2130706430), marking it as failed
ice TRACE: 18:55:37.912531 agent.go:591: pinging all candidates
ice TRACE: 18:55:38.114093 agent.go:591: pinging all candidates
ice TRACE: 18:55:38.314250 agent.go:591: pinging all candidates
ice TRACE: 18:55:38.514717 agent.go:591: pinging all candidates
ice TRACE: 18:55:38.715216 agent.go:591: pinging all candidates
ice TRACE: 18:55:38.917734 agent.go:591: pinging all candidates
ice TRACE: 18:55:39.117935 agent.go:591: pinging all candidates
ice TRACE: 18:55:39.318286 agent.go:591: pinging all candidates
ice TRACE: 18:55:39.518466 agent.go:591: pinging all candidates
ice TRACE: 18:55:39.720841 agent.go:591: pinging all candidates
ice TRACE: 18:55:39.924986 agent.go:591: pinging all candidates
ice TRACE: 18:55:40.125189 agent.go:591: pinging all candidates
ice TRACE: 18:55:40.326479 agent.go:591: pinging all candidates
ice TRACE: 18:55:40.531030 agent.go:591: pinging all candidates
ice TRACE: 18:55:40.733661 agent.go:591: pinging all candidates
ice TRACE: 18:55:40.933755 agent.go:591: pinging all candidates
ice WARNING: 2021/02/19 18:55:41 could not get server reflexive address udp4 stun:74.125.194.127:19302: read udp4 0.0.0.0:61833: i/o timeout
ice TRACE: 18:55:41.138280 agent.go:591: pinging all candidates
ice TRACE: 18:55:41.341055 agent.go:591: pinging all candidates
ice TRACE: 18:55:41.544079 agent.go:591: pinging all candidates
ice TRACE: 18:55:41.747856 agent.go:591: pinging all candidates
ice TRACE: 18:55:41.952486 agent.go:591: pinging all candidates
ice TRACE: 18:55:42.154259 agent.go:591: pinging all candidates
ice TRACE: 18:55:42.357851 agent.go:591: pinging all candidates
ice TRACE: 18:55:42.558577 agent.go:591: pinging all candidates
ice TRACE: 18:55:42.758729 agent.go:591: pinging all candidates
ice TRACE: 18:55:42.959745 agent.go:591: pinging all candidates
ice TRACE: 18:55:43.164322 agent.go:591: pinging all candidates
ice TRACE: 18:55:43.366715 agent.go:591: pinging all candidates
ice TRACE: 18:55:43.570910 agent.go:591: pinging all candidates
ice TRACE: 18:55:43.773906 agent.go:591: pinging all candidates
ice TRACE: 18:55:43.974371 agent.go:591: pinging all candidates
ice TRACE: 18:55:44.178347 agent.go:591: pinging all candidates
ice TRACE: 18:55:44.378985 agent.go:591: pinging all candidates
ice TRACE: 18:55:44.581014 agent.go:591: pinging all candidates
ice TRACE: 18:55:44.781161 agent.go:591: pinging all candidates
ice TRACE: 18:55:44.981608 agent.go:591: pinging all candidates
ice TRACE: 18:55:45.186383 agent.go:591: pinging all candidates
ice TRACE: 18:55:45.390764 agent.go:591: pinging all candidates
ice TRACE: 18:55:45.593608 agent.go:591: pinging all candidates
ice TRACE: 18:55:45.797492 agent.go:591: pinging all candidates
ice TRACE: 18:55:45.997673 agent.go:591: pinging all candidates
ice TRACE: 18:55:46.199923 agent.go:591: pinging all candidates
ice TRACE: 18:55:46.400390 agent.go:591: pinging all candidates
ice TRACE: 18:55:46.603912 agent.go:591: pinging all candidates
ice TRACE: 18:55:46.807172 agent.go:591: pinging all candidates
ice TRACE: 18:55:47.007582 agent.go:591: pinging all candidates
ice TRACE: 18:55:47.212405 agent.go:591: pinging all candidates
ice TRACE: 18:55:47.413619 agent.go:591: pinging all candidates
ice TRACE: 18:55:47.613734 agent.go:591: pinging all candidates
ice TRACE: 18:55:47.813852 agent.go:591: pinging all candidates
ice TRACE: 18:55:48.014046 agent.go:591: pinging all candidates
ice TRACE: 18:55:48.214224 agent.go:591: pinging all candidates
ice TRACE: 18:55:48.414539 agent.go:591: pinging all candidates
ice TRACE: 18:55:48.614664 agent.go:591: pinging all candidates
ice TRACE: 18:55:48.815593 agent.go:591: pinging all candidates
ice TRACE: 18:55:49.020727 agent.go:591: pinging all candidates
ice TRACE: 18:55:49.224924 agent.go:591: pinging all candidates
ice TRACE: 18:55:49.427977 agent.go:591: pinging all candidates
ice TRACE: 18:55:49.632395 agent.go:591: pinging all candidates
ice TRACE: 18:55:49.834061 agent.go:591: pinging all candidates
ice TRACE: 18:55:50.034206 agent.go:591: pinging all candidates
ice TRACE: 18:55:50.238818 agent.go:591: pinging all candidates
ice TRACE: 18:55:50.440622 agent.go:591: pinging all candidates
ice TRACE: 18:55:50.645453 agent.go:591: pinging all candidates
ice TRACE: 18:55:50.847542 agent.go:591: pinging all candidates
ice TRACE: 18:55:51.052383 agent.go:591: pinging all candidates
ice TRACE: 18:55:51.253552 agent.go:591: pinging all candidates
ice TRACE: 18:55:51.457607 agent.go:591: pinging all candidates
ice TRACE: 18:55:51.657807 agent.go:591: pinging all candidates
ice TRACE: 18:55:51.860840 agent.go:591: pinging all candidates
ice TRACE: 18:55:52.064810 agent.go:591: pinging all candidates
ice TRACE: 18:55:52.266025 agent.go:591: pinging all candidates
ice TRACE: 18:55:52.470363 agent.go:591: pinging all candidates
ice TRACE: 18:55:52.673711 agent.go:591: pinging all candidates
ice TRACE: 18:55:52.874649 agent.go:591: pinging all candidates
ice TRACE: 18:55:53.074761 agent.go:591: pinging all candidates
ice TRACE: 18:55:53.274864 agent.go:591: pinging all candidates
ice TRACE: 18:55:53.480009 agent.go:591: pinging all candidates
ice TRACE: 18:55:53.680996 agent.go:591: pinging all candidates
ice TRACE: 18:55:53.881590 agent.go:591: pinging all candidates
ice TRACE: 18:55:54.086587 agent.go:591: pinging all candidates
ice TRACE: 18:55:54.290662 agent.go:591: pinging all candidates
ice TRACE: 18:55:54.494443 agent.go:591: pinging all candidates
ice TRACE: 18:55:54.697554 agent.go:591: pinging all candidates
^Csignal: interrupt
FAIL    github.com/ringcentral/ringcentral-softphone-go 31.592s

@Sean-Der
Copy link
Author

Sean-Der commented Feb 20, 2021

First I would turn off trickle ICE. That is the only difference I know of.

change the code here to be

        gatherComplete := webrtc.GatheringCompletePromise(peerConnection)
	err = peerConnection.SetLocalDescription(answer)
	if err != nil {
		panic(err)
	}
        <-gatherComplete

The instead of answer.SDP do peerConnection.SetLocalDescription(answer).SDP here


can you put a=ice-lite before m=audio in the global section.

Pion finds lots of valid candidate pairs ice TRACE: 18:55:36.099153 selection.go:231: Found valid candidate pair: prio 9151314440652587007 (local, prio 2130706431) udp4 host 192.168.1.118:57183 <-> udp4 host 199.255.120.232:47226 (remote, prio 2130706431)

But then it is waiting for the server to select one (and it never happens). if you put a=ice-lite that makes Pion the controlling agent.

  • Maybe we are losing the use-candidate
  • Maybe we are selecting our role incorrectly
  • Maybe our ICE Agent should select a candidate pair on a timeout?

I am not sure :/

@tylerlong
Copy link
Contributor

The very first error/warning is

ice WARNING: 2021/02/19 18:55:36 failed to resolve stun host: 74.125.194.127:19302: address 74.125.194.127: no suitable address found

What does it mean? The subsequent errors may be caused by this one.

@Sean-Der
Copy link
Author

Sean-Der commented Feb 22, 2021

@tylerlong webrtc.GatheringCompletePromise and ice-lite didn't help? If you can email me repro to [email protected] I love to help also :)

failed to resolve stun host: is non-fatal. It loops all your interfaces and sends a STUN request. You may have multiple public IPs so trying to figure them all out. That shouldn't be a problem! I can look into making a note this is non-fatal in the log message :)

@tylerlong
Copy link
Contributor

tylerlong commented Feb 22, 2021

I have made some change bb9d78d
The phone call was answered but I didn't see the audio data coming in. OnTrack never triggered.

I will email your the credential so that you can run the code on your local computer.

@tylerlong
Copy link
Contributor

@Sean-Der sent

@tylerlong
Copy link
Contributor

tylerlong commented Feb 23, 2021

Tag v0.7.0 is based on pion/webrtc v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tylerlong @Sean-Der and others