Closed sebastiantoro closed 4 years ago
Call is dropped because you didn't received audio for more than 30 secs. The real issue is why you don't receive audio. Most probably something on your network filters your packet (firewall ? router ?). Try with TLS or on another network.
You can also check your VMR logs to be sure it does send you data and to the right IP/port.
I'm using a cellphone directly connected to the carrier network so there is no firewall or router.
Your cellular network may be doing some NATing causing your issue. Try to enable STUN/ICE (you can use stun.linphone.org).
Next are the VMR logs:
11:42:03.960 | call 271719: incoming SIP call from "sip:user.name@10.3.216.115" to local URI "sip:user.name@video.domain.com;transport=tcp"
11:42:03.961 | API call leg e771e3cd-3700-4a4d-8b11-c58f99cd3c4f SIP call ID changed to "abhk3lUzms"
11:42:03.973 | API call leg e771e3cd-3700-4a4d-8b11-c58f99cd3c4f in call 7e5d7c66-5c7e-4219-bc33-fa9a097c6ae3 (API call ef57489b-53ba-4be1-90b5-ab756fd0a894) has SIP call ID "abhk3lUzms"
11:42:03.974 | call 271719: API call leg e771e3cd-3700-4a4d-8b11-c58f99cd3c4f
11:42:03.976 | call 271719: setting up UDT RTP session for DTLS (combined media and control)
11:42:03.977 | conference "User Name (Virtual Space)": unencrypted call legs now present
11:42:04.485 | participant "user.name@10.3.216.115" joined space 2c801319-8bf2-4fb2-ab3d-240d90215c95 (User Name (Virtual Space))
11:42:04.485 | participant "user.name@10.3.216.115" (d4f2f06c-982e-49bc-a1bd-cc8cd8555697) joined conference 7e5d7c66-5c7e-4219-bc33-fa9a097c6ae3 via SIP
11:42:35.585 | call 271719: ending; remote SIP teardown - connected for 0:31
11:42:35.587 | conference "User Name (Virtual Space)": unencrypted call legs no longer present
11:42:35.587 | participant "user.name@10.3.216.115" left space 2c801319-8bf2-4fb2-ab3d-240d90215c95 (User Name (Virtual Space))
Do you have any example code on how to enable STUN or ICE? Or could you point me to an example?
Actually running the ifconfig
in the Android device shows:
HWSNE:/ $ ifconfig
dummy0 Link encap:UNSPEC
inet6 addr: fe80::6025:3cff:fe14:900c/64 Scope: Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:1890
lo Link encap:UNSPEC
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:25948 errors:0 dropped:0 overruns:0 frame:0
TX packets:25948 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:35853853 TX bytes:35853853
rmnet0 Link encap:UNSPEC
inet addr:10.3.216.115 Mask:255.255.255.255
UP RUNNING NOARP MTU:1400 Metric:1
RX packets:111832 errors:0 dropped:0 overruns:0 frame:0
TX packets:66918 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:119814663 TX bytes:18325968
But looking at my cellphone public ip address it is 191.116.115.XXX
So you right about the NAT.
I am using the following code to enable STUN/ICE and to make the call:
String sipUri = "sip:user.name@video.domain.com;transport=tcp";
Core core = LinphoneService.getCore();
LinphoneService.getCore().setPrimaryContact(sipUri);
Address addressToCall = core.interpretUrl(sipUri);
CallParams params = core.createCallParams(null);
NatPolicy natPolicy = core.getNatPolicy();
natPolicy.enableIce(true);
natPolicy.enableStun(true);
natPolicy.setStunServer("stun.l.google.com");
core.setNatPolicy(natPolicy);
params.enableVideo(true);
core.inviteAddressWithParams(addressToCall, params);
But the logs show:
I/Linphone Sample: Starting stun server resolution [stun.l.google.com]
...
I/Linphone Sample: No SRV result for [_stun._udp.stun.l.google.com], trying A/AAAA.
...
I/Linphone Sample: stun.l.google.com resolved to 2800:3f0:4003:c01::7f
stun.l.google.com resolved to 64.233.190.127
Stun server resolution successful.
I/Linphone Sample: ICE: gathering candidates from [stun.l.google.com] using STUN
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [0ed53f22113f6f43a630dbc4]
I/ViewRootImpl: jank_removeInvalidNode jank list is null
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [91e9e8ee7447ec057c2a2dd9]
D/OpenGLRenderer: HWUI Binary is enabled
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [861df779353e455c8629d16d]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [95428fce433e813a79db23bc]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [e06bc17f417323a68c028723]
D/OpenGLRenderer: HWUI Binary is enabled
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [1110ce32928a6112705e3abc]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [4b16b702f872edc15f1d9995]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [e8e6367913cd15c8db7fc951]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [cf1bb9e9fcbd58b51c59f2ee]
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [f3f04910d2d1907248c6f2b1]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [60ec6cef5deaa38d7f71d0de]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [619e2288e4ee43e85def1e19]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [5aedd5ef23c8e878e1e760c2]
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [f43e8cf60167c54ddf8dfa5f]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [a5450a10c37583fb3eb3b040]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [d031b9842af70df3231d6e0d]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [84b9ca3a27c200febc547caf]
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [94ac02b6fc09ed4e2237d792]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [b61c681cb5ea039f1054a644]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [7d994fff67fa7c12231153cf]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [ec78bf9f711e9073e9a07520]
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [b81e6b95f9cc37e1d9daf8f4]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [5042c2522a7dc6566d5926f6]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [9a58bd850ca5c46295b7c9e9]
I/Linphone Sample: ice: Send STUN binding request: [::]:7078 --> 64.233.190.127:3478 [e675e325794269eb9ac6a5d1]
I/Linphone Sample: ice: Send STUN binding request: [::]:7079 --> 64.233.190.127:3478 [70e411660ebb6e6756012da7]
I/Linphone Sample: ice: Send STUN binding request: [::]:9078 --> 64.233.190.127:3478 [723f052a91fc19edab36b693]
I/Linphone Sample: ice: Send STUN binding request: [::]:9079 --> 64.233.190.127:3478 [270cabfa0d0902daecd1cc4a]
W/libEGL: EGLNativeWindowType 0x705996f010 disconnect failed
I/Linphone Sample: ice: Gathering timeout for checklist [0x705a66f300]
W/Linphone Sample: No STUN answer from [stun.l.google.com], continuing without STUN
...
I/Linphone Sample: Stun packet sent on rtcp for session [0x70599cc400]
...
I/Linphone Sample: Stun packet sent for session [0x70599cd800]
Stun packet sent on rtcp for session [0x70599cd800]
But the VMR is still getting the local IP address of the cellphone.
Am I setting up incorrectly the STUN/ICE configuration?
Use stun.linphone.org instead of stun.google.com
Google STUN servers use 19302 port not the default one. Just adding the port to this line natPolicy.setStunServer("stun.l.google.com:19302");
solved the issue.
Thanks a lot @Viish!
Hello,
I am using the Sample app and making an outgoing P2P call, omitting SIP registration, using the following URI format:
sip:user.name@domain;transport=tcp
to connect to a virtual meeting room (VMR). The call is connected and the other users in the VMR are able to get my audio and video but I am not getting their audio nor their video. Not only that, but after 32 seconds the call is dropped.The logs are the following:
Why am I not reciving any media from the VMR? Why is the call being hanged up?