[Serusers] SER + RTPProxy and Client behind NAT

Kanakatti Mahesh Subramanya mahesh at aptela.com
Tue Nov 23 01:48:49 CET 2004


UA is Sipura2000/Snom190/UnidenUIP200/etc.

I am running rtpproxy in verbose mode  (to be precise, as "rtpproxy -f 
-l  <internal ip>/<external ip>  )

The core problem is,
    - SER sends rtpproxy the port from the SDP (which in what the UA 
generated *behind* the NAT)
    - The UA is sending/receiving media on a *different* port  to rtpproxy.
    - How does one get rtpproxy to "point" at the NAT port, and not at 
the SDP port?


cheers

Matt Schulte wrote:

>Yes it can do this, RTPproxy is just that, a proxy. It has the ability
>to use whatever port it pleases, try running rtpproxy command line mode
>(rtpproxy -f ) to see if it's passing any errors. What kind of device is
>the UA? Be sure that the device has "NAT mode" on, this sounds like a
>problem I was having early on.
>
>-----Original Message-----
>From: Kanakatti Mahesh Subramanya [mailto:mahesh at aptela.com] 
>Sent: Sunday, November 21, 2004 5:00 PM
>To: serusers at lists.iptel.org
>Subject: [Serusers] SER + RTPProxy and Client behind NAT
>
>
>I'm having a strange problem with getting  SER+RTPProxy to work when the
>
>UA is behind NAT
>Setup is as follows
>
>
>UA --> NAT1 --> SER+RTPProxy --> NAT2 --> Asterisk
>
>I've got RTPProxy running in "bridge" mode, gatewaying 'tween Asterisk 
>and the Public Internet
>
>SIP traffic all routes perfectly.  STUN enabled clients work perfectly.
>
>The problem is that if the outbound port on NAT1 for the RTP stream is 
>*different* from the outbound port from the UA, then RTPProxy persists 
>in sending the packets to the UA port, *not* the NAT1 port.
>
>e.g.
>if the SDP payload from the UA contains
>
>            c=IN IP4 192.168.5.100
>            m=audio 16396 RTP/AVP....
>
>but NAT1 sends the RTP stream out on port 64003, then rtpproxy sends the
>
>media from Asterisk back to port 16393 at NAT1, instead of to port 64003
>
>at NAT1!
>
>Is it supposed to do this?  Am I missing something really obvious?
>
>
>The relevant section from ser.cfg is as follows
>
> if (nat_uac_test("3")) {
>    if (method == "REGISTER" || ! search("^Record-Route:")) {
>      fix_nated_contact(); # Rewrite contact with source IP of
>signalling
>      if (method == "INVITE") {
>        fix_nated_sdp("1"); # Add direction=active to SDP
>      };
>      setflag(6);    # Mark as NATed
>    };
>  };
>
> rewritehostport("........");
>  if (force_rtp_proxy("FEI")) {
>    t_on_reply("4");
>  };
>.
>.
>.
>onreply_route[4] {
>  if (!(status=~"183" || status=~"200")) {
>   break;
>  };
>  fix_nated_contact();
>  force_rtp_proxy("F");
>   break;
>}
>
>  
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mahesh.vcf
Type: text/x-vcard
Size: 332 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20041122/17e7f119/attachment.vcf>


More information about the sr-users mailing list