views:

57

answers:

1

I was wondering has anyone come across thos error in SIP before?

WARN/System.err(4623): javax.sip.SipException: Response does not belong to this transaction.

I get it after I get an invite, I then send back 100 trying followed by 180 ringing.

Then the user can either press Reject or accept on the screen.

If they press reject I send a Decline which works fine.

However when I send a OK with SDP data to accept the call I get the above error.

Here a some code snippets:

ServerTransaction st = requestEvent.getServerTransaction();

    if (st == null) {
        st = sipProvider.getNewServerTransaction(request);

    }

    dialog = st.getDialog();
    st.sendResponse(response);

    this.ringingResponse = messageFactory.createResponse(Response.RINGING,
            request);

    st.sendResponse(ringingResponse);

Response response = null;
try {
    response = messageFactory.createResponse(Response.DECLINE,request);
} 
    catch (ParseException e) {
    // TODO Auto-generated catch block
e.printStackTrace();
}
try {
    st.sendResponse(response);
} catch (SipException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
 }  
 if(CallDialogActivity.SIP_INCOMING_CALL_ANSWER_INTENT.equals(action)){

Response response = null;
try {
    response = messageFactory.createResponse(Response.OK,request);

    } catch (ParseException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

try {
       st.sendResponse(okResponse);
} catch (SipException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (InvalidArgumentException e) {
/ TODO Auto-generated catch block
e.printStackTrace();
}
}  

Anybody have any ideas why this is happening and what I'm doing wrong?

A: 

For anyone that comes across this I was sending too many responses

Donal Rafferty