Hello,
On 07/28/08 17:11, Ross Beer wrote:
Hi Alex,
The problem I am having is that I am receiving one way audio or none
at all for some calls.
For example I have two pones behind the same NAT and they can call
each other without any problems, they can also call out through an
asterisk gateway. The problems occur when there are incoming calls
from the gateway.
I have looked at the SDP and they have local addresses, so I use the
fix_nated_sdp("15") option and calls from the gateways work, however
now calls between the two phones inside of the same NAT fail. I think
this is because the devices can talk to each other directly, however
when the SDP is changed to the NAT'ed address they can not.
If there is a way to check if they are behind the same NAT device, I
could then only fix_nated_sdp("15") only when needed.
the nat router box
cannot bridge two local ports to close the loop. In
case you have paralel forking for same user (many phones registered with
same SIP id), then it is just a bit more complex as you have to play
with branch_route.
The algorithm is:
- after lookup location and relaying is the place where you check if
destination is behind nat
- at that point, if the destination is behind nat, the dst URI field is
set ($du) to address of the nat router
- if the source ip is the same as the destination URI IP, then they come
from same box, condition will be like:
if($si == $dd)
{
# source IP and destination IP are the same
}
Cheers,
Daniel
------------------------------------------------------------------------
Date: Mon, 28 Jul 2008 09:50:20 -0400
From: abalashov(a)evaristesys.com
To: ross_beer(a)hotmail.com
CC: users(a)lists.openser.org
Subject: Re: [Kamailio-Users] Detecting Two Phones Behind Same NAT
Ross Beer wrote:
Is there a way to detect two phones behind the
same NAT device?
What do you mean by "detect?"
If they register, their Contacts will (presumably) be to different
NAT'd
signaling ports on the NAT device.
--
Alex Balashov
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599
------------------------------------------------------------------------
Get Hotmail on your Mobile! Try it Now!
<http://clk.atdmt.com/UKM/go/101719965/direct/01/>
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)lists.kamailio.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
--
Daniel-Constantin Mierla
http://www.asipto.com