[OpenSER-Devel] Possible BUG in ACK handling ?

Iñaki Baz Castillo ibc at in.ilimit.es
Thu Jul 3 10:11:12 CEST 2008


El Thursday 26 June 2008 15:11:31 jerome.herve at orange-ftgroup.com escribió:
> > >  <<Possible_bug_in_ack.zip>>
> >
> > Hello guys,
> > I'm sending you this e-mail because we have found two strange behaviours
> > in the handling of ACK messages by openser 1.3.
> >
> > The first one appears when an IP phone is requesting for a non-existing
> > number. The proxy answers the phone with a "404 Not Found" which is
> > normal. But, when the proxy receives the ACK from the phone it seems to
> > ignore it and keeps on sending "404 Not found" for a couple of time.
> >
> > The second one appears when an IP phone is cancelling a call.
> > After the call is cancelled, then phone sends a "487 Terminated" message
> > to the proxy. The OpenSER proxy answers by an ACK, which is normal but it
> > seems the ACK is not recognized by the IP phone which keeps sending "487
> > Terminated" for a couple of time.

Hi Jerome. The cases you describe depend not just in OpenSer but in the config file. 
I can sure you that the ACK handling of OpenSer can be **perfect**, and the 
default config file handles it **perfectly**:


       if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        if (is_method("BYE")) {
                                setflag(1); # do accouting ...
                                setflag(3); # ... even if the transaction fails
                        }
                        route(1);
                } else {
                        /* uncomment the following lines if you want to enable presence */
                        ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
                        ##      # in-dialog subscribe requests
                        ##      route(2);
                        ##      exit;
                        ##}
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... ignore and discard.\n");
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }


This code works great for all possible ACK's.

Regards.



-- 
Iñaki Baz Castillo
ibc at in.ilimit.es



More information about the Devel mailing list