<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Re: Record Route and proxy behind static NAT</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Thanks for your reply.<BR>
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.<BR>
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.<BR>
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.<BR>
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.<BR>
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?<BR>
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).<BR>
Just now I'm looking on what to do with a relay from the failure route to a second destination.<BR>
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.<BR>
<BR>
Regards,<BR>
Daniele<BR>
<BR>
> Date: Wed, 22 Oct 2008 19:02:35 +0200<BR>
> From: " I?aki Baz Castillo " <ibc@aliax.net><BR>
> Subject: Re: [Kamailio-Users] Record Route and proxy behind static NAT<BR>
> Cc: users@lists.kamailio.org<BR>
> Message-ID:<BR>
> <cc1f582e0810221002i7c95570epf585456a248811d1@mail.gmail.com><BR>
> Content-Type: text/plain; charset=UTF-8<BR>
<BR>
<BR>
<BR>
> The solution could be adding two Record-Routes, one with private IP<BR>
> and the other with public IP, but I'm not sure of how to achieve it<BR>
> with Kamailio. AFAIK Kamailio *already* does it when the transaction<BR>
> comes via eth0 and leaves the proxy via eth1, but this is not your<BR>
> case.<BR>
<BR>
> I recommend you reading this draft, and later trying to get it in Kamailio:<BR>
> <A HREF="http://tools.ietf.org/html/draft-ietf-sip-record-route-fix">http://tools.ietf.org/html/draft-ietf-sip-record-route-fix</A><BR>
> (5. Double Record-Routing)<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML><pre>**********************************************************************
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.
**********************************************************************</pre>