Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

技术咨询关于收到响应时401的处理时机 #1696

Open
a24211317 opened this issue Nov 18, 2024 · 0 comments
Open

技术咨询关于收到响应时401的处理时机 #1696

a24211317 opened this issue Nov 18, 2024 · 0 comments

Comments

@a24211317
Copy link
Contributor

我在SIPProcessorObserver发现processResponse中的一段代码对于401的响应没有做出处理,请问是在哪个地方对401回复处理的。现在遇到了信令回复的401Unauthorized 但是在keepalive的定时中发现响应的是200ok导致上级离线了也没有重新注册
// Success
if (((status >= Response.OK) && (status < Response.MULTIPLE_CHOICES)) || status == Response.UNAUTHORIZED) {
if (status != Response.UNAUTHORIZED && responseEvent.getResponse() != null && !sipSubscribe.isEmpty() ) {
CallIdHeader callIdHeader = response.getCallIdHeader();
if (callIdHeader != null) {
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId());
if (sipEvent != null) {
if (sipEvent.getOkEvent() != null) {
SipSubscribe.EventResult eventResult = new SipSubscribe.EventResult<>(responseEvent);
sipEvent.getOkEvent().response(eventResult);
}
sipSubscribe.removeSubscribe(callIdHeader.getCallId());
}
}
}
ISIPResponseProcessor sipRequestProcessor = responseProcessorMap.get(response.getCSeqHeader().getMethod());
if (sipRequestProcessor != null) {
sipRequestProcessor.process(responseEvent);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant