Sip 错误 - 响应不属于此事务
我想知道以前有人在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于遇到此问题的任何人,我发送了太多回复
For anyone that comes across this I was sending too many responses