Sip 错误 - 响应不属于此事务

发布于 2024-08-22 19:08:27 字数 1744 浏览 7 评论 0原文

我想知道以前有人在 SIP 中遇到过这个错误吗?

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

我收到邀请后就收到了,然后我发回 100 尝试,然后是 180 振铃。

然后用户可以按屏幕上的“拒绝”或“接受”。

如果他们按拒绝,我会发送拒绝,效果很好。

但是,当我发送带有 SDP 数据的 OK 来接受呼叫时,出现上述错误。

这里有一些代码片段:

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();
}
}  

有人知道为什么会发生这种情况以及我做错了什么吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幸福不弃 2024-08-29 19:08:27

对于遇到此问题的任何人,我发送了太多回复

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文