Description

I loop through the active dialogs in a timer functions and based on some conditions, a dialog may be ended by setting a short timeout or using the dlg_bye function. Sometimes when a dialog times out or the dlg_bye("all") function is used, the BYE is not being sent in both directions, only towards the caller.

There's a warning:

send_bye(): dlg [25641:71143] with callid XXXXXXXXX already in deleted state, BYE not sent.

I noticed this check was added in the commit below:

d411c6e

Is there a race condition between marking the dialog as terminated and sending the BYE?

Not sending a BYE towards the callee when it should is much worse than sending an unnecessary BYE as it causes billing issues. If this can't be resolved to be 100% reliable, it's safer to remove this check all together.

Additional Information

version: kamailio 5.7.6 (x86_64/linux))

Debian GNU/Linux 12 (bookworm)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/4169@github.com>

Mercury109Mercury109 created an issue (kamailio/kamailio#4169)

Description

I loop through the active dialogs in a timer functions and based on some conditions, a dialog may be ended by setting a short timeout or using the dlg_bye function. Sometimes when a dialog times out or the dlg_bye("all") function is used, the BYE is not being sent in both directions, only towards the caller.

There's a warning:

send_bye(): dlg [25641:71143] with callid XXXXXXXXX already in deleted state, BYE not sent.

I noticed this check was added in the commit below:

d411c6e

Is there a race condition between marking the dialog as terminated and sending the BYE?

Not sending a BYE towards the callee when it should is much worse than sending an unnecessary BYE as it causes billing issues. If this can't be resolved to be 100% reliable, it's safer to remove this check all together.

Additional Information

version: kamailio 5.7.6 (x86_64/linux))

Debian GNU/Linux 12 (bookworm)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/4169@github.com>