alexchengalan / csipsimple

Automatically exported from code.google.com/p/csipsimple
0 stars 0 forks source link

STUN failure is not detected and reported #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable STUN and set the STUN server domain/IP to a non-working value
2. Try to make a call behind NAT

What is the expected output? What do you see instead?

Expected: 2-way audio
Get: No audio, due to STUN failure

Please use labels and text to provide additional information.

Failure to resolve STUN server should be caught, a toast should be shown, and 
the service should not run. The idea is that if STUN is set in preferences, 
then the service should not run unless the STUN server is valid and resolves.

Note: The function pjsua_resolve_stun_servers() is not implemented in the JNI 
binding to libpjsip. I don't know how to do this, or if the call is in the 
native .so library. The resolve should be attempted synchronously between 
psjua.init() and the adding of the transports. 

Original issue reported on code.google.com by dc3de...@gmail.com on 28 Jul 2010 at 1:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Issue 357 has been merged into this issue.

Original comment by r3gis...@gmail.com on 19 Dec 2010 at 11:01

GoogleCodeExporter commented 9 years ago
This appears to have been fixed by r3gis.3R as of r502. I am getting toasts on 
STUN fails now, and unless STUN is successful the service will remain inactive. 
Changing to Fixed and setting owner to r3gis.3R (dc3denny).

Original comment by dc3de...@gmail.com on 25 Dec 2010 at 1:34

GoogleCodeExporter commented 9 years ago
In fact not fully :)
Almost done that's true, but as STUN resolution is asynchronous, that's more 
tricky ;).
I show a toaster if immediately fail, but not if fails in the absolute. So your 
request is still valid.

Original comment by r3gis...@gmail.com on 25 Dec 2010 at 7:58

GoogleCodeExporter commented 9 years ago
Sorry I will no longer make changes to your issues!

Original comment by dc3de...@gmail.com on 26 Dec 2010 at 10:52

GoogleCodeExporter commented 9 years ago
No problem ;) All the more so as was your issue initially :D 

And a really interesting issue cause I even wonder if from a synchronous stun 
resolution (or nat detection) we could not warn the user about the fact is 
configuration may lead to a failure in media negociation. (I've seen something 
like that in pjsip stack).

Original comment by r3gis...@gmail.com on 26 Dec 2010 at 11:04

GoogleCodeExporter commented 9 years ago
If I enable STUN to resoleve a NAT problem (other side does not hear me), 
I get the message "failed to add media transport" and even SIP register fails.

Original comment by joze.rov...@gmail.com on 21 Jan 2011 at 3:04

GoogleCodeExporter commented 9 years ago
@joze : you should try with latest dev version : 
http://nightlies.csipsimple.com/trunk/ 

It usually help in this case. (I think that something was wrong, maybe with QoS 
on market version, seems to be less frequent with dev version).

Original comment by r3gis...@gmail.com on 21 Jan 2011 at 4:39

GoogleCodeExporter commented 9 years ago
r3gis.3R, thanks. It works with latest dev version (CSipSimple-r584-trunk.apk). 
 Joze

Original comment by joze.rov...@gmail.com on 21 Jan 2011 at 5:21

GoogleCodeExporter commented 9 years ago
I am getting the following error with r584 almost every time I leave the 
settings menu or if I 'Disconnect' and then re-open cSipSimple. If I leave 
cSipSimple open once I receive the error, I will get the error repeatedly 
unless I go to Android's home screen, and then re-open cSipSimple, in which 
case registration occurs immediately:

   Fail to create transport Received no
   response from STUN server
   (PJLIB_UTIL_ESTUNNOTRESPOND)
   (320010)

with STUN enabled (ICE setting doesn't make a difference).
Android 2.3.1
Nexus S
Gizmo5 default profile (w/default stun servers: stun.counterpath.com, 
stun01.sipphone.com - reversing order makes no difference)

Is this a new error or a related issue?

Original comment by blujay...@gmail.com on 22 Jan 2011 at 1:58

GoogleCodeExporter commented 9 years ago
Also, if STUN is disabled, I get a missed call notice from the same number that 
is calling me once I answer a call. I have no call problems with STUN disabled, 
even though I am behind a NAT router.

Another problem, with STUN enabled incoming calls sometimes take a long time 
for cSipSimple to receive (i.e. STUN disabled and call from land-line, 
cSipSimple immediately sees call. STUN enabled and call from land-line, 
cSipSimple can take anywhere from immediately to 20 seconds to see the call).

Original comment by blujay...@gmail.com on 22 Jan 2011 at 2:42

GoogleCodeExporter commented 9 years ago
By 'no call problems' with STUN disabled I mean no in-call quality problems 
(i.e. echo/delay is the same with or without STUN). The missed call notice is 
the only annoying thing.

Original comment by blujay...@gmail.com on 22 Jan 2011 at 2:43

GoogleCodeExporter commented 9 years ago
@blujay : I think that's more or less related to issue 545. I've to dive into 
this issue cause seems to appear randomly under certain conditions.

Original comment by r3gis...@gmail.com on 22 Jan 2011 at 5:49

GoogleCodeExporter commented 9 years ago
> with STUN enabled (ICE setting doesn't make a difference).

What is ICE in realy? In internet only common definitions.
From my investigations:

1. ICE is extension to SIP protocol. ICE adds additional headers in SIP queries.
2. SIP ICE headers contains all IP adresses of device (internal, external).
3. Both phones must support ICE, otherwise ICE in will not work.
4. There are several version of ICE (1 and 2). Both devices must have same.
5. ICE only gives ability to direct connect between phones with enabled STUN 
under same shared NAT.
         phone a
                        --------- NAT ------- Internet
         phone b

CSIPSimple supports only second version.

Windows clients that support ICE (not too much...)
- X-Lite 3 has ICE first version (old and deprecated).
- X-Lite 4 has ICE second version.
- Free Blink softphone also support ICE, but his UI is no good.

Original comment by vale...@gmail.com on 24 Mar 2011 at 2:35

GoogleCodeExporter commented 9 years ago
With Galaxy S and new 2.3.3. (JVB) I got also this error
   Fail to create transport Received no
   response from STUN server
   (PJLIB_UTIL_ESTUNNOTRESPOND)
   (320010)

I tried CSipSimple-r798-trunk.apk and it seems to work fine.    

Original comment by jar...@gmail.com on 17 Apr 2011 at 6:16

GoogleCodeExporter commented 9 years ago
Yes, indeed previous versions (including the one on the market) are buggy with 
STUN after several registration and under certain conditons. 
I fixed it recently. 

Some tests of the current dev version has to be done to be sure it can be 
released safely on the android market without having all users crying ;). If 
you have feedback it's welcome :)

Original comment by r3gis...@gmail.com on 17 Apr 2011 at 6:55