Hello everyone,
I was looking all over the web for a solution to this and found nothing so far.
I have 1 remote location named A with 5 nat’ed IP Phones and no local asterisk and another remote location named B with 7 nat’ed IP Phones, no local asterisk machine. All 12 IP Phones are registered to an Asterisk server running at a 3rd location C with public IP address, no firewall and enough BW to handle many calls.
A’s IP Phones are numbered 9001 to 9005.
B’s IP Phones are numbered 8001 to 8007.
I want all RTP traffic from extensions in the same location to travel directly between SIP endpoints rather than going to asterisk (remote bridging from asterisk’s view) and all RTP traffic between locations A and B to go thru asterisk (local bridging from asterisk’s view).
Asterisk version is: 1.8.10.1
-I have set up my Dial command for every extension as follows :
exten => 9001,1,Dial(SIP/${EXTEN},30,C) , so no t, T, w, W options
-I have configured all sip peers as follows:
[9001]
type=friend
host=dynamic
nat=yes
directmedia=no
;directrtpsetup=yes
I have made some test calls with directmedia=yes (or no directmedia parameter), and calls between extensions in the same location are OK, RTP goes peer to peer. However, calls between A and B locations fails, as asterisk sends a re invite with the private IP address of the SIP remote peers.
If I set directmedia=no, all RTP traffic goes thru the asterisk (locally bridged) regarless of whether the SIP endpoint are on the same LAN or not.
Since asterisk can determine whether the SIP peers are behind the same NAT by checking the source IP address and contact address, how should I make my configuration?
kind regards, Pablo.