-
Notifications
You must be signed in to change notification settings - Fork 215
Restcomm exception prevents 200 OK response to MESSAGE to be sent to message sender #1023
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
Comments
Seems I'm still getting this issue. Here are the android logs https://gist.github.com/atsakiridis/da6aeaf1c7343c3da3c4095e17c4ae4f |
@atsakiridis I did some tests locally but I couldn't reproduce the problem. The details for the tests I did are the following:
Restcomm and both clients were running on the same network. Messages from Web Olympus to Android Olympus and vice versa were properly sent and 200 OK was sent back with no exceptions. We need to test again the call flow at cloud to check if this is still a valid issue. George |
Thanks @gvagenas will try to check this latest this week and let you know. I'm sure it was reproducible in cloud, but not sure about locally. |
@gvagenas just retried and it is reproducible for me locally. Using:
Restcomm and both clients were running on the same network. Scenario:
Problem seems to be that Restcomm breaks with this exception:
Attaching Restcomm logs, Android logs, pcap |
@atsakiridis I couldn't reproduce 100% the issue. From the logs I can see that the session is already invalidated but Restcomm-Connect will never invalidate or set readyToInvalidate a session for a P2P messaging. Maybe @jaimecasero could share some light here |
these issues use to be caused by Akka actor logic invoking sipservlets API from nonManaged thread (akka thread), and getting "unsync" (combinations here are endless). in this particular log file, we can see this message, no t sure what it means... ill have a deep look later |
@jaimecasero The UserAgentManager messages you see at the logs are not related to the call flow. The The sip servlets API implementation has not changed and still invoked by a non managed thread (akka thread) and this is still a pending task. I doubt this is the problem since all other p2p call flows are working properly. Its only the 200 OK for a MESSAGE request that gets the sip session invalidated for a reason. |
@gvagenas MESSAGE is heavily used in SIPServlets testsuite, and im not aware of any issue there (http://ci.telestax.com/view/SipS7/job/TelScale-SIP-Servlets-7-TestSuite/lastCompletedBuild/testReport/org.mobicents.servlet.sip.testsuite.simple/ShootistSipServletTest/testShootistMessageSetContact/). So, if you mean that the container has an issue sending 200OK response to a simple MESSAGE request (if thats the scenario...), i would really doubt such simple scenario has any issue.... Anyway, the attached log file is not showing DEBUG level of sipservlets/jainsip, so there is not much i can check there. @atsakiridis could please attach log fiels with DEBUG level enabled? @gvagenas MESSAGE requests may be sent in-dialog or not, how is RestcommConnect sending them? Assuming you are sending standalone MESSAGE requests with no previous dialogue context; would it be possible the container is closing the SIPSession related to MESSAGE once the transaction is closed by the final response? If yes, what is the purpose of saving an attribute in the session while processing a response? what are you expecting to get from a standalone MESSAGE in terms of session attributes? From the code here |
from antonis on reproducibiltiy: |
got his 20:03:11,997 ERROR [org.restcomm.connect.telephony.api.util.B2BUAHelper] (RestComm-akka.actor.default-dispatcher-18) Problem while trying to set User part on a clones response for a P2P call, java.lang.NullPointerException |
een:gov.nist.javax.sip.stack.SIPDialog@303fc921lastAckReceived is null -- returning false this is realted to RCML not found, already fixed in another issue |
6:33:38,674 DEBUG [gov.nist.javax.sip.parser.NioPipelineParser] (pool-AffinityJAIN-thread-8) dispatch task done on SIP/2.0 200 OK^M 06:33:38,693 ERROR [org.restcomm.connect.sms.SmsService] (RestComm-akka.actor.default-dispatcher-16) null: java.lang.NullPointerException |
i think latest NPE is the most similar to original one: In this case we are assuming an SMSSession akka actor will be in the sipappsession as attribute. There is no check onthat,and the NPE is triggered. A simple Null checking allows to send the 200OK response back to original client. Why the P2P message scenario is lacking the correpsonding SMSSession is yet to be asnwered. Apparentl the SMSSession will be created on 3 scenarios:
As we can see none of these cover the direct P2P message scenario. My conclusion is that assumption on existing SMSSession without taking into accoutn P2P scenario was made. The simple Null checking plus a brief comment explaining why should be enough to fix this. |
09:40:39,081 ERROR [stderr] (RestComm-akka.actor.default-dispatcher-80) java.lang.NullPointerException reproduced on olympus by sending message burst this seems to be related to assumption on clonedresponse to have a Contact Header.Apparently MESSAGE request should not have a Contact header and the sipservletsrequest/jainsip stack prevents the header to be added while creating response: References to an existing issue are made there:constraints from Issue 1687 : Contact Header is present in SIP Message where it shouldn't Under this finding, Null checking over Contact header should be made before attempting to update user uri. from https://www.ietf.org/rfc/rfc3428.txt: |
Scenario: iOS olympus sends a message to web olympus but although the message properly sent, seems error gets an exception that prevents it from sending the 200 OK back to the sender. Here are restcomm logs for scenario:
https://gist.github.com/atsakiridis/ac8c8aaa03000b8a274d66107e707db9
Restcomm-Connect version used: Restcomm 7.6.0.879
The text was updated successfully, but these errors were encountered: