Request messageRequest = dialog.createRequest(Request.MESSAGE);
CSeqHeader cseq = (CSeqHeader)messageRequest.getHeader(CSeqHeader.NAME);
// We will test if the CSEq validation is off by sending CSeq 1 again
cseq.setSeqNumber(1);
ClientTransaction ct = provider
.getNewClientTransaction(messageRequest);
dialog.sendRequest(ct);
} catch (Exception ex) {
ex.printStackTrace();
}
} else if (num == 5){
try {
System.out.println("shootme: got an OK response! ");
System.out.println("Dialog State = " + dialog.getState());
SipProvider provider = (SipProvider) responseEvent.getSource();
Request messageRequest = dialog.createRequest(Request.BYE);
ClientTransaction ct = provider
.getNewClientTransaction(messageRequest);
dialog.sendRequest(ct);
} catch (Exception ex) {
ex.printStackTrace();