-
Notifications
You must be signed in to change notification settings - Fork 215
SIP message is not sent back to USSD Gw when externalServiceTimeout set in rvd.xml is reached #2410
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
@FerUy , thanks for the elaborate analysis. That's a really strange behavior. RVD timeout internals should be transparent for Restcomm/USSD GW once proper RCML is returned. Please check/confirm the following scenario:
My point is:
Trying to explain my point further:
If this point is wrong, and everything works for requests-responses with 2 sec duration, could you also include http/RCML in the logs ? As far as i udnerstand you copied excerpts from the application log. Let's try to make sure that everything in terms of RCML is also ok on the wire. |
You are welcome, and thanks you back @otsakir ! Today I did several tests of all kinds (with latest TelScale release, 2.8.0.1560, the same one being used in customer's implementation), and latest Restcomm USSD Gateway with the patch provided by @vetss to solve RestComm/ussdgateway#69 (when I refer to Of the many tests I did, now taking traces including HTTP filter as you requested wisely, I'm attaching traces and logs here of four of them, and it's clear we have issues. Test 1)USSD Gateway Here, the expected result was receiving through USSD this final message in jSS7 simulator: Test 1 logs and trace here: iss2410test1_sl4-USSD10-rvdES2.zip Test 2)USSD Gateway On this occasion, expected result was receiving through USSD this final message in jSS7 simulator: Test 2 logs and trace here: iss2410tet2_sl3-USSD15-rvdES4.zip Test 3)USSD Gateway On this occasion, expected result was receiving through USSD this final message in jSS7 simulator: Test 3 logs and trace here: iss2410_sl10-USSD29-rvdES30.zip Test 4)USSD Gateway On this occasion, expected result was receiving through USSD this final message in jSS7 simulator: Test 4 logs and trace here: iss2410_sl20-USSD25-rvdES25.zip Hope these tests help to clarify the situation involving RVD I will carry out further tests with the new 'timeout' property in the specific RVD/ES element you mentioned and publish results here too (albeit this is another story to tell). |
Hi @otsakir, as told in previous comment, I went through testing of new 'timeout' property in the specific RVD/ES element. For that, I downloaded latest Restcomm-Connect binaries, i.e. Restcomm-JBoss-AS7-8.2.0.1278. Good news!! Please find attached some of the tests carried out. All of them derived in a SIP BYE sent to the USSD Gw and session is terminated as expected. Traces of 3 of the tests conducted can be found in the traces attached. These tests had the USSD Gateway timeout set higher than either the sleep time or the RVD ES timeout. All passed. issue2410_testsRC_8.2.0.1278.zip Not closing the issue as still we have the problem of |
Hi @otsakir Thinking about why not closing this issue, I did another test: setting the On the contrary, if you leave the Please have the attached traces and rvd logs from either described tests attached here: |
I carried out more tests and it was worthy, as previous comment could be a little confusing. Let me describe the tests separately. Test 1)RVD ES Everything works as expected. At precisely 3 seconds after the ES timeout was triggered, it timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Traces and RVD log: ESTimeout3s_externalServiceTimeoutUNSET_USSD25s_sleep20.zip Test 2)RVD ES Here the rvd.xml Traces and RVD log: ESTimeout6s_externalServiceTimeoutUNSET_USSD25s_sleep20.zip Test 3)RVD ES Everything works as expected. At precisely 3 seconds after the ES timeout was triggered, it timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. It's important to note that when the ES Test 4)RVD ES Notice here that, opposite to what was set in test 3), RVD ES Traces and RVD log: ESTimeout10s_externalServiceTimeout6s_USSD25s_sleep20s.zip So, RVD ES Timeout works as expected as long as it is set with a lower value than the default one (5 secs) or the one set manually in rvd.xml |
I am working on this issue and I discovered that the value in the rvd.xml is not taken into account. I already have a fix for that. There is another issue where the timeout doesn't follow the settings and it always times out at about 5 seconds no matter what value you have in the rvd.xml and the ES timeout in the APP. Investigation still in progress. |
Thanks for feedback @charles! @abdulazizali77, fyi, please be in sync with Charles. |
@FerUy , some more backkground on internals:
I think these explain test(4) aand test(2) cc @abdulazizali77 , @croufay |
@otsakir right, we already reached an agreement on that. In the weekend I did a lot of other tests and we can summarize the most important one as following (as it has the parameters set as we need them in production): RVD ES Everything went perfectly well as you can see in attached logs/traces. externalServiceTimeout2secs.zip Important: This test was done with latest fixes merged for #2411 (merged PR #2438), in other words, with Restcomm-Connect release 8.2.0.1789, and latest USSD Gw public release (7.1.62), covering RestComm/ussdgateway#69, tied to problems detected in #2411. |
@otsakir @croufay @abdulazizali77 @gmlemus @vetss, as agreed today, I carried out new tests using Restcomm-JBoss-AS7-8.2.0.1288 and TelScale-ussd-7.1.1.541 (enhanced by replacing TelScale jars with public Test 1)RVD ES Everything works as expected. At precisely 3 seconds after the ES timeout was triggered, it timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Test 2)RVD ES Everything works as expected. At precisely 5 seconds (default) RC timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Test 3)RVD ES Everything works as expected. At precisely 3 seconds after the ES timeout was triggered, it timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Test 4)RVD ES Here there is a problem. Nothing is sent back to Restcomm, so it doesn't really timeout (opposite of what is shown in rvd application log). Third, as a consequence of the latter, no SIP BYE is sent to USSD Gw. Finally, USSD Gw times out and SIP BYE is received and the session is ended on both sides (see error logged in attached server.log and in Test4 folder (improvement here -session is eventually terminated when USSD Gw sends SIP BYE- is due to workaround made to #2411 by @abdulazizali77). Test 5)RVD ES This test is important because is the one we aim to set in a live system. Fortunately, everything goes as expected. At precisely 2 seconds RC timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Test 6)RVD ES Everything works as expected. At precisely 5 seconds (default) RC timeouts and what is shown in the RVD log is consistent with what happens in the wire. SIP BYE is sent to the USSD Gw and session is properly closed on either sides. Find attached traces and logs of all tests described above next: |
Same results as in previous comment with today's generated TelScale version (8.2.0.1580), find traces/logs attached here: |
About the behavior of test (4):
The bottom-line is that the http-client timeouts in restcomm.xml should ALWAYS be greater than RVD effective timeout . How much greater ? It depends on how much time it takes rcomm to reach RVD. I'd say that 1 sec is more than enough. @FerUy , can you check the http-client/response-timeout value in restcomm.xml and make sure it's less than RVD timeout value (rvd.xml externalServiceTimeout) ? What was the case for test(4) ? Can you confirm my hypothesis ? Why
|
@FerUy , I had a conf call with @otsakir about this and I tested using the latest Telscale version of Restcomm-connect and everything worked fine taking into account the value of rvd.xml file. Test 4) USSD Gateway dialogtimeout = 25 secs The above test is slightly flawed for the reason that Restcomm also has a default http response-timeout that defaults to 6000ms. According to @otsakir, the value in the rvd.xml or in the rvd app must be lower than Restcomm-connect's http response-timeout value. In any production setting, there will be no reason to have a value higher than 5000ms in production so I think the decision to use 2000ms in the rvd.xml file should cover our usecase. |
Thanks you both for detailed explanation. I completely agree with the approach, so test 4 makes no sense in the context of this issue, but it's good for the overall landscape. Absolutely, we don't want user's wrong use of the application to tear down the whole system, and this is the correct way to deal with 👍 |
Oh, and I almost forgot your request @otsakir:
So, yes, that confirms your theory ;) |
ok @FerUy thanks. I've improved the comments for timeout both in RVD and restcomm: https://github.com/RestComm/visual-designer/blob/5152023a63816f3e9bd61a76c41034e335440d38/designer/src/main/webapp/WEB-INF/rvd.xml#L42-L42 Can we close this ? |
Hi @otsakir, yes, just doing that :) |
An issue was found when testing rvd.xml
externalServiceTimeout
parameter for a USSD Gw <-> Restcomm-Connect implementation for a customer who needs to set a low timeout value for On timeout within USSD RVD External Services modules, in order to preventing delayed external services to impact the performance by queuing USSD ongoing sessions.No matter which value is set, Restcomm-Connect does not proceed with the corresponding SIP message (neither SIP INFO nor SIP BYE depending on the module -USSD Collect or USSD Message respectively).
The test consisted on a simple USSD RVD project to simply test this (attached). The external service targets a simple php script with a sleep function at the beginning. If the sleep time (1 second) is lower than
externalServiceTimeout
value (2 seconds), the project proceeds to the final USSD Message. This can be easily seen on the USSD RVD project log:But, if the sleep time is set greater than
externalServiceTimeout
value (2 seconds), then the following happens:externalServiceTimeout
value), as can be seen below in USSD RVD project log (this time going to the corresponding timeout message, either a USSD Message or a USSD Collect):dialogtimeout
parameter dictates -25 seconds in this example tests-).Both situations for On Timeout (being triggered or not) can be verified in the attached Wireshark traces. While when there's not a timeout, everything is processed normally, when the external service times out, no SIP messages is sent back to USSD Gateway.
Simple_USSD_project.zip
USSD-Restcomm_RVD_ES-NOTimeoutTests.pcap.pcapng.zip
USSD-Restcomm_RVD_ES-TimeoutTests.pcap.pcapng.zip
The text was updated successfully, but these errors were encountered: