2008/10/22 Zappasodi Daniele <Daniele.Zappasodi(a)seltatel.it>it>:
In this way the proxy uses
"record_route_preset" when the caller is private
(client_nat_test("3")) and "record_route" when the caller is public,
without
consider the callee.
Consequently the proxy puts in the record route the public IP when the
caller is private and the private IP address when the caller is public.
I can't understand how it can work: when a client on an public ip calls a
client on an public ip, they find in record route the private ip and they
will try to send the SIP method (ACK,BYE, reINVITE ecc) to a private IP, so
this messages will be lost. This is the beahaviour that I'm observing in my
test.
Maybe this configuration isn't adapted for my scenario or I miss something
else (I have already added advertised_address/port) or I haven't correctly
understand the instructions or the Record Route's usage.
The above configuration is not valid for calls between clients with
public IP (both) or clients with private IP (both).
Anyawy, the above configuration is wrong, not just when calls between
public clients. Imagine the following:
UA1 <--> Kamailio <---> Router NAT <----> UA2
- INVITE UA1 --> Kamailio
Record-Route = PUBLIC_IP
The INVITE arrives to UA2 who sets the route set for the dialog and
send it back to UA1 with Record-Route in reverse order in the 200 OK.
So UA2 has this route set:
PUBLIC_IP, CONTACT_UA1
And UA1 has this route set:
PUBLIC_IP, CONTACT_UA2
When UA1 sends an in-dialog request (BYE, INFO, re-INVITE, ACK for
200-INVITE...) the message will be lost.
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)
Regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>