Hi Daniel,
i add this xlog line: xlog("before loose_route M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); and become the error from the ACK packages....
Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: <script>: before loose_route M=ACK RURI=sip:172.20.100.74;r2=on;lr=on;ftag=as4da6c5e1;did=5be.c2bda8e5 F=sip:0180290xxxxxx@sipgate.de T=sip:0049511xxxxxxxxx@sipgate.de IP=222.222.222.222 ID=33692d6634da2d752c2a66251316f3f6@sipgate.de Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: <script>: before loose_route M=ACK RURI=sip:172.20.100.74;r2=on;lr=on;ftag=as4da6c5e1;did=5be.c2bda8e5 F=sip:0180290xxxxxx@sipgate.de T=sip:0049511xxxxxxxxx@sipgate.de IP=222.222.222.222 ID=33692d6634da2d752c2a66251316f3f6@sipgate.de Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: rr [loose.c:103]: failed to parse Route HF Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: rr [loose.c:103]: failed to parse Route HF Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: <script>: before loose_route M=ACK RURI=sip:172.20.100.74;r2=on;lr=on;ftag=as4da6c5e1;did=5be.c2bda8e5 F=sip:0180290xxxxxx@sipgate.de T=sip:0049511xxxxxxxxx@sipgate.de IP=172.20.100.74 ID=33692d6634da2d752c2a66251316f3f6@sipgate.de Apr 19 14:25:25 kamailio1 /usr/local/sbin/kamailio[28166]: ERROR: <script>: before loose_route M=ACK RURI=sip:172.20.100.74;r2=on;lr=on;ftag=as4da6c5e1;did=5be.c2bda8e5 F=sip:0180290xxxxxx@sipgate.de T=sip:0049511xxxxxxxxx@sipgate.de IP=172.20.100.74 ID=33692d6634da2d752c2a66251316f3f6@sipgate.de
2012/4/19 Daniel-Constantin Mierla miconda@gmail.com: [...]
the initial invite has no route header, so it should not happen for that one at all.
I took the BYE and injected to a local kamailio, parsing the message, including the route header was going fine, see the log pasted below.
Add an xlog line before lose_route() and print some details of the package, like method, call-id, ... in order to identify properly which request is causing the log messages.