From federico.cabiddu@gmail.com Sun Jan 29 09:30:19 2017 From: Federico Cabiddu To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] R: R: serial forking calls using TSILO Date: Sun, 29 Jan 2017 09:29:42 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0409366651==" --===============0409366651== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I analyzed and reproduced your issue and here's my conclusions: 1) in your scenario TSILO module is not involved nor needed. TSILO implements "deferred" parallel forking while, in your case, what you are trying to implement is serial forking with chained transaction suspensions. You can see in your logs that TSILO's functions are called just to store the transaction, never to append to it new branches. 2) Kamailio is not currently able to suspend a transaction which already received a final reply. As a proof of this in your logs, at row 6483, we can see that Kamailio sent out a 500 reply. In your case the fact that you are able to resume somehow the transaction is a race condition due to the fact that the REGISTER for the 2nd r-uri is coming when the transaction has still not been deleted. I could reproduce this exact scenario. I opened a PR with a fix (https://github.com/kamailio/kamailio/pull/955) which I successfully tested. Let's wait for Daniel's feedback. 3) The problem of the new r-uri not taken in count while resuming the transaction is due to the fact that, in a failure route we are working on a copy of the original message and, the changes to it are not ported to the shm message clone that's used later for resuming the transaction. I don't have an easy solution for this, maybe Daniel can help :) Anyway I have a workaround for this: set and avp in the failure route with the new ruri you whish to use and use it in the resume route to set $ru for the message. Somethig like: route[INVRESUME] { .... if (is_avp_set("$avp(ru)")) $ru =3D $avp(ru); ..... } With the above patch on tm and this workaround I could successfully implement your scenario. Best regards, Federico On Tue, Jan 24, 2017 at 10:16 AM, Tomas Zanet wrote: > Hi Federico, sorry you=E2=80=99re right about log level. > Kamailio was running with right debug level but my syslog was configured > to split log messages based on level so all logs with debug went to another > file called debug. > I reconfigured syslog, please see the new attached file. > > I should have found the log lines where there's $ru overwriting, should be > the following log lines: > 2017-01-24T08:39:30+00:00 server-xip-99 /usr/local/sbin/kamailio[26021]: > ERROR: