Skip to content

Commit

Permalink
dialog: don't sent ka if dialog is not local
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo-78 committed Feb 10, 2022
1 parent 8ce015a commit eb80bcb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/dialog/dlg_req_within.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,16 @@ int dlg_send_ka(dlg_cell_t *dlg, int dir)
int result;
dlg_iuid_t *iuid = NULL;

if (dlg->bind_addr[dir] == NULL) {
LM_DBG("skipping dialog without bind address\n");
return 0;
}

if (lookup_local_socket(&(dlg->bind_addr[dir]->sock_str)) == NULL) {
LM_DBG("skipping non local dialog\n");
return 0;
}

/* do not send KA request for non-confirmed dialogs (not supported) */
if (dlg->state != DLG_STATE_CONFIRMED) {
LM_DBG("skipping non-confirmed dialogs\n");
Expand Down

0 comments on commit eb80bcb

Please sign in to comment.