Skip to content

Commit

Permalink
dialog: safety bump of cseq for bye if prack was involved in call setup
Browse files Browse the repository at this point in the history
- reported by GH#409

(cherry picked from commit aab6547)
  • Loading branch information
miconda committed Nov 25, 2015
1 parent 8962cb7 commit 863739d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/dialog/dlg_hash.c
Expand Up @@ -999,6 +999,8 @@ void next_state_dlg(dlg_cell_t *dlg, int event,
switch (dlg->state) {
case DLG_STATE_EARLY:
case DLG_STATE_CONFIRMED_NA:
dlg->iflags |= DLG_IFLAG_PRACK;
break;
case DLG_STATE_DELETED:
break;
default:
Expand Down
1 change: 1 addition & 0 deletions modules/dialog/dlg_hash.h
Expand Up @@ -76,6 +76,7 @@
#define DLG_IFLAG_KA_DST (1<<2) /*!< send keep alive to dst */
#define DLG_IFLAG_TIMER_NORESET (1<<3) /*!< don't reset dialog timers on in-dialog messages reception */
#define DLG_IFLAG_CSEQ_DIFF (1<<4) /*!< CSeq changed in dialog */
#define DLG_IFLAG_PRACK (1<<5) /*!< PRACK was routed during initial state */

#define DLG_CALLER_LEG 0 /*!< attribute that belongs to a caller leg */
#define DLG_CALLEE_LEG 1 /*!< attribute that belongs to a callee leg */
Expand Down
5 changes: 5 additions & 0 deletions modules/dialog/dlg_req_within.c
Expand Up @@ -348,6 +348,11 @@ static inline int send_bye(struct dlg_cell * cell, int dir, str *hdrs)
goto err;
}

/* safety bump of cseq if prack was involved in call setup */
if(cell->iflags & DLG_IFLAG_PRACK) {
dialog_info->loc_seq.value += 80;
}

LM_DBG("sending BYE to %s\n", (dir==DLG_CALLER_LEG)?"caller":"callee");

iuid = dlg_get_iuid_shm_clone(cell);
Expand Down

0 comments on commit 863739d

Please sign in to comment.