From misak@misak.dk Thu Oct 28 13:37:46 2010 From: Morten Isaksen To: sr-users@lists.kamailio.org Subject: [SR-Users] Problem with Kamailio not routing ACK to a 200 OK Date: Thu, 28 Oct 2010 13:37:40 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1351425843==" --===============1351425843== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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. 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: