[OpenSIPS-Devel] [OpenSIPS/opensips] 8e876e: dialog: fix dlg_end_dlg local_route execution

Răzvan Crainea noreply at github.com
Tue Nov 19 08:16:21 EST 2019


  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8e876e4a6278c540d547521ac066fe216e656db7
      https://github.com/OpenSIPS/opensips/commit/8e876e4a6278c540d547521ac066fe216e656db7
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M modules/dialog/dlg_req_within.c

  Log Message:
  -----------
  dialog: fix dlg_end_dlg local_route execution

Before this commit, when running any flavor of `dlg_end_dlg` from an
external process (not a SIP worker), the command that was generating the
BYE messages (tm's `t_request_within`) was dispatching the job to a SIP
worker, using IPC dispatch. This means that the BYE messages were
created in a different process than the initial one, thus not exposing a
proper context in `local_route`, but a dangling one, whichever was not
properly cleaned up after a request was processed. This resulted in
bogus data, such as inexisting `$DLG_dir` output, or even worse,
whatever broken values were leftover in the dangling context.

This commit fixes this issue by dispatching every `dlg_end_dlg` job
to a SIP worker, thus creating and populating the dialog context
properly.

This command affects any function that can be run through MI, or from an
external process such as:
* MI dlg_end_dlg
* MI profile_end_dlgs
* RTPProxy/RTPengine timeout notifications

Credits go to Darpan Patel for reporting this issue on GitHub
Fix #1896

(cherry picked from commit bef6f542bdf58c094f7e6a89abee03038977b3f8)





More information about the Devel mailing list