Module: kamailio Branch: master Commit: fab1b5dc4edc74555b965a6c305d7643629e0225 URL: https://github.com/kamailio/kamailio/commit/fab1b5dc4edc74555b965a6c305d7643...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-01-12T16:35:18+01:00
dialog: handle replies to local cancel for cseq updates
---
Modified: src/modules/dialog/dlg_cseq.c
---
Diff: https://github.com/kamailio/kamailio/commit/fab1b5dc4edc74555b965a6c305d7643... Patch: https://github.com/kamailio/kamailio/commit/fab1b5dc4edc74555b965a6c305d7643...
---
diff --git a/src/modules/dialog/dlg_cseq.c b/src/modules/dialog/dlg_cseq.c index 41c9864..98fae28 100644 --- a/src/modules/dialog/dlg_cseq.c +++ b/src/modules/dialog/dlg_cseq.c @@ -78,25 +78,24 @@ static int dlg_cseq_prepare_msg(sip_msg_t *msg) /* reply to local transaction -- nothing to do */ if (parse_headers(msg, HDR_VIA2_F, 0)==-1 || (msg->via2==0) || (msg->via2->error!=PARSE_OK)) { - LM_DBG("no second via in this message \n"); - return 3; + if(get_cseq(msg)->method_id != METHOD_CANCEL) { + LM_DBG("no second via in this message \n"); + return 3; + } } }
- if(parse_from_header(msg)<0) - { + if(parse_from_header(msg)<0) { LM_ERR("cannot parse FROM header\n"); return 3; }
- if(parse_to_header(msg)<0 || msg->to==NULL) - { + if(parse_to_header(msg)<0 || msg->to==NULL) { LM_ERR("cannot parse TO header\n"); return 3; }
- if(get_to(msg)==NULL) - { + if(get_to(msg)==NULL) { LM_ERR("cannot get TO header\n"); return 3; }