[Serusers] rtpproxy problem.

Ray Van Dolson rayvd at digitalpath.net
Wed Aug 3 02:40:51 CEST 2005

I'm running into a problem with SER & rtpproxy trying to get a NAT scenario to
work correctly.  I'm still learning about SER, so bear with me... :)

Here is my network layout in a nutshell:

 - (private only, no NAT to internet)

 - eth0:
 - eth1:

 - eth0:

*Everything* is configured to proxy through SER to Asterisk currently.  My
configuration file is here:


Here's the problem I'm running into:

1. SIP ATA places call (INVITE sent)
2. SER routes INVITE to Asterisk (and modifies c= in the SDP portion to point
   back to as I understand it).
3. Ring, ring, other side answers.
4. Asterisk sends back a 200 OK message with c= in its SDP message
5. My configuration changes this to
6. Voice packets now are outbound on SER eth1 with src ip of and
   dst ip of  Obviously this will not work.

>From what I understand however, rtpproxy appears to only use one IP address
regardless of the direction traffic is going.  If I bind rtpproxy to on SER, then the IP in step 6 above will be correct, but the
Asterisk server will be trying to send RTP traffic to instead of

What am I doing wrong here?  Can I run two instances of rtpproxy depending on
the direction of the audio?  I've tried different parameters to
force_rtp_proxy() to no avail.  Is there a function to manually change the c=
line in the SDP body before it gets sent out?

Thanks for any help!

Ray Van Dolson
Linux/Unix Systems Administrator
Digital Path, Inc.

More information about the sr-users mailing list