You have to enable the rtpproxy in your configuration:
if (uri=~"^sip:[8].*@")
{
force_rtp_proxy();
t_relay_to_udp("209.7.34.58","7060");
break;
}
a complete configuration with nat traversal can be found on:
Hi
I posted the below message a couple of days ago. I want all numbers
starting with 8 to go to a SIP PSTN gateway. The problem is that neither
forward() nor relay_to_udp() work through NAT. I want to be able to use
rtpproxy (or mediaProxy for that matter) for such connections. I see that
forward() and relay_to_udp() both bypass the nathelper rtpproxy. Anyone
knows the best way to ensure rtpproxy involvement in this scenario. If
rtpproxy is not involved, I cannot use the PSTN gateway from NAT'd
endpoints. There is gotta be a way.
/-------------------\
| SER (port 5060) + |
SIP UA <----- NAT ------> | rtpproxy |
| |
| SIP_PSTNGW |---->PSTN
| (* at port 7060) |
\___________________/
Previous post:
Hi
I am trying to send all my calls to a PSTN gateway (asterisk with digium
cards running on the same machine on 7060). I can use forward, but then I
cannot use the solution SER provides me by using NAT helper. Consider the
forwarding script:
      if (uri=~"^sip:[8].*@")
{
forward(209.7.34.58,7060);
    }
Here it works fine if I am calling from a public IP, but will not work if
I am calling from a NATed client since this stateless forwarding will
take SER out of the picture, and rtpproxy will not be used. I have also
tried using t_relay_to_udp, but is is doing the same, the below lines are
still not making SER to proxy the request.
if (uri=~"^sip:[8].*@")
{
t_relay_to_udp("209.7.34.58","7060");
break;
}
What would be the best way of doing it. I want SER to act as a proxy
(B2BUA?) between my caller and the PSTN asterisk server. I want to be able
to use nathelper for this scenario.
Regards
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers