if(responseEvent.getResponse().getStatusCode() == 180){
//System.out.println("Ringing bekommen");
//System.out.println("RINGING bekommen");
CallIdHeader callID = (CallIdHeader) responseEvent.getResponse().getHeader(CallIdHeader.NAME);
}
CSeqHeader cseq2 = (CSeqHeader) responseEvent.getResponse().getHeader(CSeqHeader.NAME);
if(responseEvent.getResponse().getStatusCode() == 200 && cseq2.getMethod().equals("INVITE")){
//System.out.println("confirmed OK bekommen");
//System.out.println("confirmed OK bekommen");
CallIdHeader callID = (CallIdHeader) responseEvent.getResponse().getHeader(CallIdHeader.NAME);
CSeqHeader cseq = (CSeqHeader) responseEvent.getResponse().getHeader(CSeqHeader.NAME);
try{
Dialog dialog = responseEvent.getClientTransaction().getDialog();
Request ack = dialog.createAck(cseq.getSeqNumber());
//System.out.println("Ack sent");
//System.out.println("ACK sent");
dialog.sendAck(ack);
//A sends a BYE