Hi,
Just my 50 santīmi. If you look into whole PUSHJOIN, then it is:
route[PUSHJOIN] {
$var(hjoin) = 0;
lock("$tU");
$var(hjoin) = $sht(vtp=>join::$tU);
$var(hstored) = $sht(vtp=>stored::$tU);
$sht(vtp=>join::$tU) = $null;
unlock("$tU");
if ($var(hjoin)==0)
{
if ($var(hstored))
ts_append("location", "$tU");
return;
}
$var(id_index) = $(var(hjoin){s.select,0,:}{s.int});
$var(id_label) = $(var(hjoin){s.select,1,:}{s.int});
xdbg("resuming trasaction [$var(id_index):$var(id_label)] $tU
($var(hjoin))\n");
t_continue("$var(id_index)", "$var(id_label)",
"INVRESUME");
}
You can see that at line 8 we check if $var(hjoin) is equal 0 and it is
equal 0 only in this case we will resume the transaction, so we do want to
make a branch for the transaction that is resumed, not one that is still
suspended. So 1st registers arrive at this block and we do resume, but we
do not append brench and on the second register $var(hjoin) will be 0 and
in this case we do need to append branch.
At least this is my understanding, please forgive me if I mixed up
something. :)
I do find that this config works for me flawlessly, but I would like to add
that there might need some tweaks for it. In case if 2 Invites arrive to
the same subscriber when he does not have registration, then for this
config we will send to device only the latest INVITE and only the latest
invite will be branch out with tsilo. Again this is my perception of how
all this works and I apologize if I do mixed something. :)
Jurijs
On Wed, Nov 25, 2020 at 11:21 AM Anthony Alba <ascanio.alba7(a)gmail.com>
wrote:
On Wed, Nov 25, 2020 at 3:29 PM Federico Cabiddu
<federico.cabiddu(a)gmail.com> wrote:
Hi,
being $var basically static variables per process , I wanted to be sure
to reset
its value before processing it, but it's probably not needed there
(the example is old :)).
Is there a current version of the sample
for reference. Thanks!
Cheers
Anthony
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users