I'm not very familiar with this portion of sipXtapi, but it looks like there
is some code in there to detect NAT type --
Take a look in the sipXportLib StunUtils class -
sipXportLib/src/os/StunUtils.cpp:35 --
static method STUN_NAT_TYPE StunUtils::determineStunNatType(const char*
szServer, const int port)
STUN_NAT_TYPE is an enum that will return what type of NAT you're using, and
seems that szServer is the FQDN or stringified IP address of a STUN server,
and port is the port number to contact on szServer for STUN.
typedef enum
{
STUN_NAT_ERROR_BAD_SERVER,
STUN_NAT_BLOCKED,
STUN_NAT_SYMMETRIC_FIREWALL,
STUN_NAT_OPEN,
STUN_NAT_FULL_CONE,
STUN_NAT_RESTRICTED_CONE,
STUN_NAT_PORT_RESTRICTED_CONE,
STUN_NAT_SYMMETRIC
} STUN_NAT_TYPE ;
If you get more intimate with it, and determine exactly how things work, a
patch with some method documentation (in Doxygen format -- see
CpMediaInterface.h for an example of how we do it) would be great, as right
now it's fairly devoid of comments/documentation.
Hope that helps!
On 8/15/07, jiao <[EMAIL PROTECTED]> wrote:
>
> HI all,
> I've downloaded and test sipxapi,it works well, it seems that
> sipxapi doesn't detect NAT type.I think if it's symetric nat, turn server
> should be auto enabled first, other cases stun server address should be
> used, am I right?
>
>
> Best regards
> Jiao
>
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>
--
Keith Kyzivat
SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/