code: public String getRemoteAddr() {
  		if(getTransaction() != null) {
  			if(((SIPTransaction)getTransaction()).getPeerPacketSourceAddress() != null &&
  					((SIPTransaction)getTransaction()).getPeerPacketSourceAddress().getHostAddress() != null) {
  				return ((SIPTransaction)getTransaction()).getPeerPacketSourceAddress().getHostAddress();
  			} else {
  				return ((SIPTransaction)getTransaction()).getPeerAddress();
  			}
  		} else {
  			ViaHeader via = (ViaHeader) message.getHeader(ViaHeader.NAME);
  			// https://code.google.com/p/sipservlets/issues/detail?id=137
  			boolean isExternal = sipFactoryImpl.getSipApplicationDispatcher().isViaHeaderExternal(via);
  			if(message instanceof Request && !isExternal) {
  			    // locally generated messages should return null as per Javadoc
  			    return null;
  			}
  			if(via == null) {
  				return null;
  			} else {
  				return via.getHost();
  			}
  		}
  	}
docs: /*
  (non-Javadoc)
  @see javax.servlet.sip.SipServletMessage#getRemoteAddr()