#584 dialog module. BYE with bad Cseq.

ver 1.5.x
open
nobody
modules (357)
5
2009-07-10
2009-07-10
No

the dialog module in timeout BYE request send thru tm_module Cseq number from INVITE.

dlg_req_within.c:
function:
dlg_t * build_dlg_t(struct dlg_cell * cell, int dir){
line:
td->loc_seq.value = loc_seq;

if before final 200 OK, we will recieve PRACK/200 (new Cseq) , the dialog module will send bad Cseq number (loc_seq + 1);

Scenario:
----INVITE ( Cseq: 1) ->
<--- 183 ( Cseq: 1) ----
---- PRACK ( Cseq: 3) ->
<---- 200 OK ( Cseq: 3) -
---------- timeout ---->
---- BYE ( Cseq: 2) ->
<------ 503 (Bad CSeq number) -------

Quickly Solution:
td->loc_seq.value = loc_seq + 100;

Discussion

  • Alexandr Dubovikov

    oops:
    Scenario:
    ----INVITE ( Cseq: 1) ->
    <--- 183 ( Cseq: 1) ----
    ---- PRACK ( Cseq: 3) ->
    <---- 200 OK ( Cseq: 3 PRACK) -
    <---- 200 OK ( Cseq: 1 INVITE) -
    ---------- timeout dialog ---->
    ---- BYE ( Cseq: 2) ->
    <------ 503 (Bad CSeq number) -------

     
  • Iñaki Baz Castillo

    This is a good example of why a proxy shouldn't try to behave as a B2BUA
    XD

     
  • Daniel-Constantin Mierla

    quick fix: reply pracks on server, with sl_send_reply() as they just get into config?!?!

     
  • Alexandr Dubovikov

    Hi miconda,

    much better remove_hf("Supported:") from INVITE request; :-)
    and PRACK/200 ok in the dialog. But I think, the best solution, set loc_seq +100.

    P.S. don't forget about UPDATE method.

     
  • Alexandr Dubovikov

    > and PRACK/200 ok in the dialog. But I think, the best solution, set
    and PRACK/200 are not ok in the dialog. But I think, the best solution, set

     
  • Iñaki Baz Castillo

    Imagine that the UAC uses "Require: 100rel" instead of "Supported". The header cannot be removed or the call won't take place.
    A proxy shouldn't play to be god :)

     
  • Alexandr Dubovikov

    ok, in this case we couldn't remove Require, but can use this solution:

    http://www.faqs.org/rfcs/rfc3261.html
    8.2.2.3 Require

    UAC->UAS: INVITE sip:watson@bell-telephone.com SIP/2.0
    Require: 100rel

    UAS->UAC: SIP/2.0 420 Bad Extension
    Unsupported: 100rel

    This behavior ensures that the client-server interaction will
    proceed without delay when all options are understood by both
    sides, and only slow down if options are not understood (as in the
    example above). For a well-matched client-server pair, the
    interaction proceeds quickly, saving a round-trip often required
    by negotiation mechanisms. In addition, it also removes ambiguity
    when the client requires features that the server does not
    understand. Some features, such as call handling fields, are only
    of interest to end systems.

    anyway, all ways are posible. But as I told before, just make loc_seq +=100;
    it will be enougth.

    Wbr,
    Alexandr

     
  • Nobody/Anonymous

    CSeq should be increased in dialog module also for PRACKs.

    What's the original problem? Is dialog module not able to detect the PRACK as belonging to the dialog?

     
  • Alexandr Dubovikov

    should but didn't.

    because dlg_onroute check record-route param. If the param is not present, than ignored this message.

    if ( seq_match_mode!=SEQ_MATCH_NO_ID ) {
    if( d_rrb.get_route_param( req, &rr_param, &val)!=0) {
    LM_DBG("Route param '%.*s' not found\n", rr_param.len,rr_param.s);
    if (seq_match_mode==SEQ_MATCH_STRICT_ID )
    return;
    }

    default value for dlg_match_mode is 0;

    so. should works only in dlg_match_mode 2

    2 - DID_NONE - the match is done exclusively based on SIP elements; no DID information is added in RR.
    .
    so fix should be anyway. Or default value set to 2, or loc_cseq +100 or a notice in the README: "in 100rel mode, use only dlg_match_mode 2.

    Daniel. you should decide. :-)

     
  • Daniel-Constantin Mierla

    it got met some time :-) -- but majority of dialog module users should decide. Probably the default of dlg matching should be the one that handles all cases properly and definitely the docs should be updated.

    If there are requests within dialog, the cseq is updated (e.g., update, re-invite). Delicate situation is pre-confirmed dialog.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks