Ace,
So record-route goes like a stack and moves the current contact one down the chain.
You could then presumably truncate the list of other routes for privacy if needed?
I don't see why all "record-route" entries need to be maintained if the conversation is mediated by Kamailio.
Leo
if you want to ensure that your kamailio stays on the path of the dialog for
following requests you probably want to use record-route headers for this.
This is usally done with the rr module, record_route() function.
To quote from iptel.org:
"[A] Mechanism by which a proxy can inform user agents that it wishes to stay
on the path of all further messages is called record routing. Such a proxy
would insert Record-Route header field into SIP messages which contain address
of the proxy. Messages sent within a dialog will then traverse all SIP proxies
that put a Record-Route header field into the message.
The recipient of the request receives a set of Record-Route header fields in
the message. It must mirror all the Record-Route header fields into responses
because the originator of the request also needs to know the set of proxies."