[sr-dev] [dialog MI dlg_end_dlg] error when terminating a dialog in state 2 (never removed from memory)

Iñaki Baz Castillo ibc at aliax.net
Fri Jul 9 14:54:52 CEST 2010


Hi, Kamailio 1.5.4, let's suppose this case:


1) A dialog in eary state (state 2):

  ~# kamctl fifo profile_list_dlgs out
  dialog::  hash=1055:330534072
          state:: 2


2) Now try to terminate it:

  ~# kamctl fifo dlg_end_dlg 1055 330534072


3) It produces an error because in the early dialog there is no
Contact for the called:

   ERROR:dialog:build_dlg_t: no contact available
   ERROR:dialog:send_bye: failed to create dlg_t
   CRITICAL:dialog:log_next_state_dlg: bogus event 7 in state 2 for dlg
        0x7f25f0cde718 [3168:435552476] with clid 'hqpprxbyrutiytu at ibc-torre'
        and tags 'ysldc' ''


4) The dialog remains in state 2 (as the MI command shows), and later
it's cancelled by the UAC.


5) MI profile_list_dlgs out will show the dialog in state 5 *forever*,
it's never deleted from memory! (perhaps it's after expiration time,
haven't checked it).



NOTE: I do know that dlg_end_dlg is not ready for early dialogs, as it
should trigger a transaction cancel (CANCEL to all the branches and
408 to the UAC) rather than sending a BYE, but this feature is not
implemented.
However the current code could leak.


-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-dev mailing list