here is another example. my proxy calls loose_route() on bye:
T 2013/04/19 11:04:20.231928 192.98.102.10:36459 -> 192.98.102.10:5060 [AP]
BYE sip:0x255c610@192.98.102.10:5064;transport=tcp;alias=192.98.102.10~54499~2 SIP/2.0.
Via: SIP/2.0/TCP
192.98.102.10:36459;rport;branch=z9hG4bKPj44285a49-f9ae-4f9f-b87e-f84f6154ebfb.
Max-Forwards: 70.
From: <sip:jh@test.fi>;tag=e62595db-b17a-4cb3-8626-89ab5e93adf6.
To: <sip:test@test.fi>;tag=e89232ddda7a19a0.
Call-ID: c16a05aa8288df34.
CSeq: 20786 BYE.
Route: <sip:7Y11T82PtCrd8gLAYmYKE8TAYmYKjms=@192.98.102.10;transport=tcp;lr>.
Route: <sip:192.98.102.20:5070;transport=tcp;lr;r2=on>.
Route: <sip:192.98.102.20;transport=tcp;lr;r2=on>.
User-Agent: PJSUA v2.1 Linux-3.2.0.4/x86_64/glibc-2.13.
Content-Length: 0.
as result du is set to topmost route uri which is wrong:
Apr 19 11:04:20 siika /usr/sbin/sip-proxy[22967]: INFO: calling loose_route() on route
<<sip:7Y11T82PtCrd8gLAYmYKE8TAYmYKjms=@192.98.102.10;transport=tcp;lr>>
Apr 19 11:04:20 siika /usr/sbin/sip-proxy[22967]: INFO: rr [loose.c:794]: Topmost route
URI: 'sip:7Y11T82PtCrd8gLAYmYKE8TAYmYKjms=@192.98.102.10;transport=tcp;lr' is me
Apr 19 11:04:20 siika /usr/sbin/sip-proxy[22967]: INFO: du is
<sip:7Y11T82PtCrd8gLAYmYKE8TAYmYKjms=@192.98.102.10;transport=tcp;lr>
topmost route uri denoting the proxy itself should be removed and du set
to next route uri in the list.
-- juha