about stun4j in jain-sip 1.2
Man-Chi Leung <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
hi,
----------------------------------------------
in jain-sip 1.1 CVS source,
----------------------------------------------
I found info about stun4j in /docs/faq.html
How do you enable/use the STUN support?
set the gov.nist.javax.sip.STUN_SERVER to point to
stun_server_ip_address[:port] where your stun server resides. The stack
will return mapped address when you getIpAddress() from the stack and
getPort() from the listening point. With stun, if you have a NAT box,
these will in general be different from the IP address and port used to
create the LP. Your application needs to use these in setting up the
contact address and SDP parameters as appropriate. The stack is not
responsible for this.
----------------------------------------------
in jain-sip 1.2 CVS source
----------------------------------------------
i found the following snippet in Class "gov.nist.javax.sip.SIPStackImpl.java"
String stunAddr = configurationProperties
.getProperty("gov.nist.javax.sip.STUN_SERVER");
if ( stunAddr != null )
this.logWriter.logWarning("Ignoring obsolete property "
+ "gov.nist.javax.sip.STUN_SERVER");
-----------------------
my Question:
-----------------------
is stun4j totally ignored by jain-sip 1.2 ?
so idea is to just call Stun's API from my jain-sip client, am i correct?
- get public address from Stun4j's addressDiscovery.determineAddress();
- set public address in Via using API Jain-SIP's
headerFactory.createViaHeader()
- set public address in Contact using API Jain-SIP's
addressFactory.createAddress(contactURI);
- set public address and port for SDP c= attribute.
~manchi