2010/7/12 Timo Reimann <timo.reimann(a)1und1.de>de>:
Iñaki Baz Castillo wrote:
Could you please perform the same experiment I've
done in my first
mail? I can reproduce it 100% of times.
Will do and report back as soon as I get
to it.
Thanks a lot. BTW I'm using kamailio 1.5.4.
I was able to repeat your results with Kamailio 1.5 SVN: Whenever I
issue "dlg_end_dlg" on a call in the "early" state, it will never
get
cleaned up.
The reason is that the reference counter isn't properly decremented.
Normal calls where no BYE message is forced correctly drop to zero
references and finally let the dialog module clean up the terminated
call. However, with dlg_end_dlg-enforced calls, the dialog drops no less
than one no matter how long you wait.
I know the error is somewhere within send_bye(), and I'm in the process
of closing in. Will report again once I find the right spot and probably
also provide a patch right away.
Thanks a lot for your work.
Oh, and by the way: Kamailio does deny sending out BYE
requests for
calls not in the "confirmed" state as of now. However, this check is
done in the tm module called by the dialog module, and the latter passes
to the former a dialog state of DLG_CONFIRMED *always*.
Opsss, and this is why it gives an error when there is no
remote-target (no Contact in the UAS's responses yet).
That is, it
doesn't respect the current dialog's state. I have no clue why but will
certainly consider using the real dialog state to work around the
module's current deficiencies.
Definitely, 'dialog' module is the most weakest piece in Kamailio.
Hopefully your work will change it :)
Best regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>