From miconda@gmail.com Fri Oct 29 10:59:38 2010 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Problem with Kamailio not routing ACK to a 200 OK Date: Fri, 29 Oct 2010 10:59:34 +0200 Message-ID: <4CCA8CF6.3030906@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1481894617==" --===============1481894617== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, On 10/28/10 1:37 PM, Morten Isaksen wrote: > Hi, > > I have a strange problem with Kamailio 3.0.2. When one of our end > users makes a call Kamailio does not route the ACK (in response to the > 200 OK). For all other end users it works fine. > > For me it looks the the has_totag() checks for some reason fails and > then t_check_trans() thinks it is a ACK to a local transactions and > then terminates the script. Otherwise there should be more lines in > the log file. if you add an xlog() after the if with has_totag(), do you get the=20 message in the logs? Cheers, Daniel > The conf is pretty standard. > > route{ > > xlog("L_WARN", "New request - M=3D$rm RURI=3D$ru F=3D$fu T=3D$tu > IP=3D$si ID=3D$ci\n"); > xlog("L_WARN", "ua=3D$ua"); > if (!mf_process_maxfwd_header("10")) { > sl_send_reply("483","Too Many Hops"); > exit; > } > > if(!sanity_check("1511", "7")) > { > xlog("Malformed SIP message from $si:$sp\n"); > exit; > } > > > if (has_totag()) { > xlog("L_WARN", "has_totag start - M=3D$rm RURI=3D$ru F=3D$= fu > T=3D$tu IP=3D$si ID=3D$ci\n"); > # sequential request withing a dialog should > # take the path determined by record-routing > if (loose_route()) { > xlog("L_WARN", "loose_route - M=3D$rm RURI=3D$ru > F=3D$fu T=3D$tu IP=3D$si ID=3D$ci\n"); > route(RELAY); > } else { > if (is_method("SUBSCRIBE")&& uri =3D=3D myself) { > # in-dialog subscribe requests > #route(PRESENCE); > exit; > } > if ( is_method("ACK") ) { > if ( t_check_trans() ) { > xlog("L_WARN", "ACK > t_check_trans - M=3D$rm RURI=3D$ru F=3D$fu T=3D$tu IP=3D$si ID=3D$ci\n"); > # non loose-route, but > stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream > server > t_relay(); > exit; > } else { > xlog("Ignoring ACK - M=3D$rm > RURI=3D$ru F=3D$fu T=3D$tu IP=3D$si ID=3D$ci\n"); > # ACK without matching > transaction ... ignore and discard.\n"); > exit; > } > } > sl_send_reply("404","Not here"); > } > xlog("L_WARN", "has_totag end - M=3D$rm RURI=3D$ru F=3D$fu > T=3D$tu IP=3D$si ID=3D$ci\n"); > exit; > } > > #initial requests > > # CANCEL processing > if (is_method("CANCEL")) > { > if (t_check_trans()) > t_relay(); > exit; > } > > setflag(4); > t_check_trans(); > > ... > > The log files show: > > Oct 28 10:51:13 sip-core-1 /usr/local/sbin/kamailio[10503]: WARNING: >