Don't show sip composing errors in chat window. Fix detection of incoming composing messages.

cusax-fix
Damian Minkov 18 years ago
parent 71a1dda2e6
commit 5a22485d8d

@ -188,7 +188,7 @@ public boolean processMessage(RequestEvent requestEvent)
// ignore messages which are not typing
// notifications and continue processing
if (ctheader == null && !ctheader.getContentSubType()
if (ctheader == null || !ctheader.getContentSubType()
.equalsIgnoreCase(CONTENT_SUBTYPE))
return true;
@ -330,11 +330,15 @@ public boolean processResponse(ResponseEvent responseEvent, Map sentMsg)
// ignore messages which are not typing
// notifications and continue processing
if (ctheader == null && !ctheader.getContentSubType()
if (ctheader == null || !ctheader.getContentSubType()
.equalsIgnoreCase(CONTENT_SUBTYPE))
return true;
int status = responseEvent.getResponse().getStatusCode();
// we retrieve the original message
String key = ((CallIdHeader)req.getHeader(CallIdHeader.NAME))
.getCallId();
if (status >= 200 && status < 300)
{
@ -342,15 +346,24 @@ public boolean processResponse(ResponseEvent responseEvent, Map sentMsg)
"Ack received from the network : "
+ responseEvent.getResponse().getReasonPhrase());
// we retrieve the original message
String key = ((CallIdHeader)req.getHeader(CallIdHeader.NAME))
.getCallId();
// we don't need this message anymore
sentMsg.remove(key);
return false;
}
else if (status >= 400 && status != 401 && status != 407)
{
logger.warn(
"Error received : "
+ responseEvent.getResponse().getReasonPhrase());
// we don't need this message anymore
sentMsg.remove(key);
return false;
}
// process messages as auth required
return true;
}

Loading…
Cancel
Save