public void processInvite(RequestEvent requestEvent,ServerTransaction serverTransaction){
  final Request request=requestEvent.getRequest();
  final SipProvider sipProvider=(SipProvider)requestEvent.getSource();
  try {
    final String toTag="" + System.nanoTime();
    Response response=messageFactory.createResponse(Response.RINGING,request);
    ToHeader toHeader=(ToHeader)response.getHeader(ToHeader.NAME);
    toHeader.setTag(toTag);
    sipProvider.sendResponse(response);
    response=messageFactory.createResponse(Response.OK,request);
    final Address address=addressFactory.createAddress("Shootme <sip:" + myAddress + ":"+ myPort+ ">");
    final ContactHeader contactHeader=headerFactory.createContactHeader(address);
    response.addHeader(contactHeader);
    toHeader=(ToHeader)response.getHeader(ToHeader.NAME);
    toHeader.setTag(toTag);
    response.addHeader(contactHeader);
    sipProvider.sendResponse(response);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

public void processInvite ( RequestEvent requestEvent , ServerTransaction serverTransaction ) { final Request request = requestEvent . getRequest ( ) ; final SipProvider sipProvider = ( SipProvider ) requestEvent . getSource ( ) ; try { final String toTag = "" + System . nanoTime ( ) ; Response response = messageFactory . createResponse ( Response . RINGING , request ) ; ToHeader toHeader = ( ToHeader ) response . getHeader ( ToHeader . NAME ) ; toHeader . setTag ( toTag ) ; sipProvider . sendResponse ( response ) ; response = messageFactory . createResponse ( Response . OK , request ) ; final Address address = addressFactory . createAddress ( "Shootme <sip:" + myAddress + ":" + myPort + ">" ) ; final ContactHeader contactHeader = headerFactory . createContactHeader ( address ) ; response . addHeader ( contactHeader ) ; toHeader = ( ToHeader ) response . getHeader ( ToHeader . NAME ) ; toHeader . setTag ( toTag ) ; response . addHeader ( contactHeader ) ; sipProvider . sendResponse ( response ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } }
process the invite request .
