gmlc icon indicating copy to clipboard operation
gmlc copied to clipboard

onDialogTimeout is unconditionally sending http response

Open jaimecasero opened this issue 8 years ago • 9 comments

https://github.com/RestComm/gmlc/blob/master/core/slee/services/sbbs/src/main/java/org/mobicents/gmlc/slee/MobileCoreNetworkInterfaceSbb.java#L228

this logic should check if an http response was already sent!!!

jaimecasero avatar Sep 12 '16 16:09 jaimecasero

potentially reuse http://docs.oracle.com/javaee/6/api/javax/servlet/ServletResponse.html#isCommitted() so no new flag is required

jaimecasero avatar Sep 12 '16 16:09 jaimecasero

@jaimecasero

this logic should check if an http response was already sent!!!

I am trying to understand why "http response was already sent". DialogTimeout means that we have not received a resposne from SS7 network and therefore not generated any HTTP response. May it be that this response may be already generated by HTTP RA because of it's timeout for example ?

vetss avatar Sep 19 '16 06:09 vetss

well we were chcecking tracing from SBB that showed DialogTimeout was creating the "additional" response. Anyway, it may be worth investigating the SS7 beahvior, so we may need to add traces to thsi ticket...

jaimecasero avatar Sep 19 '16 09:09 jaimecasero

I have seen this happen before if jss7 is not configured. The 503 it throws does infact conflict with the resulting dialogtimeout, but I wouldn't call this a bug.

Vanit avatar Oct 06 '16 09:10 Vanit

JSS7 DialogTimout event comes in some delays like a minute. We may have DialogTimout events in case of SS7 stack is not properly configured (and therefore no response form a ss7 peer). So may it be HTTP request is already timed out at the time of JSS7 DialogTimout event is coming ?

vetss avatar Oct 06 '16 09:10 vetss

@Monix would you like to take care of this?

FerUy avatar Oct 06 '16 12:10 FerUy

@FerUy I've been reassigned to other projects at work so I won't have time to help out, sorry! Was just passing through and saw something I could comment on. :)

Vanit avatar Oct 06 '16 22:10 Vanit

No worries @Monix, thanks for your comment!

FerUy avatar Oct 06 '16 23:10 FerUy

@FerUy No problem, of course :) It's been a while since I looked at the code, but when I was investigating this the conflicting 503's were thrown from pretty deep in the jss7 stack. I suspect the bug is better placed in that repo, where it should be firing an appropriate dialog response back up to the GMLC instead of directly outputting its own 503 http response.

Vanit avatar Oct 06 '16 23:10 Vanit