0

Could any one help me on this kamailio issue, i am using kamailio as a proxy & router, PSTN route works fine, but have a problem with the ACK in response to 200OK which is not being forwarded by kamailio.

below the SIP flow at client side.

                             Messages  Retrans   Timeout   Unexpected-Msg
  INVITE ---------->         1         0
     100 <----------         1         0         0         0
     183 <----------         0         0         0         0
     180 <----------  E-RTD1 1         0         0         0
     200 <----------  E-RTD1 1         1         0         0
     ACK ---------->         1         1
   Pause [   3000ms]         1                             0
     BYE ---------->         1         0         0
     200 <----------         0         0         0         1

after 200 OK, i have received 404 "Not here" from kamailio. Here is the cfg i have.. not sure how to solve this, since i am new to kamailio tool.

# Handle requests within SIP dialogs
route[WITHINDLG] {
    if (!has_totag()) return;

    # sequential request withing a dialog should
    # take the path determined by record-routing
    if (loose_route()) {
        route(DLGURI);
        if (is_method("BYE")) {
            setflag(FLT_ACC); # do accounting ...
            setflag(FLT_ACCFAILED); # ... even if the transaction fails
        } else if ( is_method("ACK") ) {
            # ACK is forwarded statelessly
            route(NATMANAGE);
        } else if ( is_method("NOTIFY") ) {
            # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
            record_route();
        }
        route(RELAY);
        exit;
    }

    if (is_method("SUBSCRIBE") && uri == myself) {
        # in-dialog subscribe requests
        route(PRESENCE);
        exit;
    }
    if ( is_method("ACK") ) {
        if ( t_check_trans() ) {
            # no loose-route, but stateful ACK;
            # must be an ACK after a 487
            # or e.g. 404 from upstream server
            route(RELAY);
            exit;
        } else {
           
            # ACK without matching transaction ... ignore and discard
            exit;
        }
    }
    sl_send_reply("404","Not here");
    exit;
}

Please help.. thanks in advance.

Sheldon
  • 169
  • 1
  • 2
  • 16
  • Seems that you are trying to run performance tests with SIPP against Kamailio and it seems that Kamaili do not likes your BYE. Seems you do not have Route heder in your BYE – os11k Sep 23 '20 at 16:53
  • You provided quite limited and contradictory information. You are saying that ACK is not received by Kamailio and you put SIPP log. But seems that you are missing Record-Route at the end and Kamailio is not included in the loop. – os11k Sep 23 '20 at 17:03

1 Answers1

0

Solved it by adding below//

     if (is_method("ACK|BYE")) {
             $duri= $ruri;
             t_relay();
             exit;
     }
Sheldon
  • 169
  • 1
  • 2
  • 16