below is the configuration
Internet --- openser (mediaproxy) ---- PSTN + public IP (203.13.14.210) + Internal IP (10.0.0.30) openser will list on both internal and external IP
User can make/receive call without problem. user device --- NAT -------------------------------------- openser ---- PSTN (10.0.0.60) (202.130.10.200) (203.13.14.210)
user device ------------------------------------------------ openser ---- PSTN (10.0.0.60) (10.0.0.30) User can receive call without problem. However, when user makes outgoing calls, problem will occur. 1. called party will ring but calling party without ring. 2. After pick up the phone, both parties can't hear any sound.
From the past experience, the problem should be caused by the NAT issue.
In my dial plan, I use a module function client_nat_test("3").
if (method=="INVITE" && client_nat_test("3")) { # INSERT YOUR IP ADDRESS HERE record_route_preset("203.13.14.210:5060;nat=yes"); } else if (method!="REGISTER") { record_route(); };
From the function description
http://openser.org/docs/modules/devel/mediaproxy.html#AEN113, it will test if the client is behind NAT or not. However, in the result of ngrep, I can still find the header with the following. Record-Route: sip:203.13.14.210:5060;nat=yes;ftag=nQvg2qq2fzNg24d1;lr=on That's mean function client_nat_test always return true (from the case above) no matter client is behind NAT.
It is what I find up to now. I would like to ask whether there is any other configuration variables needed for the NAT detection. How the mediaproxy module (based on what) to detect the device is behind NAT or not? Any clue is welcome.
Hi,
unplug wrote:
From the function description
http://openser.org/docs/modules/devel/mediaproxy.html#AEN113, it will test if the client is behind NAT or not. However, in the result of ngrep, I can still find the header with the following. Record-Route: sip:203.13.14.210:5060;nat=yes;ftag=nQvg2qq2fzNg24d1;lr=on That's mean function client_nat_test always return true (from the case above) no matter client is behind NAT.
It is what I find up to now. I would like to ask whether there is any other configuration variables needed for the NAT detection. How the mediaproxy module (based on what) to detect the device is behind NAT or not? Any clue is welcome.
see the available NAT tests description: http://openser.org/docs/modules/1.0.x/mediaproxy.html#AEN113
regards, bogdan