Thanks for your reply.
I'm agree with your observations. I had already tried to solve the situations as
described in the draft (avoiding spiral) and I have built a configuration that seem to
work, at least for the basic call, but my solution needs to much tricks and I'm not
sure that what I have done is safe and if it works in more complex call flows.
I set the IP address in Record Route depending on position public\private of the callee
and I substitute the IP address in Record Route for each reply, when it needs.
First of all I suppose to know if the caller and callee is private or public (I check if
the Request URI domain with RFC 1918) and I don't know if this is right.
Then there is the problem to write the record route. I have moved the record route section
in a branch route, because here I know the final destination for each branch.
Here there is another doubt: I rewrote the record_route_preset function in order to remove
the limit of one record route because in parallel forking I set more than record for each
transaction, one record route for each branch. What are the consequences? I risk
"only" to loose a call or to kill the proxy?
I would prefer to leave the record route section at the beginning, but is it possible to
substitute the record route after it is added? I remember that is possible to change only
the original message and that there are some limitations on the possibility to change an
header added during the message processing (I had some segmentation faults when I tryed
with a custom header).
Just now I'm looking on what to do with a relay from the failure route to a second
destination.
Before I proceding on this way I would like to know if I'm going on the wrong
direction and if someone has found a simpler solution with this kind of scenarios.
Regards,
Daniele
Date: Wed, 22 Oct 2008 19:02:35 +0200
From: " I?aki Baz Castillo " <ibc(a)aliax.net>
Subject: Re: [Kamailio-Users] Record Route and proxy behind static NAT
Cc: users(a)lists.kamailio.org
Message-ID:
<cc1f582e0810221002i7c95570epf585456a248811d1(a)mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
The solution could be adding two Record-Routes, one
with private IP
and the other with public IP, but I'm not sure of how to achieve it
with Kamailio. AFAIK Kamailio *already* does it when the transaction
comes via eth0 and leaves the proxy via eth1, but this is not your
case.
I recommend you reading this draft, and later trying
to get it in Kamailio:
http://tools.ietf.org/html/draft-ietf-sip-record-route-fix
(5. Double Record-Routing)
**********************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message
by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message inerror.
**********************************************************************