Hi Benny, In RFC 3489 the situation is not described if we got no response from the alternate server. I think this is a special network configuration I have tested :-) In pjnath/src/pjnath/nat_detect on line 716: case PJNATH_ESTUNTIMEDOUT: /* * Strangely test 1B has failed. Maybe connectivity was * lost? */ end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_BLOCKED); break; At this position the test ends with PJ_SUCCESS and PJ_STUN_NAT_TYPE_BLOCKED, but the NAT type couldn't be detected. My suggestion is to call end_session with other parameters: end_session(sess, PJ_ETIMEDOUT, PJ_STUN_NAT_TYPE_ERR_UNKNOWN); Best regards, Helmut Wolf -----Urspr?ngliche Nachricht----- Von: pjsip-bounces at lists.pjsip.org [mailto:pjsip-bounces at lists.pjsip.org] Im Auftrag von Benny Prijono Gesendet: Dienstag, 22. April 2008 01:28 An: pjsip list Betreff: Re: [pjsip] Wrong NAT detection with pjstun_client On Mon, Apr 21, 2008 at 4:37 PM, Helmut Wolf <HelmutWolf1 at gmx.de> wrote: > Hi Benny, > > I have running pjstun_client to get the NAT type. The result was "NAT successfully detected as Blocked", but UDP isn't completely > blocked (only STUN Port 3479) and one STUN response have reached pjsip (Stun Test I). Doing the same test with WinStun the result > was "NAT with Independend Mapping and Port Dependent Filter...". > > In attachment you can find the Wireshark Trace of the STUN packets (pjsip and winstun), the pjsip logging and the result of WinStun. > One difference I have found is that pjsip sends a STUN request to an alternate STUN Server to port 3479 (given in STUN response: > CHANGED_ADDRESS) but WinStun always uses 3478. I think I would have to look at this in more detail sometime. I'm wondering how we could detect the NAT type properly if we couldn't use the alternate address sent by the server. Any idea? Cheers Benny > What's wrong? > > > Best regards, > > Helmut Wolf > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org